Trying to make an app that get current playing song and output it. Tried a IntentFilter for the stock music player and that works great. But this wont work on Spotify, so my question is if there is any way to get the song information from the spotify app?
I think they have an SDK for this:
https://developer.spotify.com/documentation/android/guides/android-media-notifications/
Not sure if it's still being maintained and if it works. Also not sure if possible to get the album art.
Related
I have an app that plays videos using the video_player package. These videos have sound, but I don't want to play it. To achieve this, I use:
controller.setVolume(0.0)
The problem is whenever I open the app, even before playing a video, any background music stops.
I figure there must be a way to say "this app does not have sound capability" and then the OS won't pause any background music.
Is there a flutter specific way to do this, or should I look for iOS and Android specific solutions?
Thanks!
I'm working on an Android project.
its a phone assistant and auto answers the phone and a pre-defined voice plays for the other party. But there is a problem that android doesnt allow us to play audio when a calling is in progress.
so i looked a lot and searched whole web and i found this answer:
https://stackoverflow.com/a/28000021/4254527
This Answer seems to be true. but i dont know how to crate a custom media player. so how can i create a custom media player that doesnt extends from android media player class and plays music during a call.
I can't find a way to do this. is it possible to control the media stream that is current playing on chromecast, like youtube, video app, music app, or whatever from a generic Android application?
I've tried many ways to do it, but I had no success. I'm able to join the chromecast while it's playing a video from youtube for example and get it's session id and some other info, but I can't play/pause the streaming. Is it possible to do it?
Thanks in advance.
It very much depends on the application that is running on the receiver; not all applications use the Media namespace (from the Cast SDK) for control; if they don't, you will not be able to do anything of the sort that you are trying to do. If they do, then you should be able to send control commands.
I was wondering how to exactly stop all other music that may be playing when my app is opened whenever there is music being played in my application. I have a couple instances where I just have sound effects, so is there anyway I can stop music that may be playing already whenever these sound effects pop up? I know I'm not giving any code, however, I have no idea how to approach this and haven't found many other questions asking similar things.Thanks!
Look at the AudioManager.requestAudioFocus API. Remember to release the focus when you're done with it, or other apps may not be able to play sounds correctly.
when user clicks a button i nee to direct him to a page which it has list of songs. Then when an items selected by user the i need to play song and let him to capture movie together. Its something like karaoke.
Is it possible? please tell me how can i find a reference?
Thanks
Yes it is possible, I can tell because my cam playing button click sound when I am recording.
I don't think you need a service for that, just try using MediaPlayer
Use of service will help in this case. For this you need to create two services, one for recording video and other for playing music. Through your main activity control both.
I hope it solve the work. But as per the devices seen like samsung devices, they dont provide this functionality. When camera recording is done, you cant play music.
Logically using service we can do the task.
Let me know if it works :)