Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1343] Titanium.Media.vibrate(); does not work for IoS

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-04-07T00:33:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage, ios, iphone, sdk-3.4
ReporterSamie Syed
AssigneeShuo Liang
Created2014-11-09T15:36:01.000+0000
Updated2016-03-08T07:37:45.000+0000

Description

Titanium.Media.vibrate(); and Ti.Media.vibrate(); does not work. i.e. the phone does not vibrate.

Comments

  1. Stephen Feather 2014-11-09

    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.2
       

    index.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"
       }
       
  2. Samie Syed 2014-11-09

    Hi, Can you test it on iOS 7, iPhone 4 please?
  3. Shuo Liang 2014-11-10

    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();
       
  4. Samie Syed 2014-11-14

    Thanks that works, is there anyway I can put a pattern for how long the vibration lasts for on the iPhone?

JSON Source