Skip to content Skip to sidebar Skip to footer

Android, My Service Wont Start

I have been trying to set up a polling system that grabs data from a server one every day. So my plan is to setup AlarmManager so that it starts my service 12:00 every day and the

Solution 1:

register your service in android Manifest.xml file


Solution 2:

Probably it's your call to startService try something like this instead:

   Intent intent = new Intent(mContext, notificationService.class);
   startService(intent)

It looks like your call to startService() has some test code in it?


Solution 3:

Hazarding a guess...perhaps you are missing a needed permission?

http://developer.android.com/reference/android/Manifest.permission.html

String  SET_ALARM   Allows an application to broadcast an Intent to set an alarm for the user.

Solution 4:

if your trying to access a server... you need to add

<uses-permission android:name="android.permission.INTERNET"/>

to the manifest or most likely the intent will fail silently


Post a Comment for "Android, My Service Wont Start"