more data with my SMS

And catch an exception starting SMSService in background
This commit is contained in:
Eric House 2019-02-26 21:27:31 -08:00
parent 713d2e5634
commit bec37536f6
2 changed files with 38 additions and 32 deletions

View file

@ -260,7 +260,11 @@ public class SMSService extends XWService {
private static void startService( Context context, Intent intent ) private static void startService( Context context, Intent intent )
{ {
Log.d( TAG, "startService(%s)", intent ); Log.d( TAG, "startService(%s)", intent );
context.startService( intent ); try {
context.startService( intent );
} catch ( java.lang.IllegalStateException ise ) {
Log.e( TAG, "startService(): %s", ise.getMessage() );
}
} }
private static Intent getIntentTo( Context context, SMSAction cmd ) private static Intent getIntentTo( Context context, SMSAction cmd )

View file

@ -1867,7 +1867,7 @@
<string name="sms_bad_proto_fmt">The version of CrossWords on the <string name="sms_bad_proto_fmt">The version of CrossWords on the
phone with number \"%1$s\" is incompatible with this one for play phone with number \"%1$s\" is incompatible with this one for play
using SMS. One of you may need to upgrade before you can using Data SMS. One of you may need to upgrade before you can
continue.</string> continue.</string>
<!-- --> <!-- -->
@ -2068,7 +2068,7 @@
<!-- --> <!-- -->
<string name="connstat_relay">Internet/relay</string> <string name="connstat_relay">Internet/relay</string>
<!-- --> <!-- -->
<string name="enable_sms">Allow games via SMS</string> <string name="enable_sms">Allow games via Data SMS</string>
<!-- --> <!-- -->
<string name="enable_sms_summary">Only if you have unlimited texting!</string> <string name="enable_sms_summary">Only if you have unlimited texting!</string>
@ -2080,12 +2080,12 @@
<!-- --> <!-- -->
<string name="confirm_sms_expl">Warning: This feature is meant for <string name="confirm_sms_expl">Warning: This feature is meant for
phones with unlimited texting plans. Once you enable it dozens of phones with unlimited texting plans. Once you enable it dozens of
SMS (text) messages will be sent (invisibly) for each game Data SMS messages will be sent (invisibly) for each game
played. If you don\'t have an unlimited plan your carrier may played. If you don\'t have an unlimited plan your carrier may
charge you for each and every message!\n\nShould play via SMS be charge you for each and every message!\n\nShould play via Data SMS
enabled?</string> be enabled?</string>
<!-- --> <!-- -->
<string name="confirm_sms_prompt">Enable play via SMS?</string> <string name="confirm_sms_prompt">Enable play via Data SMS?</string>
<!-- --> <!-- -->
<string name="confirm_sms_leave">No: leave disabled</string> <string name="confirm_sms_leave">No: leave disabled</string>
<!-- --> <!-- -->
@ -2094,9 +2094,9 @@
<string name="confirm_sms_willpay">Yes: I\'ll pay all carrier charges</string> <string name="confirm_sms_willpay">Yes: I\'ll pay all carrier charges</string>
<!-- --> <!-- -->
<string name="warn_sms_disabled">Play via SMS is currently <string name="warn_sms_disabled">Play via Data SMS is currently
disabled. No moves will be sent via SMS.\n\nYou can enable play disabled. No moves will be sent via Data SMS.\n\nYou can enable
via SMS now, or later. play via Data SMS now, or later.
</string> </string>
<string name="warn_bt_disabled">Bluetooth is currently off on this <string name="warn_bt_disabled">Bluetooth is currently off on this
@ -2121,7 +2121,7 @@
<item quantity="other">\n\n(You have %1$d games using it.)</item> <item quantity="other">\n\n(You have %1$d games using it.)</item>
</plurals> </plurals>
<string name="button_enable_sms">Enable SMS</string> <string name="button_enable_sms">Enable Data SMS</string>
<string name="button_enable_bt">Enable Bluetooth</string> <string name="button_enable_bt">Enable Bluetooth</string>
<string name="button_enable_relay">Enable Relay play</string> <string name="button_enable_relay">Enable Relay play</string>
<string name="button_disable_relay">Disable Relay play</string> <string name="button_disable_relay">Disable Relay play</string>
@ -2626,7 +2626,7 @@
<string name="confirm_drop_relay_bt">Bluetooth only works for nearby <string name="confirm_drop_relay_bt">Bluetooth only works for nearby
devices.</string> devices.</string>
<string name="confirm_drop_relay_sms">Not all carriers support play <string name="confirm_drop_relay_sms">Not all carriers support play
via SMS.</string> via Data SMS.</string>
<string name="button_enable">Enable</string> <string name="button_enable">Enable</string>
@ -2636,12 +2636,13 @@
connection, but might have problems on restricted WiFi connection, but might have problems on restricted WiFi
networks.</string> networks.</string>
<string name="not_again_comms_sms">Play via SMS uses the same <string name="not_again_comms_sms">Play via Data SMS uses the
technology as \"texting\". Though the messages are invisible to you, technology on which as \"texting\" is built. Though the messages are
your carrier considers them texts, so you want to avoid this feature invisible to you, your carrier bills them as texts, so you want to
unless you have an unlimited texting plan (or budget.) Note that avoid this feature unless you have an unlimited texting plan (or
Android only supports this feature on devices on a GSM carrier, budget.) Note that Android only supports this feature on devices on
i.e. every carrier in the world except Verizon and Sprint.</string> a GSM carrier, i.e. every carrier in the world except Verizon and
Sprint.</string>
<string name="not_again_comms_bt">Use Bluetooth to play against a <string name="not_again_comms_bt">Use Bluetooth to play against a
nearby device that\'s \"paired\" with yours.</string> nearby device that\'s \"paired\" with yours.</string>
@ -2699,18 +2700,18 @@
<string name="after_restart">This change will take effect after you <string name="after_restart">This change will take effect after you
restart CrossWords.</string> restart CrossWords.</string>
<string name="missing_perms">This game is configured to <string name="missing_perms">This game is configured to communicate
communicate via SMS but CrossWords does not have permission to do via Data SMS but CrossWords does not have permission to do so. You
so. You can still open the game, but it may not be able to send or can still open the game, but it may not be able to send or receive
receive moves.\n\nYou can re-open it to be asked for permission moves.\n\nYou can re-open it to be asked for permission again. Or
again. Or you can remove the SMS communication setting.</string> you can remove the Data SMS communication setting.</string>
<string name="download_rationale">CrossWords needs access to <string name="download_rationale">CrossWords needs access to
temporary storage to keep what you\'re about to download. temporary storage to keep what you\'re about to download.
</string> </string>
<string name="sms_invite_rationale"> <string name="sms_invite_rationale">
CrossWords needs permission to send an invitation via SMS. CrossWords needs permission to send an invitation via Data SMS.
</string> </string>
<string name="dicts_storage_rationale"> <string name="dicts_storage_rationale">
@ -2732,23 +2733,24 @@
</string> </string>
<string name="phone_lookup_rationale"> <string name="phone_lookup_rationale">
To rematch a game that uses SMS CrossWords needs permission to To rematch a game that uses Data SMS CrossWords needs permission to
access your phone number. access your phone number.
</string> </string>
<!-- Case where SMS is the only way the game can communicate --> <!-- Case where SMS is the only way the game can communicate -->
<string name="phone_lookup_rationale_drop">Rematching this SMS-only <string name="phone_lookup_rationale_drop">Rematching this
game is not possible without this permission.</string> Data-SMS-only game is not possible without this permission.</string>
<!-- Case where SMS is NOT the only way the game can communicate --> <!-- Case where SMS is NOT the only way the game can communicate -->
<string name="phone_lookup_rationale_others">Without this permission <string name="phone_lookup_rationale_others">Without this permission
rematching will continue but will create a game that cannot not play rematching will continue but will create a game that cannot play via
via SMS.</string> Data SMS.</string>
<string name="contacts_rationale"> <string name="contacts_rationale">
CrossWords wants access to your contacts in order to put a name to CrossWords wants access to your contacts in order to put a name to
phone numbers that send you invitations via SMS. You\'ll still be phone numbers that send you invitations via Data SMS. You\'ll
able to receive invitations if you don\'t grant this permission, still be able to receive invitations if you don\'t grant this
but only the phone number of the sender will be displayed. permission, but only the phone number of the sender will be
displayed.
</string> </string>
<string name="move_dict_rationale">Storing a wordlist in the <string name="move_dict_rationale">Storing a wordlist in the