Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Volume control on lock screen or notification bar in Titanium Android

$
0
0

In IOS, I implemented volume control for my app on lock screen. Same thing is needed in android also. I done it in IOS by setting the plist

<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
In controller
var player = Titanium.Media.createAudioPlayer({
   url : "/alerts/door-bell.mp3",
   allowBackground : true,
   audioSessionMode : Ti.Media.AUDIO_SESSION_MODE_PLAYBACK
});
 
function start(e) {
  player.play();
}
But for android I can’t find any hint. For IOS I refereed the KitchenSink app but in android that example was excluded. Means is that not possible?. But when I played default music player, upon locking the screen, music control was showing on notification bar menu. So I am assuming this is possible for my app also. If so how can I do this in Titanium or in Android it self.

Please help me :(


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>