thanks for previous replies,
Is it possible to get package name of active and runningin service(background) music player. I can able to get the music actions(metachage or playstateChange) but when i use intent.getPackagename, im getting null. can anyone guide me on how to get the package name of music player.
Thanks!
Supplying the file URL and open it in browser does not make sense, because this URLs expire after a wile.
No, insofar as there is nothing magic in Android that denotes a "music player" from anything else.
Related
First of all, I'm not good at english. sorry.
What I want to make is music broadcasting service.
When I select music from android device, it sended to the server in real time, and server broadcasts it to another.
But I don't know how to send mp3 file to server in real time.
Can I get some ideas or samples?
Please help me....I searching for example codes for a long time but I can get anything....
I have tried AudioStream, but it looks like can send MIC only.
When you select a music file, mp3 for instance, there will be no ACTION broadcast. So you can't capture this operation through BoradcastReceiver.
You can create an app for user to choose when they select a music file, then you can send the file to server as you like in your app. This can be done by adding intent-filter in your Manifest file.
Hope this helps you.
I've been fiddling around with Tasker recently and I think it would be cool to be able to pass Google music a string input from the user that Google Music would use to generate a radio station that could be played. I know there's no official api at this point, and I'm even surer I wouldn't know what to do with it were that not the case.
I Can access a bunch of gmusic activities thru the "Secure Settings" Tasker plugin--there's a particularly interesting activity called 'CreateMixActivity,' but I can't find any info on it--and have between playing around with Intents, but don't really know how or where I should start experimenting.
Any input/questions would be greatly appreciated (first post btw)
Chucksef
This is as close as you are gonna get o an API, this is using Python but you are welcome to go through the code and write your a fork using Java/Android.
https://github.com/simon-weber/Unofficial-Google-Music-API
i am developing one application which
needs to play an audio song to callee when call is lifted by callee,
and automatically call has to be disconnected automatically when audio
song playing completed . i tried to find in android API for any
classes or methods to do this, but failed to find... please help me
how to do this..
your answer could be helpful to me...please do reply
Thank you in advance..
AFAIK, it is not possible to play a sound in the ongoing call and also to automatically dosconnect a call. Telephont API doesnt provide any methods to do any od these. So both od these requirement can't be fullfilled in ANdroid.
Is there anywhere with a list of the Intents different players send out metadata on a track change? Ex: Sense uses:
com.htc.music.metachanged
Looking for 3rd-party (non-bundled) players and the default player.
tks in advance!
There is no 'list' with the intents of all music players. For the default you can check the documentation and for those that are open sourced you can check the code, but unfortunately in all other cases (3rd-party players) there is nothing you can do. You can write your own player and use whatever Intents you wish.
I am trying to build an Android Service that should get notified when the user starts playing an MP3. I checked LogCat when I start playing a song and saw that the following Intent is logged:
Intent { act=com.android.music.PLAYBACK_VIEWER flg=0x4000000 cmp=com.android.music/.MediaPlaybackActivity }
I couldn't figure out how to write an IntentFilter to let my Service know that this event has occurred and let me know the name of the song that will be played. I searched Android reference but could not find anything on PLAYBACK_VIEWER.
Thanks,
C
I would do neither. First, none of this is part of the SDK and so may change at any point. Second, this will only work for the built-in media player application, not any third-party or OEM-supplied media players, and I expect more people to gravitate to those.