add message via GCM to check for wordlist/app upgrades

This commit is contained in:
Eric House 2012-11-26 18:47:35 -08:00
parent e590db5f3f
commit b433438022

View file

@ -56,7 +56,18 @@ public class GCMIntentService extends GCMBaseIntentService {
@Override @Override
protected void onMessage( Context context, Intent intent ) protected void onMessage( Context context, Intent intent )
{ {
String value = intent.getStringExtra( "msg" ); String value;
value = intent.getStringExtra( "getMoves" );
if ( null != value && Boolean.parseBoolean( value ) ) {
RelayReceiver.RestartTimer( context, true );
}
value = intent.getStringExtra( "checkUpdates" );
if ( null != value && Boolean.parseBoolean( value ) ) {
UpdateCheckReceiver.checkVersions( context, true );
}
value = intent.getStringExtra( "msg" );
if ( null != value ) { if ( null != value ) {
String title = intent.getStringExtra( "title" ); String title = intent.getStringExtra( "title" );
if ( null != title ) { if ( null != title ) {
@ -64,11 +75,6 @@ public class GCMIntentService extends GCMBaseIntentService {
Utils.postNotification( context, null, title, value, code ); Utils.postNotification( context, null, title, value, code );
} }
} }
value = intent.getStringExtra( "getMoves" );
if ( null != value && Boolean.parseBoolean( value ) ) {
RelayReceiver.RestartTimer( context, true );
}
} }
public static void init( Application app ) public static void init( Application app )