mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
post a tip/warning when new invite-by-sms-app chosen
This commit is contained in:
parent
ef27ffaa02
commit
188a5d8387
5 changed files with 26 additions and 4 deletions
|
@ -25,13 +25,13 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Display;
|
||||
|
||||
|
||||
import org.eehouse.android.xw4.jni.CommonPrefs;
|
||||
import org.eehouse.android.xw4.jni.CommsAddrRec;
|
||||
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
|
||||
|
@ -674,8 +674,8 @@ public class GameUtils {
|
|||
Uri gameUri = nli.makeLaunchUri( context );
|
||||
String asStr = gameUri.toString();
|
||||
|
||||
int sdk = android.os.Build.VERSION.SDK_INT;
|
||||
if ( sdk < android.os.Build.VERSION_CODES.HONEYCOMB ) {
|
||||
int sdk = Build.VERSION.SDK_INT;
|
||||
if ( sdk < Build.VERSION_CODES.HONEYCOMB ) {
|
||||
android.text.ClipboardManager clipboard =
|
||||
(android.text.ClipboardManager)
|
||||
context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
|
|
|
@ -67,8 +67,8 @@ public class InviteChoicesAlert extends DlgDelegateAlert {
|
|||
lastMeans = ((SentInvitesInfo)state.m_params[0]).getLastMeans();
|
||||
}
|
||||
|
||||
add( items, means, R.string.invite_choice_user_sms, InviteMeans.SMS_USER );
|
||||
add( items, means, R.string.invite_choice_email, InviteMeans.EMAIL );
|
||||
add( items, means, R.string.invite_choice_user_sms, InviteMeans.SMS_USER );
|
||||
|
||||
if ( BTService.BTAvailable() ) {
|
||||
add( items, means, R.string.invite_choice_bt, InviteMeans.BLUETOOTH );
|
||||
|
@ -102,6 +102,12 @@ public class InviteChoicesAlert extends DlgDelegateAlert {
|
|||
XWActivity activity = (XWActivity)getActivity();
|
||||
sel[0] = pos;
|
||||
switch ( means.get(pos) ) {
|
||||
case SMS_USER:
|
||||
activity
|
||||
.makeNotAgainBuilder( R.string.sms_invite_flakey,
|
||||
R.string.key_na_sms_invite_flakey )
|
||||
.show();
|
||||
break;
|
||||
case CLIPBOARD:
|
||||
String msg =
|
||||
getString( R.string.not_again_clip_expl_fmt,
|
||||
|
|
|
@ -210,6 +210,11 @@ public class XWActivity extends FragmentActivity
|
|||
return m_dlgt.makeNotAgainBuilder( msg, keyId );
|
||||
}
|
||||
|
||||
public DlgDelegate.NotAgainBuilder makeNotAgainBuilder( int msgID, int keyId )
|
||||
{
|
||||
return m_dlgt.makeNotAgainBuilder( msgID, keyId );
|
||||
}
|
||||
|
||||
public DlgDelegate.ConfirmThenBuilder makeConfirmThenBuilder( int msgID,
|
||||
Action action )
|
||||
{
|
||||
|
|
|
@ -120,6 +120,7 @@
|
|||
<string name="key_na_studycopy">key_na_studycopy</string>
|
||||
<string name="key_na_fmt_expl">key_na_fmt_expl</string>
|
||||
<string name="key_na_clip_expl">key_na_clip_expl</string>
|
||||
<string name="key_na_sms_invite_flakey">key_na_sms_invite_flakey</string>
|
||||
<string name="key_na_dicts">key_na_dicts</string>
|
||||
<string name="key_enable_debug">key_enable_debug</string>
|
||||
<string name="key_enable_dup_invite">key_enable_dup_invite</string>
|
||||
|
|
|
@ -579,6 +579,16 @@
|
|||
number %1$s on %2$s</string>
|
||||
<string name="invit_expl_usrsms_fmt">Invite sent via SMS messaging
|
||||
to phone number %1$s on %2$s</string>
|
||||
|
||||
<!-- shown when user chooses to invite via the default SMS app -->
|
||||
<string name="sms_invite_flakey">This new option launches your
|
||||
default SMS app with an invitation ready to send -- when it
|
||||
works. Each SMS app is different, and some won\'t
|
||||
cooperate.</string>
|
||||
|
||||
<!-- Toast when invite-by-visible-sms fails -->
|
||||
<string name="sms_invite_fail">Unable to launch SMS app</string>
|
||||
|
||||
<string name="invit_expl_bt_fmt">Invite sent via Bluetooth to
|
||||
paired device \"%1$s\" on %2$s</string>
|
||||
<string name="invit_expl_relay_fmt">Invite forwarded by the relay
|
||||
|
|
Loading…
Add table
Reference in a new issue