Skip to main content
Participant
February 11, 2011
Question

Vibrate air android

  • February 11, 2011
  • 1 reply
  • 3114 views

Is there a way to use the vibrator on android devices in Adobe Air ?

Thank you

This topic has been closed for replies.

1 reply

Inspiring
February 12, 2011

I ran into this exact same issue tonight, and wasn't sure if the VIBRATE permission was available, since it isn't visible in the "AIR Android Settings" menu when publishing from Flash Professional CS5. Here's what I did to see if I could add it manually (not sure what method you're using to create your APK files, but this is how I've been doing it):

I published my app using the AIR Android Settings menu from Flash. Make sure at least one permission is selected (such as INTERNET or WAKE_LOCK). It creates the APK file along with an XML file (appname-app.xml). Go into the XML file and find the section similar to this:

    <manifestAdditions>     
      <![CDATA[<manifest>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.VIBRATE"/> // here is the line that you need to add
     </manifest>]]>
    </manifestAdditions>

Once you add that line, VIBRATE should appear in your permissions menu now. Publish an app as you normally would, and when you install it on your Droid it should ask you to verify that you'll be using this permission. Voila!

myangel42Author
Participant
February 12, 2011

Thank you, but I don't find the as3 code to make a vibration. Have you a sample ?

Chris W. Griffith
Community Expert
Community Expert
February 14, 2011

Although you can add that attribute to the manifest file, currently there is no method to trigger the vibration on the device. If this is an important feature, please go to https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform and let your request be known!

Chris Griffith

Adobe Community Professional