diff --git a/xwords4/android/XWords4/res/layout/new_game.xml b/xwords4/android/XWords4/res/layout/new_game.xml
index 0a7afb455..9c9cb6275 100644
--- a/xwords4/android/XWords4/res/layout/new_game.xml
+++ b/xwords4/android/XWords4/res/layout/new_game.xml
@@ -105,6 +105,69 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml
index 894511eb8..11211b441 100644
--- a/xwords4/android/XWords4/res/values/strings.xml
+++ b/xwords4/android/XWords4/res/values/strings.xml
@@ -1169,6 +1169,23 @@
this and you'll get taken to the "Game configure" screen -->
Configure first
+
+ New Bluetooth game
+
+
+ Bluetooth is not available. This may
+ mean that your device doesn\'t support it, or that it\'s been
+ turned off.
+
+
+ Create a game that will be played
+ via Bluetooth with devices that are nearby and paired with
+ yours. Both buttons will initiate a game with other devices
+ (one or more) that you choose (from paired devices that already
+ have Crosswords installed.) The first uses defaults; the second
+ lets you change them before beginning the game.
+
@@ -1819,4 +1836,6 @@
version: \"%s\"; and make/model of your phone or
tablet.)"
+ Turn Bluetooth on
+
diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTConnection.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTConnection.java
index d068e0f32..c37ab1098 100644
--- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTConnection.java
+++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BTConnection.java
@@ -183,4 +183,10 @@ public class BTConnection extends BroadcastReceiver {
pt.start();
}
+ public static boolean BTDisabled()
+ {
+ boolean disabled = null == s_btAdapter;
+ return disabled;
+ }
+
}
diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java
index 73e25cd2d..3e13342e4 100644
--- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java
+++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java
@@ -85,6 +85,34 @@ public class NewGameActivity extends XWActivity {
}
} );
+ if ( BTConnection.BTDisabled() ) {
+ findViewById( R.id.bt_stuff ).setVisibility( View.GONE );
+ button = (Button)findViewById( R.id.newgame_enable_bt );
+ button.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick( View v ) {
+ Utils.notImpl( NewGameActivity.this );
+ }
+ } );
+ } else {
+ findViewById( R.id.bt_disabled ).setVisibility( View.GONE );
+
+ button = (Button)findViewById( R.id.newgame_invite_bt );
+ button.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick( View v ) {
+ makeNewBTGame( true );
+ }
+ } );
+ button = (Button)findViewById( R.id.newgame_bt_config );
+ button.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick( View v ) {
+ makeNewBTGame( false );
+ }
+ } );
+ }
+
}
// DlgDelegate.DlgClickNotify interface
@@ -143,4 +171,8 @@ public class NewGameActivity extends XWActivity {
finish();
}
+ private void makeNewBTGame( boolean useDefaults )
+ {
+ }
+
}