add newbie message about how NFC works

This commit is contained in:
Eric House 2013-11-21 05:53:38 -08:00
parent c42271ee31
commit b874406b7b
5 changed files with 16 additions and 6 deletions

View file

@ -82,6 +82,7 @@
<string name="key_udp_interval">key_udp_interval</string>
<string name="key_notagain_sync">key_notagain_sync</string>
<string name="key_notagain_sms_ready">key_notagain_sms_ready</string>
<string name="key_notagain_newselect">key_notagain_newselect</string>
<string name="key_notagain_backclears">key_notagain_backclears</string>
<string name="key_notagain_chat">key_notagain_chat</string>

View file

@ -2187,4 +2187,9 @@
like yours that depend on the \"Action bar.\"</string>
<string name="sms_ready_text">Tap the receiving device now</string>
<string name="not_again_sms_ready">You have NFC enabled. That
means that any time a board that\'s missing a player is open, you
can tap a nearby person\'s device to invite him/her to
play if he/she is also using NFC.</string>
</resources>

View file

@ -924,9 +924,13 @@ public class BoardActivity extends XWActivity
{
if ( LAUNCH_INVITE_ACTION == id ) {
if ( DlgDelegate.DISMISS_BUTTON != which ) {
if ( DlgDelegate.NFC_BTN == which
&& !NFCUtils.nfcAvail( this )[1] ) {
showDialog( ENABLE_NFC );
if ( DlgDelegate.NFC_BTN == which ) {
if ( NFCUtils.nfcAvail( this )[1] ) {
showNotAgainDlgThen( R.string.not_again_sms_ready,
R.string.key_notagain_sms_ready );
} else {
showDialog( ENABLE_NFC );
}
} else {
String inviteID = GameUtils.formatGameID( m_gi.gameID );
GameUtils.launchInviteActivity( this, which, m_room,

View file

@ -669,7 +669,7 @@ public class GameUtils {
activity.startActivity( intent );
}
public static void launchGame( Activity activity, long rowid)
public static void launchGame( Activity activity, long rowid )
{
launchGame( activity, rowid, false );
}

View file

@ -322,8 +322,8 @@ public class NewGameActivity extends XWActivity {
private void makeNewGame( boolean networked, boolean launch,
int chosen )
{
if ( DlgDelegate.NFC_BTN == chosen
&& !NFCUtils.nfcAvail( this )[1] ) {
boolean viaNFC = DlgDelegate.NFC_BTN == chosen;
if ( viaNFC && !NFCUtils.nfcAvail( this )[1] ) {
showDialog( ENABLE_NFC );
} else {
String room = null;