How to control background music from my Android app? - android

I want to make an in-app widget, that can pause/play and switch music forward/backward for a lockscreen app for Android. I've tried some different ways, such as working with mediaplayer or Intent, but this didn't help me. I need my app to control music from all the sources: web browser, native music app, social networking apps with music playback support and so on. Something close to that is made in Sony Xperias as a widget. The difference is, that mine won't be a widget, I want it to use inside an application, that replaces the native lockscreen.
Hope that my question is clear.

I've found the answer for Android 4+ versions:
http://forum.xda-developers.com/showthread.php?p=45288378

Related

ChromeCast Android mute/unmute button working reverse with iOS

In ExpandedControllerView the mute/unmute button is working reversely in android sample app compared to iOS sample.Is there any way to change this?
The behavior on the Android is correct; the icon should show the action if one taps on the icon so, for example, when a video is playing, it should show the pause icon so if the behavior on iOS is not the same, please open a ticket for that to be addressed here.

Enabling default button sounds in ionic

I am trying to make the default tock sound work when you click something in an app, but I have not come across a way to do it without recoding a lot of the app. Specifically, I am looking if a button is pressed I want it to make a sound. When I'm on my android for example, if I'm in Fb or gmail when I click something it makes a sound. I am using Ionic 1.2 right now for the app. Even when I use an emulator, it doesn't seem to make a sound - and it definitely doesn't do it in ionic view

How to dynamically add a lock-screen widget

Google Play Music app adds a special lock-screen widget dynamically when playing music (on Jelly Bean), and removes it after exit. This widget cannot be removed manually by dragging, and when I unlock my phone, it is always the top one besides other lock-screen widget.
How to implement this special dynamic lock-screen widget? I can only find documents about regular lock-screen widget, but not for this.
I was looking for the same thing and found out this is done by using the RemoteControlClient, check #CommonsWare answer here What is RemoteControlClient in Android 4.0?

Music Player Lock screen widget Android

I am implementing a Music player Application. for that Application i want to implement a playback widget that stays on their lock screens and allows them to interact with the app.
i have found that it is possible in Android 4.2 Api. but some of the music player application can provide this feature in above Android 3.0
So that i have searched a lots of thing to implementing an screen lock widget that support from Android 3.0, but i can't found anything about it.
Any one have a solution or step, how to making lock screen widget that support from Android 3.0. ?
waiting for you reply.
Thanks in Advance.
You can make it into an activity instead of a widget and use certain flags such as FLAG_SHOW_WHEN_LOCKED and FLAG_DISMISS_KEYGUARD to achieve this I think. This thread will help you:
Android Lock Screen Widget

How to change the functionality of a key in android and symbian mobiles

I want to develop an application for blind using J2ME or Android. but i have few decision problems to make
1) Is it possible to change the functionality of a hard key in J2ME and Android
a) Totally like the home button can be changed to unlock the mobile like that
b) While program is running i.e An application is developed and during its usage the functionality can be modified.
2) Is it possible to add the audio feedback to the hard keys in J2ME or android
a) Totally like from the minute the mobile is switched on , whenever u press a button it will give its functionality in audio output.
b) While the program is running .i.e.An application is developed and during its usage the audio feedback can be added.
Please clear my doubts and help me in making decision
A touchscreen phone for blind people doesn't sound like a good idea to me :)
Android:
1 b) Without building your own custom rom no way to change the functionality of hard buttons globally. You are free to respond to buttons in your app as you like (except for the home button)
2 b) you can play any sounds while your app is running. But same problem here - you are resticted to inside your app.
Edit: Android has some features builtin:
http://eyes-free.googlecode.com/svn/trunk/documentation/android_access/index.html

Categories

Resources