Android : How Many Alarms Can Be Set In One Application?
May 21, 2009I want to know how many alarms can be set in one application? what is the length for every interval time that I can set?
View 5 RepliesI want to know how many alarms can be set in one application? what is the length for every interval time that I can set?
View 5 RepliesI have an application that consist of several Activities. When the application starts, some alarms are scheduled using AlarmManager and some services are started:
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
a.setInexactRepeating(...)....
I would like to know any way to guarantee every service is stopped and every alarm is unscheduled when the user exits the application. The problem is that the user can leave the application from different Activities, and I don't like the idea of overriding the onDestroy method in every Activity. Is there any known Intent I can receive when the application ends? I've also found that an Android application can have a class that extends from Application, with a onTerminate method:
public class MyApplication extends Application {
@Override public void onTerminate() {
... } }
But the documentation is very clear: "never depend on this method being called; in many cases an unneeded application process will simply be killed by the kernel without executing any application code".
Is it by any chance possible to get a list of alarms saved in the alarm application of android ? I am making an application which just needs to show the alarms set in the Alarm application.
View 1 Replies View RelatedDoes anybody know of an app that you can set alarms on the phone for?
View 1 Replies View RelatedI'm looking for one where I can set many different alarms (including multiple alarms per day). I would also like quite a bit of customization (things like tone length, volume, snooze, etc). I don't mind paying, but I want to make sure I have the best before I fork over for it.
View 1 Replies View RelatedIn case this is useful for someone: When you are programming several AlarmManagers, you have to differ them using a setData parameter:
intent.setData((Uri.parse("custom://"+SystemClock.elapsedRealtime ()))); long firstAlarmMillis = getFirstTimeAlarm(mYear, mMonth, mDay, mHour, mMinute); intent.putExtra("timeInMillis", firstAlarmMillis); PendingIntent sender = PendingIntent.getBroadcast (getApplicationContext(), 0, intent, 0); //Log.d("tiven", "despues de la alarma"+firstAlarmMillis); AlarmManager am = (AlarmManager)getSystemService (ALARM_SERVICE); am.set(AlarmManager.RTC_WAKEUP, firstAlarmMillis, sender);
You have to set a parameter to differ intents, or else you won't be able to hable them in a broadcast receiver.
I am been stuck , while developing an alarm based application on android. Currently my alarm is firing correctly.But i have kept a toast, to notify the alarm. I want to use ringtone for alarm notification.
View 1 Replies View RelatedI think I may have found an issue within the My understanding is that to properly hold a device awake after an alarm is triggered you have to aquire a WakeLock in the onReceive() event, call a Service, then perform the work in the Service, releasing the lock within the Service when complete. http://groups.google.com/group/android-developers/ browse_ thread /threa . http://www.mail-archive.com/android-developers@ googlegroups.com/msg66. This pattern can also be found in the CommonWare Advanced Android Development book. I tried this, but I found that the AlarmManager, when calling the BroadcastReceiver, runs on a separate PID than the IntentService when started from the BroadcastReceiver's onReceive() event. This makes the static variable on the lock manager. I tried this, and my logs indicate that the PID is definately not the same, and my understanding is that the DalikVM instances act like a standard JVM, whereby objects and variables are no shared between JVMs. Furthermore, since the WakeLock is not serializable, there is really no way to pass the reference to the lock via an "extra" in the Intent.Has anyone else seen this pattern work or fail? I have an example project (with compiled APK) if you'd like to test it yourself, where shall I post this? I have tested this on the emulator on versions 1.6 and 2.0.
View 8 Replies View RelatedI am setting multiple alarms like this, with different values of id. Multiple calls to AlarmManager.setRepeating deliver the same Intent/PendingIntent extra values, but I supplied different ones.
AlarmManager alarms = (AlarmManager)context.getSystemService(
Context.ALARM_SERVICE); Intent i = new Intent(MyReceiver.ACTION_ALARM);
// "com.example.ALARM" i.putExtra(MyReceiver.EXTRA_ID, id);
// "com.example.ID", 2 PendingIntent p = PendingIntent.getBroadcast(context, 0, i, 0);
alarms.setRepeating(AlarmManager.RTC_WAKEUP, nextMillis, 300000, p); // 5 mins
And receiving them like this:
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(ACTION_ALARM)) {
// It's time to sound/show an alarm
final long id = intent.getLongExtra(EXTRA_ID, -1);
The alarm is delivered to my receiver at the right times, but often with EXTRA_ID set to the wrong value: it's a value that I have used at some point, just not the one that I wanted delivered at that particular time.
I want to set two alarms through my application. I have two controls to set them. But when I set one alarm and then another, then the last alarm set works only and previous get cancelled. What is the way to keep their pending intents separate? How can I do this?
View 3 Replies View RelatedCode below creates an Alarm, so far everything is working fine. But i am a bit lost in the Documentaion how to cancel an Alarm. I need to cancel only special Alarm(s) depending on Intent#putExtra(IntentConstants.SELECTED_PRIMARY_KEY,_selectedID);
How can i archive this ?
CODE:.....................
My app schedules an alarm,with the alarm scheduled, what happens if I release a new version of my app, and the user upgrades the app? Will this alarm be removed? Or will it be left untouched, and fired as expected?
View 2 Replies View RelatedIs there a recommended way of resetting these alarms? The only way i can think of is registering a receiver for boot time, have it re-read the database and recreate the alarms but that seems so overkill. Why on earth would they be designed to be cleared on reboot?! :/
View 4 Replies View RelatedI like to create multiple alarms, but i does not work. how to set and how to request in my receiver what alarm intent came activated.
View 4 Replies View RelatedSo far and thanks to this website, I've been able to set up an alarm that will be set up and active, even if I turn of my phone. Now, I set up a alarm to show a reminder for event A and I need the application to setup another alarm to show another reminder for event B. I must be doing something wrong, because it only fires the reminder for event A. It seems that once set up, any other alarm is understood as the same one.
View 2 Replies View RelatedIn the Android app which is getting developed, i have multiple alarms.
I want to initiate, different actions on different alarms.
How can i differentiate or determine , exactly which alarm has been fired?
Although I like this phone, some things make me miss my iPhone. One issue right now is the stupid alarm. Am I missing a step or something? The alarms are set, two separate, the alarm icon is up in the notification bar however, the alarms do NOT go off.
View 15 Replies View RelatedI have a HTC Hero and have a problem with Calendar. I have recurring events set in Calendar which don't need reminders, but can't find a way to stop the alarm going at 1 am. Is there a way to stop this?
View 3 Replies View RelatedI'm looking to get a home security system, you know, one that alarms when a door, window, etc is opened.
And so I was thinking, I bet there's one that can tie into an app that lets me check my home remotely.
I'm looking for a way to trigger repeated actions. I'd like the user to be able to choose the intervals at which these actions will be executed. One should be able to choose from intervals like "Every Day", "Every Month", and "Every Year". The setRepeating(int, long, long, PendingIntent) method of the android.app.AlarmManager class only supports a long value for choosing the interval between the execution of the pending intent. My problem now is, that I can not just compute the number of milliseconds that "fit into one day", since not all days have the same length (daylight saving). This is also a problem for the interval type "year" (leap years).
I had a quick look at the android.os.Handler class, but as I understood the documentation I'd need to keep a service thread running for my actions to be executed at some future time. I don't consider that a good option for my needs ;-) Is there anything in the API I could configure with a cron expression or the like? I was also thinking about scheduling an alarm with the AlarmManager for a single execution at a given date/time and then having a receiver that does the rescheduling according to a cron expression attached to the intent. But I don't know if I just got something completely wrong here and I'm reinventing the wheel with that approach
I don't know what it is but my alarms never go off in the morning when I wake up. They are set at night and I plugg my phone in to charge but in the morning they don't go off. I test my alarms during the day and they work if I set a alarm for a minute later they work.
View 4 Replies View RelatedI recently noticed my phone has not been going off when it should. I checked my settings and noticed all the ringtones were no longer listed when selecting a ringtone/alarm/notification. Using a file browser I was able to located all the missing ringtones, under /system/media/audio. This may be relevant, my phone recently was low on data and i had uninstalled some programs, although none of which as far as im aware, has anything to do with the ring tones.
View 1 Replies View RelatedAnyone else having this problem? I set the alarm to play an mp3, but when the time comes, it never goes off. Nothing at all.If I select "vibrate" + mp3, then it will vibrate, but it will not play the mp3.
View 1 Replies View RelatedI need to learn how to use my downloaded ringtones as my notification ringer and alarm clock. I read something about setting a new directory for my sd card but I don't know how to do that.
View 2 Replies View RelatedI've switched off - completely - both taskiller apps (which were shown to ignore the alarms) and still nothing. I got up at 11.45 because of that today, and very soon I'll be relying on alarms very much, and can't have this madness! I tried a market alarm too and no change.
View 7 Replies View RelatedI have to set multiple alarms (upto 5) that will trigger everyday, in my application. I tried to create an array of AlarmManager instances but it didn't worked. Here is the code fragment I used for this.
[HIGH]AlarmManager[] alarmManager = new AlarmManager[totalAlarmsInDay];
for(int i = 0; i < totalAlarmsInDay; i++) {
alarmManager[i] = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
PendingIntent pendingIntent = PendingIntent.getService(this, i, intent, PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager[i].setInexactRepeating(AlarmManager.RTC, calendar.getTimeInMillis() + i * 15*60*1000, AlarmManager.INTERVAL_DAY, pendingIntent);
}[/HIGH]
according to the Sticky I should have three different folders for ringtones, notifications and alarms. I only have the notification one. Only got the Desire model today. Have I missed something?
View 1 Replies View RelatedSubject says it all really. When you have the SD card mounted as a disk (usb to computer) you will revert back to the stock ringtones and alarms. Freaked me out at first since somebody called me while I had my phone in disk mode and the ringer wasn't one I was accustomed to.
View 7 Replies View RelatedI wanted to create a thread that will help new users to Android with settings through out the phone. Most phones have all the settings with in a control panel or in a main location. As for Android this is true of main settings for the phone but you will also find settings with in the built in applications as well. From past experience on other Android forums there are always tons of threads created for "HOW DO I find the settings for x". Simply put. If you are looking for settings for an application, even the built in ones, use the menu button in that application. Most of the time you will find settings.
I have compiled most of the Tips, Questions, and Answers from this forum and added them to the first post. Thanks to all the users out there New and Experienced that have helped us build this list. Please read fully before posting your question. If you don't find it here post it! We will respond when we can.
TIPS:
A. Adding Ringtones, Alarms, and Notifications to EVO (Thanks Companyman!):
1. On your SD card make a folder called Media (if it's already there skip step)
2. In the media folder make a folder called audio
3. In the audio folder make a folder called "ringtones", "alarms", and "notifications"
4. Put any ringtones that you want in these folders.
B. If you want to make a contact show up in the "Favorites" widget do this: (Thanks Companyman)
1. Go into the People application and select your contact
2. Select the "Edit" function near the bottom of the page (might have to scroll down to see it)
3. Under the "Group" section select the Favorite group
C. If you want to change the default action that occurs when you select a contact from the Favorites widget: (Thanks Companyman)
1. Go into the People application and select your contact
2. Click on the Menu button near the bottom of your phone
3. Select the "More" option
4. Click on the "Set widget action"
5. Select whatever action you want.
D. When your phone is ringing, if you flip it over, it will silence the ringer. (Thanks kimreichle)
E. To access the SD Card on the phone you have to use a file manager. I like Astro File Manager myself. Gives you lots of options to manage the card.
F. Accounts & Sync (Thanks Bek)
Menu -> Settings -> Account & Sync
- All system managed accounts are here & you can tweak all sync settings for each account here. Very useful, especially if you're having poor battery drain.
Exchange or non gmail mail Settings (from inbox of account):
menu/more/settings
Keyboard Settings:
Menu/Settings/Language & keyboard
Internal Browser:
menu/more/settings
GMail:
Menu/settings
Questions & Answers:
Q. How do I set the backlight to stay on while on power?
A. Menu/Settings/Applications/Development/Stay awake. You can check this too keep the phone awake.
OR
Menu/Settings/Sound & Display Then browse for Screen Time Out.
Q. Do I have to go thru android market to get new apps?
A. You can download apk files and load them to the SD Card and use astro filemanager to install Directly. I would recommend the Market though. You can uninstall from there as well.
Q. How do i make the alert tone for an incoming email, different from a text message?
A. From the All Messages window in the text messaging application select Menu/Settings/Notification sound.
Q. I can't for the the life of me turn off the haptic feedback that vibrates when typing on the keyboard.
A. From the main home Screen:
Menu/Settings/Language & keyboard/Touch Input/Text input then uncheck Vibrate when typing.
Q. On my BB I had all of my mail, IM, Facebook, SMS, MMC and everything in one place for reading. Is that possible with the Evo?
A. Not with the built in apps that come with the phone. There Might be another app out there though, I don't know. Maybe someone else knows this?
Q. Anybody know if there's a way to uninstall some of the HTC/Sprint software that came installed on my EVO?
A. As far as I understand it the only way to uninstall the preinstalled sprint applications is to have root access to the phone. (Thanks Companyman)
Q. Long time windows user and would like to know how to delete all texts and/or email at the same time (delete all)
A. Delete all emails at the same time: I don't think it's currently possible in the Gmail app. You can use a web browser, go to gmail and use the select all feature there to delete all the emails. (Thanks Companyman)
Q. How to change the weather update to less than one hour?
A. Go to your "Settings" menu. Click on "Accounts & sync"
Then select "weather" all the way at the bottom. Click Account settings. There is your update frequency. (Thanks Companyman)
Q. Is there anyway to calibrate the screen?
A. Menu/Settings/Language & Keyboard/Touch Input/Text Input There are 2 tools here:
1. Calibration Tool
2. Reset calibration
Q. When sending text messages, is there a way to send the text from the message window without having to hit the button to make the keyboard disappear and then hit the send button?
A. The send button should be to the right of the text window even if the keyboard is up, at least in Portrait mode. In Landscape you either have to hit menu and send or just minimize the keyboard.
Q. Is there's a way i can delete my custom scenes I have saved..?
A. From the Main Window, Menu/Settings/Personalize/Scenes
Select the scene you want to delete. Hit Menu Delete.
Q. Is there any way to make it so that you can push one of the buttons on the outside of the phone to stop your phone from ringing?
A. Not that I know of but check this out. If you take the phone and turn it over the ringer will silence. (I love that feature!)
Q. How do i get to the download history page?
A. While in the browser click menu/more/History
Q. How can I tell if my phone is root?
A. That usually depends on the root process you used. You could try to load a program that requires root like wi-fi tether, if it works then then I would say your rooted.
Q. Does anyone know how to turn off/change the "green Android Robot" picture that pops up when you're trying to make a phone call?
A. The way to change the Android pic is to assigned the person your calling a picture in your contacts. If the number is not from a contact then I am afraid you are stuck with the little green monster unless you root and someone builds a rom without him.
Q. What format do the ringtones have to be? Mp3
A. Yep. I think there might be a few other file types too....but I use MP3.
Q. I added a couple new folders to my home page but can't figure out how to name them, they just say folder. Is there a way to do this?
A. Open the folder. Long press on the top of the folder window.
Rename.
Q. Is there any way to make one of the side buttons activate the shutter for the camera? I was trying to take a picture of my lady and me and it was a pain to try and press the on-screen shutter button.
A. Not that I am aware of but there is a self timer you can set up. That might help ya. With the camera open hit the tab to the left. Click the hears in the left corner. Scroll till you find self timer.
Q. Does anyone now how I can silence emails but have a notification sound for texts?
A. Well that depends. Text msg do use a separate notification so it can be done. You can turn off exchange and pop mail from within the internal mail app. Once there click menu/settings/notification settings. Uncheck the box for notification sound. For GMail, hit menu/settings and Uncheck email notifications.
Q. How do i get my nicknames for contacts to be displayed on my device?
Nicknames were done on gmail account.
A. It seems there is no place for that on the EVO. Looks like the contact card on the phone doesn't support it. I will keep looking for a way though.
Q. Is it possible to have a different wallpaper on the lockscreen from your home screen?
A. Seems that is not available in this build of 2.1. In others I have used you could. If you or anyone else finds this to not be true let me know. As of right now it seems the same wallpaper for the home screen works for the lock screen as well.
Q. I have a folder that I named GAMES. How do I put my game apps in there? Is it even possible?
A. Make sure your focus is on the home screen with the folder, bring up the all programs window (up arrow in bottom left) and find the game you want to add. Long press on the game and hold. You will see your games folder and home screen. drag the game to the games folder.
Q. Lost my favorites Widget, how can I get it back?
A. Click the + then Widget/people/ choose the style you want then select the group you want to display. If you don't have the group you are looking for you can add them using the computer too in GMAIL on your browser.
Q. I was wondering how to "star" someone?
A. Those would be whoever is listed in your Favorites group. So you can create and add users in the people application. Open Up People, Select Groups, Select the group you want to add contacts too. You should be able to add contacts from there.
Q. Is there a way to change the 'me' display name in text mesging conversations?
A. Nope
Q. How do I link only certain phone contacts to facebook?
A. If you go into People and find her contact and tap on it near the top it should have an icon that says link and it should ask you what you want to link the contact with ie: Facebook. You might need to have Facebook set to sync with your other contacts though too but maybe not I haven't tried the way you are thinking. (Thanks Noodle3)
Q. Is it possible to change the name of your shortcuts/icons?
A. Sounds like a Job for anycut (Free). There are options for paid versions as well that will give you more control.
Q. Can you change the storage location for apps?
A. I don't think so unless the app has a way to change were it stores its data built into the app. For those you have to leave default or the app will just re-create the original folder.
Q. Is there an easier way to get from any screen to the "apps" screen?
A. For this there are several options. What I like to do is create folders on one of my home screens with categories for my apps, like gps apps, media, internet, office and so on. While on that home screen hit the arrow button to bring up all apps and long press the first app in the list. You will see your home screen come back and you can place that application into the folder of your choice. It makes it so you click on the folder and only see the apps for that item. You can arrange it anyway you like which is very helpful. I almost never use the all apps screen anymore.
Q. Is there a way to make folders in the pictures gallery? On my bb, i use to have folders like, Pets, family, etc..
A. YES! Easiest way is to connect your EVO to your computer and connect as a Hard Drive. Then you can create a picture folder. Then inside that create whatever folders you want. Move the pics to them. Disconnect from the computer. Bring up the gallery. You will still see all pics but you will also see your folders with the pictures you put in there. ;-) When you first bring up the gallery after doing this it may take it a min or two to create and build the folders if you have a lot of images...just close and reopen. You can also use Astro File Manager to do this on the phone.
Q. How do I save my MMS pics to a different folder? It's only letting me save to "All downloads" and I dont want to save it there, how can I save it to a folder that I have created on my SDcard?
A. I don't think you can change the download folder. But what you could do is install Astro File Manager and use that to move the picture once its downloaded to the folder of your choice.
Q. Can I hide files and folders on the SD card?
A. Load Astro File Manager. When you first load it you will see files on the card that have a period in front of the name. Those are hidden system files. You can add a folder. Name it with a period in front of the name. Then from the top of astros menu choose View/Set Directory Options and uncheck Show Hidden Files. This will hide the folder and its contents from the phone apps. When you are ready to see them again just check that box and then rename the folder without the period.
Q. How do I set custom notification ringtones for each of my contacts?
A. You can not do this with the stock SMS application, but! you can do this with Handcent. Its a free application from the market and has many many customizations. To set personal RT for each contact in Handcent: Goto the contact messaging thread in Handcent, Select the little gear in the top right hand corner of the window. Then select Notification settings. Set the Ringtone for that person there. You can test the ring tone as well.
Q. When I select the contact list for a new message, I get hundreds of listings. I get 3 or 4 for each person sometimes too. It will list all of their phone numbers and email addresses from my contact list, gmail, and facebook. How do I get this list to be the same as my People list and only show their mobile phone numbers?
A. This was a bug that was introduced in Android 2.1. I had the same issue with my Droid Eris and Sprint Hero. All we can do on that one is hope that it gets fixed with 2.2.
Q. If I am using the Sprint network outside of home, come home and get on my wifi, am I still on the Sprint 3G network, or do I need to turn it off?
A. 3G should go into standby mode when using wifi....but if you are using wifi, I would just turn off 3G using the mobile widget. No need for it to run while on wifi.
Q. Can you attach an Mp3 to your gmail?
A. Yes! Download an app called Astro File Manager. Then when you go to add an attachment you can select astro and attach anything in your SD Card including MP3's. Tested and works.
Q. How do I make a new folder on my memory card, or I should ask is it possible to do through the phone itself, or do I have to set it up through my laptop?
A. 1. Through the laptop: Connect your USB cable to the phone and the computer. Select Disk Drive if you are prompted to connect to the computer. If you are not prompted then drag your top bar down and select Charge Only then select Disk drive. This will allow your computer to see the SD Card. You can create folders that way just like you do in Windows.
2. Using the phone: For this you will need a file manager that you can download from the Market. The one I like the best is Astro File Manager. It has a ton of functionality and the best part is you can create folders and move files around without connecting to the computer. Once Astro is Loaded open it up. Hit Menu/New. That's it!
Q. Is there a way to put a bookmark in a folder?
A. Yes you can. Create the folder. Then click the + and select shortcut then select bookmark. From there you choose the bookmark you want. Then drag the bookmark to the folder.
Q How do I set up a group for mass texting on my Droid?
A. Open up your contacts app,
All Apps/Contacts
Use the slider to open up groups
You will see groups already listed there.
To add a Group:
Menu/Add Group
To add contacts to a group:
Select the group then hit menu/add group member
Once you have set up your contacts you can then select groups in the TO: section of a new message.
IS there an alarm clock app then lets you set more then 3 alarms at a time?
View 2 Replies View Related