This article illustrates the solution to the handset's inability to play music in Android development. Share to everyone for your reference, specific as follows:
This problem makes my egg ache, since Baidu also has the information of wood.
The main reason for the time consuming is because of insufficient permissions, but not terminating the program, with only a small line of log reminders, not seen
It's easy to play with the handset.
Audiomanager.setmode (Audiomanager.mode_in_call)
//set to call
It's still a code thing, but remember to add permissions.
Android.permission.MODIFY_AUDIO_SETTINGS
Or it's going to hurt like me.
There is one more thing to be aware of, after the playback is completed
Audiomanager.setmode (Audiomanager.mode_normal);
Otherwise, other software will be playing the handset.
PS: About Android Manifest permission control detailed properties and function instructions can refer to the site online tools:
Android manifest Features and Permissions description Encyclopedia:
Http://tools.jb51.net/table/AndroidManifest
For more information on Android-related content readers can view the site: "Android Multimedia operating skills Summary (audio, video, recording, etc.)", "Android graphics and image processing skills summary", "Android Development introduction and Advanced Course", " Android Debugging tips and FAQ Solutions Summary, Android Basic Components usage Summary, Android View overview, the Android layout layout skills Summary, and the Android control usage summary
I hope this article will help you with the Android program.