alarm

iOs 8, start playing sound when in the background, alarm clock app

橙三吉。 提交于 2019-11-28 16:54:57
I know there are many questions on SOF, but this is the "newest" one. The thing is, I'm trying to create and alarm app, and I know for a fact that there are alarm apps out there that works perfectly ( somehow ), even if the app is not running and is in the background. My question is: how do you start playing sound after your app is already in the background ?? UILocalNotification is great, but you'll only get application:(_:didReceiveLocalNotification:) after the user has already clicked on your notification, so playing sound using AVAudioPlayer didn't work, i want to play sound regardless

How to handle Alarm notification in Android?

冷暖自知 提交于 2019-11-28 10:31:24
I'm developing an media player application for Android, for which I need to handle any Alarm notification, and based on that I'll pause my playback. When the Alarm in snoozed or dismissed, I'll then resume the playback. I googled a lot for the Alarm handling, but what I found was the way to enable Alarm notifications through code, set the intent and then handle it. However, no where could I locate just handling the Alarm notification part. I don't need to set the Alarm on, it could've been set by the user, and I don't need to programmatically. All I need is just handle that notification. Any

How to detect alarm ringing or other apps using speaker? [closed]

岁酱吖の 提交于 2019-11-28 09:30:13
I am developing a music app. I want to detect that other apps using speaker or alarm ringing for play/pause music. For phone call i use PhoneStateListener. I tryed OnAudioFocusChangeListener for to detect other audios. But didn't work. I wondering how to solve this problem. I solved my problem for default alarm application: public static final String ALARM_ALERT_ACTION = "com.android.deskclock.ALARM_ALERT"; public static final String ALARM_SNOOZE_ACTION = "com.android.deskclock.ALARM_SNOOZE"; public static final String ALARM_DISMISS_ACTION = "com.android.deskclock.ALARM_DISMISS"; public static

How can I interact with the Lockscreen layout to display text into it, like this app:

倾然丶 夕夏残阳落幕 提交于 2019-11-28 09:23:09
I just discovered this application : https://market.android.com/details?id=de.j4velin.lockscreenCalendar It seem that is now possible to write some text inside the lockscreen in the place where the alarm is usually written. I would like to display custom text on this place, but have totally no idea on how to achieve that. This guy succeed to write calendar events at this place. Thank a lot for any clue//snippet that would help me. This is astonishingly easy to achieve and astonishingly badly documented. All you need to do is set the alarm string in the system settings, as follows: String

Lollipop API for controlling the Alarm icon in status bar

天涯浪子 提交于 2019-11-28 09:17:44
This is a Lollipop-specific question , since the API has changed. To find out how to do this on earlier versions, see related question: Controlling the Alarm icon in status bar I would like to know how to turn on / off the system Alarm icon in the status bar as shown in this image: Timely Alarm Clock controls this icon on Lollipop as of release 1.3. Prior to that release, the code was using private APIs as detailed in the related question . The new technique they use works on an unrooted Nexus 5 running v5.0.1. Update It looks like there is a lot more the this new API than just changing the

alarm function on Linux and Windows -> can't find a equivalent for Windows -> C

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 04:39:58
问题 I have worked for some time now on Linux and done some C programs, and now I need to build an app for windows but is not being easy to find a replacement for the alarm function (found on signal.h)... The thing is, in Linux, when you set the alarm flag as SIGALRM (if not mistaken), what the OS is going to do is to execute some function when the alarm goes off. Example: signal(SIGALRM, myfunc); alarm (2); What is going to happen on this example is the OS is going to call the function myfunc

Android: How to repeat a service with AlarmManager every 15 minutes, but only run from 8:00AM to 18:00PM?

巧了我就是萌 提交于 2019-11-28 04:25:05
I need to check data update periodly, but the data is only updating during the daytime, so I want this repeating action run only in that time section for saving battery and bandwidth. What should I do? If the service is talking to the cloud with HTTP get/post/whatever requests, then note that a C2DM solution would net better battery life, and that a SyncAdapter solution could provide a few benefits. (I recommend watching the Google I/O videos on both topics.) The following code does something close to what you originally asked about. public class MyUpdateService extends IntentService { public

Create an (repetitive high pitch) Alarm on a remote trigger when App is not running (iphone/android) just like Find My iPhone

做~自己de王妃 提交于 2019-11-28 02:37:19
问题 I would like to cause an alarm on a remote iphone/android device when the app is running or not running. How do I achieve it ? I can only think of Whatsapp/Skype when there is incoming call, its ringing. Or would it be possible to cause the phone to play a looping alarm sound on Push Notification. Another very clear example is "Find My iPhone" app which can trigger a loud alarm to an iPhone. How can I achieve this programmatically on ios and android ? 回答1: Its possible using FireBase

Identify and cancel an alarm send to an AlarmManager

喜欢而已 提交于 2019-11-28 02:28:20
问题 If I use the AlarmManager to schedule an alarm (a PendintIntent which should be send), how can I identify that alarm later to cancel it? Can I cancel all alarms scheduled by my app? 回答1: You probably want to have a closer look at the AlarmManager.cancel(PendingIntent operation) function. 来源: https://stackoverflow.com/questions/4212824/identify-and-cancel-an-alarm-send-to-an-alarmmanager

ios nstimer run in background for check alarm time is equal to current time and play audio

。_饼干妹妹 提交于 2019-11-28 02:22:55
问题 I googled it for hours, but could not find any information if there is any way to keep a running NSTimer active when the app is running in the background ? Please Help me , when app is go to background then one function run and each sec check alarm time is equal to current time , then play audio and open close alarm page If anybody know alarm app open source and its run on background please share with me Here i try this , but this is not working - (void)applicationDidEnterBackground: