Android :: Detecting Android Usage Inactivity And Setting A Future Alarm - Intent To Trigger
Sep 15, 2010
I have a repeating alarm setting, I have the activity being launched, the piece I'm missing is having this triggered after x minutes of inactivity.
I'm considering keying off of SCREEN_OFF in a service and then setting an alarm and canceling it on SCREEN_ON, does anyone have an intent or other suggestion for this. I've considering polling for tasks, all kinds of pieces but I'm stuck.
Requirement:
- App launches, alarm is set to relaunch app after 5 minutes, user exits/app exits after one minute
- alarm triggers, detects phone is in use, resets alarm to trigger in fives minutes
- if phone is idle relaunches app for one minute
View 1 Replies
Dec 14, 2009
As in android, after inactvity of screen off timeout, android screen goes off. So here android itself uses some activity observer, to know whether user is currently active or not. I need not every keystroke or touch event with details, just knowing that user is active and getting a broadcastreceiver after some timeout value. Does anybody know something related to activity observing ? I got the code from in frameworks where it broadcast, but I am still figuring out code in android that monitors user activity.I am open to modify code frameworks too. || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare Rama Hare Rama Rama Rama Hare Hare ||
View 2 Replies
View Related
Apr 9, 2009
I want to expose a portion of my app with an intent that will only display a simple dialog box for system setting. The only way I currently know how to do this is to have an activity that accepts an intent. In the activity I don't use setContentView. I only create and show the dialog. The activity is finished after you press OK from the dialog.
This is kind of okay, but the activity shows as a black backdrop under the dialog, until you press OK which brings you back to the last application. I'd like to just be able to show the dialog on top of the calling Activity. Any idea on how this can be done? CAN it be done?
View 3 Replies
View Related
Jun 13, 2010
I've been searching a way to implement an intent so when a user clicks on a notification, an specific method from an activity is executed (or an specific behavior happens). Right now I'm thinking about using broadcast but I don't know if this is the best way to implement this functionality. How would you implement it?
View 6 Replies
View Related
May 9, 2010
Is there some way to setup a reminder on this phone. essentially an alarm for a future day/time? I don't want to have to fill out a whole appointment - just setup a reminder..
View 4 Replies
View Related
Apr 9, 2013
I 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]
View 2 Replies
View Related
Mar 12, 2010
Can anyone say me the main difference between intent and pending intent? And their usage in application with example.
View 2 Replies
View Related
Jun 15, 2010
I have a widget (http://www.appbrain.com/app/ net.hubalek.android.worldclock) that has option to invoke alarm clock settings. Does anybody know what is the intent that I have to invoke for MotoBlur?
View 5 Replies
View Related
Aug 16, 2010
In my application i have created pending intent which calls another activity (after 20mins of alarm off) with the help of alarm manger. It should happen each time for each new pending intent or when I call that activity. But when i create one pending intent and after few mins again create new pending intent ,then the last one overlap the other previous pending intents and start specified activity only for ones for the last pending intent.I want that each time i create any pending intent it should start specified activity after 20 mins of it's alarm off time.How it can be done ?
View 7 Replies
View Related
Dec 17, 2009
I am using marks' method of alarmreceiver and appservice. I am trying to pass a record id to the alarmintent through putextra and receive it in ontimealarmreceiver in getExtra. What I observe is, first time record id goes correct (say 11) second time record id is sent 12, but in receiver I receive record id = 11. Third time too record id -11
View 2 Replies
View Related
Jan 18, 2010
Can we set a wma song as alarm ringtone? I set a wma as alarm ringtone but it is playing the different one but it is working fine with mp3.
View 2 Replies
View Related
Oct 23, 2010
I want to active and deactive the GPS when I touch a button, without I must run the intent that bring me into setting menu for active or deactive GPS.
View 2 Replies
View Related
Mar 5, 2010
I wanted to set the Gentle alarm application as my primary app when it is placed into the seidio multimedia station. It goes straight to the droid multimedia mode, then i have to switch over to the gentle alarm. I cant find any setting to make this happen.
View 4 Replies
View Related
Apr 10, 2009
I understand that userland apps on android cannot set the system clock. Wanting to know more about how the security mechanism is set up for the system I did some digging around in the source code.
/dev/alarm is opened R/W to set the system clock using SystemClock.setCurrentTimeMillis.
How the permissions work to determine whether or not an application has permission to set the clock.
I assume it's just a user level permission, and the write bit for /dev/ alarm is only enabled for the "system user" and not the "userland user" applications run under.
View 2 Replies
View Related
Sep 9, 2010
On my nexus one, there is a handy app reachable from Settings > About Phone > Battery use.
I'd like to StartActivity() that app from one of my Activities.
I can see in the log that when Settings runs it, this intent is logged:
Starting activity:
Intent { act=android.intent.action.MAIN cmp=com.android.settings/.fuelgauge.PowerUsageSummary }
I'm having trouble relating that to something in Android Java source. I can't even find "fuelgauge" in the GIT source.
View 1 Replies
View Related
Apr 30, 2010
I have one WidgetProvider but expect the user to have multiple instances of the widget on the home screen. When the user clicks on the widget, an intent is fired to start an activity A passing a String extra (which is specific to that instance of the app widget). Everything works fine unless the activity is already running, in which case the activity is shown in its previous state (and so the intent extra data is ignored). I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK) but they don't seem to help.
View 4 Replies
View Related
Jan 11, 2010
I'm trying to catch an action like ACTION_HEADSET_PLUG. But I think it might be too much to set this action on the manifest file.
How could I register a listener for this action? I only need to care about it when my application is running not all the time as I think it would happen when registering it under the manifest file...
View 4 Replies
View Related
Apr 10, 2010
In my android app, I'm setting an alarm that I want to occur repeatedly, hence using AlarmManager.setRepeating().
I don't want to keep track of whether the alarm is set myself (sounds like a bad idea that's prone to fail at some point), and there seems to be no API support for checking whether a particular alarm is already set for a given Intent.
Hence, I am pessimistically resetting the alarm each time my app activates:
alarmManager.cancel(pendingIntent);
...
alarmManager.setRepeating(..., pendingIntent);
Question: is calling setRepeating() idempotent i.e. do I need to explicitly cancel() any prior alarm or can I safely just call setRepeating() and be done with it?
View 1 Replies
View Related
Aug 3, 2010
I have a program that sends a broadcast Intent that needs an "extra" value.The value is declared as being of type Object[], though I know that the elements are always of type Integer or String.That's part of an API not under my control. What's the most concise and/or efficient way to do the equivalent of the putExtra call below?
View 6 Replies
View Related
Nov 17, 2010
I want this same behavior even when the app is in the foreground but user doesn't interact with the app for a long-time say 6-7 mins... Assume the screen is ON all the time... I want to detect kind of USER INACTIVITY (No interaction with app even though the app is in the foreground) and kick start my count down timer.
View 4 Replies
View Related
Dec 6, 2009
Location & Security Settings --> Use wireless networks (location determined by WiFi and or mobile networks). Does this feature use up resources and/or battery?
View 3 Replies
View Related
Aug 27, 2010
How can I put my own alarm sound? I mean music/song?
View 1 Replies
View Related
Jul 21, 2010
The calendar on desire is great, but it won't let me make entrants without setting an alarm...I don't want an alarm going off everytime its a member of my families birthday! Is there a calendar app I could get, that won't do this?
View 4 Replies
View Related
May 6, 2010
They all scare out of me when they go off, is there a way of setting a tune thats more calming in the morning
View 13 Replies
View Related
Dec 24, 2012
I'm looking for an app that turns your device off after say 6 hours of inactivity?
View 1 Replies
View Related
Jun 26, 2010
I used to be able to sleep my evo just by pressing the power button. Now I have to wait until the inactivity timer kicks in before the screen goes black. If I wake it up using the button and fail to slide to unlock then I can get it to sleep by pressing the top button as usual. I installed "spare parts" and had to force a delete because of several hangs and weirdness. Now I have this sleep problem.
View 4 Replies
View Related
Mar 9, 2010
I tried several alarm clocks on my droid, and they all seem to have a problem. if I set alarms for 6:30, 6:41, and 6:52 am. Each with a different sound. If i snooze alarm 1, alarm 2/3 never goes off. i thought all 3 would be seperate, but it seems only 1 can be active at a time. unless im doing something wrong. this happens on the default alarm clock and, better alarm clock.
View 2 Replies
View Related
Jun 22, 2010
I am using service class to play the mp3 file using media player object on Android platform, problem is, i am not able to handle the alarm interruption.When any previous set alarm clock reach to it's alarm time it starts to play in parallel with mp3.I want that mp3 should become paused and after alarm it again start to play,same thing should happen with snooze.
View 1 Replies
View Related
Nov 17, 2009
With being a wireless industry professional for 15 years now, I have come across many different types of devices, OS's, just about it all.I wanted to love Windows mobile couldnt take the constant crashing.I wanted to love the Palm 650 well, I wont even go into that.I gave Symbian (Nokia E61) about a minute with good intentions before I was bored.I loved my BlackBerry for years feel like they are old school now.I would never use AT&T again, so the iPhone is out love my iPod Touch though.Having just gotten my first Android device, I can honestly say that while I am very impressed with the OS and its capabilities, I long to understand some of the things left out of ANY of these operating systems.
View 3 Replies
View Related
Jul 21, 2010
As far as I'm aware the standard alarm clock will not alarm when the phone is switched off. Does anybody know an alarm clock that will alarm when the phone is switched off ...? (preferably free)
View 2 Replies
View Related