mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-26 07:58:52 +01:00
include game name in notification text
This commit is contained in:
parent
469f63f96f
commit
f56b09980c
2 changed files with 14 additions and 7 deletions
|
@ -1500,7 +1500,7 @@
|
|||
device, and the body that appears when you pull the notifications
|
||||
down. -->
|
||||
<string name="notify_title">Moves made</string>
|
||||
<string name="notify_body">New game moves have arrived</string>
|
||||
<string name="notify_bodyf">Activity in game "%s"</string>
|
||||
|
||||
<!--
|
||||
############################################################
|
||||
|
|
|
@ -60,12 +60,19 @@ public class RelayService extends Service {
|
|||
|
||||
private void setupNotification( String[] relayIDs )
|
||||
{
|
||||
Intent intent = new Intent( this, DispatchNotify.class );
|
||||
intent.putExtra( DispatchNotify.RELAYIDS_EXTRA, relayIDs );
|
||||
|
||||
for ( String id : relayIDs ) {
|
||||
Utils.postNotification( this, intent, R.string.notify_title,
|
||||
R.string.notify_body, id.hashCode() );
|
||||
for ( String relayID : relayIDs ) {
|
||||
long[] rowids = DBUtils.getRowIDsFor( this, relayID );
|
||||
if ( null != rowids ) {
|
||||
for ( long rowid : rowids ) {
|
||||
Intent intent = new Intent( this, DispatchNotify.class );
|
||||
intent.putExtra( DispatchNotify.RELAYIDS_EXTRA,
|
||||
new String[] {relayID} );
|
||||
String msg = Utils.format( this, R.string.notify_bodyf,
|
||||
GameUtils.getName( this, rowid ) );
|
||||
Utils.postNotification( this, intent, R.string.notify_title,
|
||||
msg, relayID.hashCode() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue