Reputation: 1
am new in mobile app development, but have try do develop online radio app using Android Studio, but when the app is playing the sound from Icecast it use to stop when the phone is lock and sleep.
Also i find it difficult to set the accurate width that can march any app, the one that i set only work for Small Android Screen. The code full the width of small android phone with android 4.0 but on large screen android phone i can see some space beside and at the bottom of the screen.
Upvotes: 0
Views: 4273
Reputation: 658
You should use MediaSession since its designed to help you control Media playing and controlling media playback. Check the reference and follow steps for using MediaSession.
Upvotes: 1
Reputation: 4121
Universal Android Music Player
This sample shows how to implement an audio media app that works across multiple form factors and provide a consistent user experience on Android phones, tablets, Android Auto, Android Wear, Android TV and Google Cast devices.
It also work on lock screen.
link to sample app and source code
hope this will help you.
Upvotes: 0