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. Advertising Secrets

Page Rank counts the number of links coming to your site from other
sites. The theory is this means your site is more respected, and more
useful, than others. It also puts an emphasis on older sites -
therefore links from sites that themselves have a high pagerank and
age will effect yours more beneficially.


2. OS Updates from Cell Provider Only?

It appears as though the only way to get OS updates is via my cell
phone company, is that correct?  It's not like a phone where you plug
it in to your PC and update on your on terms?

If so that is very concerning.


3. Nexus.02, Can you hear me now?

4. Change item in Listview after clicking

5. Best practise for storing app. Configuration

6. dex.jar not loaded from SDK folder

7. How to manually install APK on real phone?