Service is not starting up in android -


i using following code

startservice(new intent(loading.this, appservice.class));   public class appservice extends service  {            private timer timer;      @override     public ibinder onbind(intent arg0)      {         return null;     }      @override     public void oncreate()     {         timer = new timer();         timer.scheduleatfixedrate(new timertask()          {             @override             public void run()              {                 sharedpreferences customsharedpreference = getsharedpreferences(                           "usersharedprefs", activity.mode_private);                 boolean isloggedin = customsharedpreference.getboolean("isloggedin", false);                 if (isloggedin)                     updatecontact();             }         },0 , 120 * 1000);       }      @override     public int onstartcommand(intent intent, int flags, int startid)     {         return service.start_not_sticky;     }       @override      public void ondestroy()       {          super.ondestroy();          timer.cancel();          timer = null;            } 

nothing happening , debugger won't enter in service. no oncreate or other thing getting called.

probably don't have service in manifest. examining logcat (via adb logcat, ddms, or ddms perspective in eclipse) should turn warnings may help.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -