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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -