import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
-import com.google.android.gcm.GCMRegistrar;
-
/*
* Copyright © 2013 Marius Gavrilescu
*
* 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);
- 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(this).execute();
startService(new Intent(this, FonBotMainService.class));