Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Set Media Volume Control for Android Adobe AIR?

In General, JAVA based android app development. we may use...

setVolumeControlStream(AudioManager.STREAM_MUSIC);

So that activity makes volume controller to control MEDIA Volume. If I want to achieve this in Adobe Air based android app. How do I do that?

like image 415
Kaymatrix Avatar asked Oct 23 '22 15:10

Kaymatrix


1 Answers

How about building an AIR native extension to interact with the system volume for Android.

Like: https://github.com/nweber/SystemVolumeNativeExtension

Related Explanation article: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html

Expected behaviour from the github readme

When changing the volume using the hardware volume keys the system volume popup will be displayed. The AIR application will be notified of the new volume after the system volume popup disappears. This means that the user can press the hardware volume buttons several times before AIR is notified of a volume change. When changing the volume from AIR the system volume is changed, but the system volume popup is not displayed.

like image 78
Vrashabh Irde Avatar answered Oct 27 '22 11:10

Vrashabh Irde