mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +01:00
look for values in msg sent from server, including one that puts up a
message via a notification.
This commit is contained in:
parent
2c339ed7a5
commit
1e13d6ac6c
1 changed files with 17 additions and 1 deletions
|
@ -52,7 +52,23 @@ public class GCMIntentService extends GCMBaseIntentService {
|
|||
protected void onMessage( Context context, Intent intent )
|
||||
{
|
||||
DbgUtils.logf( "GCMIntentService.onMessage(%s)", intent.toString() );
|
||||
RelayReceiver.RestartTimer( context, true );
|
||||
boolean doRestartTimer = true; // keep a few days...
|
||||
String value = intent.getStringExtra( "msg" );
|
||||
if ( null != value ) {
|
||||
doRestartTimer = false; // expected key means new format
|
||||
|
||||
String title = intent.getStringExtra( "title" );
|
||||
Utils.postNotification( context, null, title, value, 100000 );
|
||||
}
|
||||
|
||||
value = intent.getStringExtra( "getMoves" );
|
||||
if ( null != value && Boolean.parseBoolean( value ) ) {
|
||||
doRestartTimer = true;
|
||||
}
|
||||
|
||||
if ( doRestartTimer ) {
|
||||
RelayReceiver.RestartTimer( context, true );
|
||||
}
|
||||
}
|
||||
|
||||
public static void init( Application app )
|
||||
|
|
Loading…
Reference in a new issue