Is it possible to start music player at specific time i.e. instead playing a single alarm tone, is it possible to start Music player when alarm runs..?
Can user set cron job in android or it must be set by developer...?
Related
Hello, I am having trouble figuring out the best way to make an alarm clock noise for my alarm clock app. I want to start the noise when the broadcast receiver is activated. I am able to create a media player, but the noise is attached to the media volume. I am not sure how to tie the noise to the alarm volume like google clocks. See image please, or at least the notification volume. I don't want it to run off media volume in case someone has it low, and makes the alarm pointless.
I am building an alarm ionic app that load custom sounds according to my preference and using the NativeAudio component.
The alarm is intended to just give me a buzz on specific times playing some voice recorded reminders. So when I listen to spotify and the alarm fires, it should put spotify music on hold and plays it back after the alarm.
I know we cannot control the spotify app from an outside app. However, I noticed that when I video in facebook, spotify stops, and after the video, spotify resumes.
Any guide on how to do an ionic app with this behavior would be appreciated.
Thanks!
I want to detect if the Android Phone speaker is in use by any App like whether Music Player is playing Music or Alarm is Ringing or Video is playing. I dont want to detect just if a specific App is using the Ringer all i want to do is get Notified if the Ringer is used by Any APP.
I´m developing a music application.
When an alarm starts, the streaming of music must stop. The problem is how to detect the alarm event. The alarm may sound at any time. It is set by the user with the android alarm system.
It's easy to detect when phone calls come in (via phoneStateListener), but what about other notification sounds, such as email or sms?
On some devices, these notification sounds mute but don't pause any currently running mediaPlayer instances, which is annoying for the user. Ideally, I'd like to listen for notifications that play sound, pause playback for the duration, and then resume playback afterwards.
You can get notified when another app wants to play audio by registering a callback on AudioManager.OnAudioFocusChangeListener (this would also handle the case of an incoming call). Specifically, you can look for AUDIOFOCUS_GAIN, AUDIOFOCUS_LOSS, and AUDIOFOCUS_TRANSIENT_LOSS. The Android music player source has a good example of this.