I'm currently using Appgyvers SteroidsJS (which is forks of Phonegap and Cordova), and would like to control the default music player from within the app on my Android (5.0.1). Simple things like play, stop, pause, next, and back.
I can't seem to find any direct way to accomplish this, or even a way to pop in to the Android API from Steroids/Phonegap. Does anyone have a solid method to do so or is it not possible? Thanks!
Nothing simple existed, so in the end I learnt how to write something myself. :)
https://github.com/dustinblackman/cordova-MusicControl/
Related
I have an Android app which plays mp3 files. I have programmed its main functions like play/pause forward, backward buttons, manipulating by SeekBar, getting current position and so on. Now I want to make my app to continue playing even I closed my app. And when I close it, I want to appear thing like widget in status bar with basic actions (displaying app icon, track name, play/pause button). And also, I want to SeekBar work properly when I reopen my app. Can anyone help me. I'm beginner in Android Java, so it would be perfect if your answer contains steps. Thanks beforehand
I think this tutorial perfectly match your query
Android custom notification for music player Example
It think you need to read this articles:
1) https://developer.android.com/guide/components/services.html?hl=ru - this articles can help you to play music on background. It's very important component of youar app;
2) If you want to provide a widget - just see this article https://developer.android.com/guide/topics/appwidgets/index.html?hl=ru
3) If you want to show notification in status bar, see - https://developer.android.com/guide/topics/ui/notifiers/notifications.html
Also, you can find many iteresting solutions and lessons here - http://startandroid.ru/ru/uroki/vse-uroki-spiskom/164-urok-99-service-uvedomlenija-notifications.html
https://developer.android.com/training/managing-audio/index.html?hl=ru - an interesting article about music players by Google Android Developers
Best regards,
Skidan Oleg
What I need to know is, Is it even Possible to view an app within another
app?
I have tried to find out how but I found much topics speaking about launching apps from another only
For example: To have an application that views the file manager, specific music player and google chrome and be able to switch between them with something like tabs?
You will have to do an IPC for what you like to acheive. have a look at this link. Though am not sure if you can run it the way you want.
http://developer.android.com/guide/components/aidl.html
I have an Android app that I would like to add the ability for the user to "cast" what is displayed on the app to a Chromecast. It could just be a local JPG but I would prefer the user to actually see actual "live" content of the app. Does anyone know if this is possible? I know there are apps like AllCast but wasn't sure if they were using supported features of the SDK or if it was a hack. I found some mention of the Default Media Receiver but could not find any documentation on how to use it with local content. Any advice or direction would be appreciated.
There is no Cast api to do that directly; you can look into WebRTC or something of that nature.
The way I do it is to use the Presentation class. The only problem is that you do need to use the ChromeCast app to start screen mirroring before you start your app.
I have not yet found a way to start mirroring my app (or, to be more precise, to show the contents of your Presentation class) from a ChromeCast UIButton within my app, even though I have been able to get that cast button working and connecting ... just not to start app-mirroring when using only my in-app chromecast button.
I am writing a countdown timer for android right now and I want to give the user the possibility to customize the sound used for it. Rather than offering a set of fixed sounds i would prefer to give the user some settings in the hand with which the sound can be customized (and the app generates the sound based on the user settings). I would like a basic bell/gong type of sound, nothing fancy.
I found libraries like jass which offer this kind of audio generation yet i havent found something which i can use for android.
It would be great if somebody could give me some ideas in which direction to look.
this is my first post on stack overflow so hoping you can help.
We are developing an Android App, that requires an audio player to always be available, no matter what activity you are on. Ideally, we want this to be a "pop up" style player that is accessible when you tap the screen or tab an always visible button (e.g. on the action bar). However, the player needs to overlay the activity you are on, and continue playing the audio as you move between activities and (ideally) multi task within your device.
I have looked into various options for this, and wonder if a service is the best way to go. The other option I am considering is a transarent activity. But I am open to suggestions!
Can anyone offer any guidance? Thanks in advance.
I think that service, playing the tracks is the best way to go.
For the player visual interface, you should have one view, which will be included wherever you need it.
When you open this view, you will get the information from the service (what track are you on, where exactly in the track) and initialize with those results.
At least this is my suggestion approach to the task. Good luck!
Have tried considering making it an android widget? It remains on the home screen and user can play music and get back to other tasks.
But not sure if it will meet your overlay criteria(Which I quite didn't understand.. :))
Check out Androids MediaPlayer-Class. This should prevent you with all nessesary playback functions. On how to create your player-controll-interface on Androids Action-Bar, check Googles Tutorial. But note that the ActionBar is available since Android 3.0, not in previous version!