Setting interval to set for service

by sunitha » Wed, 11 Nov 2009 23:01:28 GMT


Sponsored Links
 Hi

I have to develop a service which runs in background. I do need to
keep some logic in the service to run for every 10 minutes. Is there
any way to set time interval.

--



Setting interval to set for service

by RichardC » Wed, 11 Nov 2009 23:05:15 GMT


 AlarmManager see:
 http://developer.android.com/reference/android/app/AlarmManager.html 

Also if you are waking the phone every 10mins to run your service you
will really drain the battery as the phone takes a while to go back to
sleep again.

--
RichardC




--


Sponsored Links


Other Threads

1. Problem in loading Menu Button

Hi

i hav created XML for the menu layout and i am inflating the same, the code
doesnt give any compilation errors but when i click on menu button menu wont
appear, here is the code :

public boolean onCreateOptionMenu(Menu myMenu)
{
super.onCreateOptionsMenu(myMenu);

//addRegularMenuItems(myMenu);

this.myMenu=menu;
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu );

return true;
}



menu.xml is like this which is placed inside res/menu



<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/menu"
<group
android:id="@+id/grour_menu" >
<item
android:id="@+id/list_menu"
android:title="List"
android:orderInCategory="0" android:visible="true" android:enabled="true"
android:menuCategory="system"/>

<item
android:id="@+id/find_menu"
android:title="Find"
android:orderInCategory="1" android:visible="true" android:enabled="true"
android:menuCategory="system"/>

<item
android:id="@+id/help_menu"
android:title="Help"
android:orderInCategory="2" android:visible="true" android:enabled="false"
android:menuCategory="system"/>

<item
android:id="@+id/mylist_menu"
android:title="My List"
android:orderInCategory="3" android:visible="true" android:enabled="false"
android:menuCategory="system"/>
</group>
</menu>


please help me out in solving the problem

-- 
Bharath B.G.

--~--~---------~--~----~------------~-------~--~----~

2. 鍥炲: How can I add a back ground image for ListView

yeah there is an attribute background that can be used to set background
image

2009-Aug-1 6:08 PMquot;Michael Leung" <michaelchi...@gmail.com> 

Should you set the layour which contain listview background image?





--~--~---------~--~----~------------~-------~--~----~

3. Warning before exiting app?

4. Changing the "More" icon drawable

5. WHY?!Touch the screen opengl change to slow,please help me!

6. RampUp the binding b/w Activity & Service

7. Start Activity With Long Press of Home Key