mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
show BT-troubleshooting hint when scan finds no devices
This commit is contained in:
parent
23e58524a1
commit
c976b3f595
2 changed files with 7 additions and 3 deletions
|
@ -56,6 +56,7 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
private Activity m_activity;
|
||||
private ProgressBar mProgressBar;
|
||||
private Handler m_handler = new Handler();
|
||||
private int mNDevsThisScan;
|
||||
|
||||
private static class Persisted implements Serializable {
|
||||
List<TwoStringPair> pairs;
|
||||
|
@ -178,7 +179,7 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
public void run() {
|
||||
hideProgress();
|
||||
|
||||
if ( mPersisted.empty() ) {
|
||||
if ( mPersisted.empty() || 0 == mNDevsThisScan ) {
|
||||
makeNotAgainBuilder( R.string.not_again_emptybtscan,
|
||||
R.string.key_notagain_emptybtscan )
|
||||
.show();
|
||||
|
@ -235,6 +236,7 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
|
||||
int count = BTService.getPairedCount( m_activity );
|
||||
if ( 0 < count ) {
|
||||
mNDevsThisScan = 0;
|
||||
showProgress( count, SCAN_SECONDS );
|
||||
BTService.scan( m_activity, 1000 * SCAN_SECONDS );
|
||||
} else {
|
||||
|
@ -249,6 +251,7 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
{
|
||||
DbgUtils.assertOnUIThread();
|
||||
|
||||
++mNDevsThisScan;
|
||||
mPersisted.add( dev.getAddress(), dev.getName() );
|
||||
store();
|
||||
|
||||
|
|
|
@ -2763,8 +2763,9 @@
|
|||
<string name="gameevent_channel_expl">In-game events</string>
|
||||
|
||||
<string name="not_again_emptybtscan">If a scan doesn\'t find the device you expect:\n
|
||||
• First, just try again\n
|
||||
• Make sure Bluetooth is on on the other device\n
|
||||
• First, just Rescan\n
|
||||
• Make sure Bluetooth is enabled on the other device\n
|
||||
• Launch CrossWords on the other device\n
|
||||
• If all else fails, reboot this device\n
|
||||
</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Reference in a new issue