mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
post actual notifications (with text yet to be improved)
This commit is contained in:
parent
5230593276
commit
9e763b4049
5 changed files with 16 additions and 3 deletions
|
@ -1605,6 +1605,9 @@ public final class R {
|
|||
/** Text of progress indicator shown while check is being conducted
|
||||
*/
|
||||
public static final int msgs_progress=0x7f06009d;
|
||||
/** Nagging
|
||||
*/
|
||||
public static final int nag_title=0x7f0602c5;
|
||||
public static final int name_dict_fmt=0x7f060086;
|
||||
/** text of checkbox. If this checkbox is checked, games created
|
||||
for network play will by default have the hint feature
|
||||
|
|
|
@ -2265,4 +2265,7 @@
|
|||
|
||||
<string name="force_tablet_title">Force tablet layout</string>
|
||||
<string name="force_tablet_summary">Even if my screen is too small</string>
|
||||
|
||||
<!-- Nagging -->
|
||||
<string name="nag_title">Make your move already</string>
|
||||
</resources>
|
||||
|
|
|
@ -1937,4 +1937,6 @@
|
|||
tahw\'s elbaliava.</string>
|
||||
<string name="force_tablet_title">Ecrof telbat tuoyal</string>
|
||||
<string name="force_tablet_summary">Neve fi ym neercs si oot llams</string>
|
||||
<!-- Nagging -->
|
||||
<string name="nag_title">Ekam ruoy evom ydaerla</string>
|
||||
</resources>
|
||||
|
|
|
@ -1937,4 +1937,6 @@
|
|||
WHAT\'S AVAILABLE.</string>
|
||||
<string name="force_tablet_title">FORCE TABLET LAYOUT</string>
|
||||
<string name="force_tablet_summary">EVEN IF MY SCREEN IS TOO SMALL</string>
|
||||
<!-- Nagging -->
|
||||
<string name="nag_title">MAKE YOUR MOVE ALREADY</string>
|
||||
</resources>
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.eehouse.android.xw4.DBUtils.NeedsNagInfo;
|
|||
public class NagTurnReceiver extends BroadcastReceiver {
|
||||
|
||||
private static final long INTERVAL_MILLIS = 1000 * 30; // every half minute for now
|
||||
private static final long NAG_INTERVAL = 1000 * 30; // 90 seconds for now
|
||||
private static final long NAG_INTERVAL = 1000 * 60 * 30; // 90 seconds for now
|
||||
|
||||
@Override
|
||||
public void onReceive( Context context, Intent intent )
|
||||
|
@ -47,8 +47,11 @@ public class NagTurnReceiver extends BroadcastReceiver {
|
|||
long now = new Date().getTime(); // in milliseconds
|
||||
for ( NeedsNagInfo info : needNagging ) {
|
||||
Assert.assertTrue( info.m_nextNag < now );
|
||||
DbgUtils.logf( "%d hasn't moved in %d seconds", info.m_rowid,
|
||||
(now - info.m_lastMoveMillis )/ 1000 );
|
||||
long rowid = info.m_rowid;
|
||||
Intent msgIntent = GamesListDelegate.makeRowidIntent( context, rowid );
|
||||
String body = String.format( "It's been your turn in game %d for %d seconds",
|
||||
rowid, (now - info.m_lastMoveMillis)/ 1000 );
|
||||
Utils.postNotification( context, msgIntent, R.string.nag_title, body, (int)rowid );
|
||||
|
||||
info.m_nextNag = figureNextNag( info.m_lastMoveMillis );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue