[AC-1343] Titanium.Media.vibrate(); does not work for IoS
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2015-04-07T00:33:51.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | TCSupportTriage, ios, iphone, sdk-3.4 |
| Reporter | Samie Syed |
| Assignee | Shuo Liang |
| Created | 2014-11-09T15:36:01.000+0000 |
| Updated | 2016-03-08T07:37:45.000+0000 |
Description
Titanium.Media.vibrate();
and
Ti.Media.vibrate();
does not work. i.e. the phone does not vibrate.
As a reference only, runs fine on:
Operating System Name = Mac OS X Version = 10.10 Architecture = 64bit # CPUs = 4 Memory = 24.0GB Node.js Node.js Version = 0.10.29 npm Version = 1.4.14 Titanium CLI CLI Version = 3.4.0 node-appc Version = 0.2.14 Titanium SDKs 3.4.0.v20140925164115 Version = 3.4.0 Test Devices iPhone 6+ running iOS 8.1 iPhone 4 running iOS 7.1.2index.xml
<Alloy> <Window id="wrapper"> </Window> </Alloy>index.js
$.wrapper.addEventListener("click", function(e){ Ti.Media.vibrate(); }); $.wrapper.open();index.tss
"#wrapper":{ layout: "vertical", backgroundColor: "#ffffff" }Hi, Can you test it on iOS 7, iPhone 4 please?
Hi, Just tested on iPhone 4 with IOS 7. Ti.Media.vibrate(); works well. Here is the test case.
var win = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var button = Titanium.UI.createButton({ top: 50, title: "vibrate start" }); win.add(button); button.addEventListener("click", function(){ Ti.Media.vibrate(); }); win.open();Thanks that works, is there anyway I can put a pattern for how long the vibration lasts for on the iPhone?