X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Ffonbot%2FFonBotApplication.java;h=af5a70c2ac69c236d22c5a4351bf38f6277f687b;hb=6b9507db27500572e4366b3f23eefeea079a9d8f;hp=46a0328fb716ddd2c015cdfaf316d328665443be;hpb=8dfb76c9431dbf8401412cb92c7512e7dc3081a2;p=fonbot.git diff --git a/src/ro/ieval/fonbot/FonBotApplication.java b/src/ro/ieval/fonbot/FonBotApplication.java index 46a0328..af5a70c 100644 --- a/src/ro/ieval/fonbot/FonBotApplication.java +++ b/src/ro/ieval/fonbot/FonBotApplication.java @@ -36,28 +36,19 @@ public final class FonBotApplication extends Application { * iEval GCM sender id */ public static final String GCM_SENDER_ID = "379674287523"; - /** - * The one instance of FonBotApplication - */ - public static FonBotApplication instance=null; - /** - * The GCM registration ID - */ - public String regID=null; @Override public void onCreate() { super.onCreate(); //GCMRegistrar.checkDevice(this); - regID=GCMRegistrar.getRegistrationId(this); + final String regID=GCMRegistrar.getRegistrationId(this); if("".equals(regID)) GCMRegistrar.register(this, GCM_SENDER_ID); final TelephonyManager tman=(TelephonyManager) getSystemService(TELEPHONY_SERVICE); tman.listen(new FonBotPhoneStateListener(this), PhoneStateListener.LISTEN_CALL_STATE); - instance=this; - new PollServerAsyncTask().execute(); + Utils.pollServer(this); startService(new Intent(this, FonBotMainService.class));