android.intent.action.TIME_TICK - Has anyone used it?

by simonc » Wed, 01 Apr 2009 19:41:49 GMT

Sponsored Links
 I'm trying to get an application / reciever / anything that can
perform a task once every minute. I'm trying to use the intent-filter
"android.intent.action.TIME_TICK" which, in theory, sends an Intent
message every minute.

Does anyone have any code that uses the
android.intent.action.TIME_TICK intent? I can't seem to get it to send
the intent to my application and I can't find anything much on the
internet. Has anyone used it successfully?

I have a manifest.xml as below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="" ;
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.SET_TIME_ZONE" /
    <application android:icon="@drawable/icon" android:label="@string/
        <activity android:name=".xxxApp"
                <action android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />
        <receiver android:name=".xxxRecvr"
                <action android:name="android.intent.action.TIME_TICK"/

android.intent.action.TIME_TICK - Has anyone used it?

by Mark Murphy » Wed, 01 Apr 2009 19:45:34 GMT


That seems harsh for battery life, but maybe there's more to this that
I'm not privy to.

Per the documentation:

"You can not receive this through components declared in manifests, only
by exlicitly [sic] registering for it with Context.registerReceiver()."

In your case, you are trying to receive this through a manifest-declared
receiver, which will not work.

Either switch to a registerReceiver() implementation, or use AlarmManager.

Mark Murphy (a Commons Guy)  | 

Android App Developer Training: 


Sponsored Links

Other Threads

1. Aksesoris untuk Magic (Screen protector,dll

Pagi semua, numpang nanya lagi ya :)

Rencananya hari ini saya mau jalan-jalan sekalian nyari aksesoris buat
si Magic. Rencana mau nyari screen protector sama silicon case. Ada
yang udah punya dan recommended? Merknya apa ya & belinya di mana?
Terus untuk screen protector katanya yang bagus yang anti-glare yah.
Kalau udah pakai screen protector nanti apakah sensitivitas touch
screen jadi berkurang??

Terima kasih. Salam android!

 * @Name Rayhan
 * @GTalk saviourcat
 * @Yahoo md_ray
 * @Twitter md_ray
 * @SentFrom web

Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group, please visit the following page:

2. java.util.prefs.Preferences doesn't "work" on device?

My simple app needs to permanantly save its state before being
I use something like this:
private static final Preferences prefs = Preferences.userNodeForPackage

Now it seems that after experimenting a while on my g1 device, it
seems that preferences are sometimes cleared when the application
stops, from my experience this happens at random and there is a
roughly a 50% chance that preferences will be cleared.
This does not happen in the emulator, and certainly should not in the
Java world as far as I know since preferences are permanent type of
storing data.

Is there a way to use java.util.prefs.Preferences on Android platform
without risking clearing the prefs every time the app is stopped? I
don't want to use a file or database.


3. Problem to count number of days between Two dates...

4. Start judging ADC2 Apps

5. Problem sending special signs through TCP/IP to Android Phone

6. Computational cost of calling getReadableDatabase or getWriteableDatabase?

7. Question about GoogleSearch.apk and "android.process.acore"