Can't toast on this thread.
// FREEBIE
This commit is contained in:
parent
e53bbe8453
commit
8726dd51be
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ public class GcmRegistrationService extends Service implements Runnable {
|
||||||
int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
|
int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
|
||||||
|
|
||||||
if (result != ConnectionResult.SUCCESS) {
|
if (result != ConnectionResult.SUCCESS) {
|
||||||
Toast.makeText(this, "Unable to register with GCM!", Toast.LENGTH_LONG).show();
|
Log.w(TAG, "Unable to register with GCM! " + result);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String gcmId = GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID);
|
String gcmId = GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID);
|
||||||
|
|
Loading…
Add table
Reference in a new issue