mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
onResume() can be called for various reasons ( task switch, etc ). Make sure the registration was received to avoid "Missing registration id".
This is not a complete fix - we should avoid making registration requests when one is already in progress.
This commit is contained in:
@@ -77,7 +77,7 @@ public class MainActivity extends Activity {
|
||||
if (mPendingAuth) {
|
||||
mPendingAuth = false;
|
||||
String regId = C2DMessaging.getRegistrationId(this);
|
||||
if (regId != null) {
|
||||
if (regId != null && !"".equals(regId)) {
|
||||
DeviceRegistrar.registerWithServer(this, regId);
|
||||
} else {
|
||||
C2DMessaging.register(this, DeviceRegistrar.SENDER_ID);
|
||||
|
||||
Reference in New Issue
Block a user