From e0f0666b1cf9378a2eb7be25b11b58a2eae0190d Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 21 Nov 2016 21:10:16 -0800 Subject: [PATCH] wifi: make invitations work Add UI, minor thanks to recent refactoring, to allow invitations via wifi direct. Uses a mapping of all currently known device mac addresses to names, with only the latter shown to users. Works well, though something I changed seems to have causes devices to start losing track of their connections to each other. --- .../android/XWords4-dbg/AndroidManifest.xml | 5 +- .../src/org/eehouse/android/xw4dbg/.gitignore | 2 + xwords4/android/XWords4/AndroidManifest.xml | 4 + xwords4/android/XWords4/archive/R.java | 696 +++++++++--------- .../android/XWords4/res/values/strings.xml | 24 +- .../XWords4/res_src/values-ba_CK/strings.xml | 20 +- .../XWords4/res_src/values-ca_PS/strings.xml | 20 +- .../eehouse/android/xw4/BoardDelegate.java | 14 +- .../org/eehouse/android/xw4/DlgDelegate.java | 16 +- .../org/eehouse/android/xw4/RequestCode.java | 2 +- .../android/xw4/WiDirInviteActivity.java | 35 + .../android/xw4/WiDirInviteDelegate.java | 104 +++ .../org/eehouse/android/xw4/WiDirService.java | 185 ++++- 13 files changed, 726 insertions(+), 401 deletions(-) create mode 100644 xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteActivity.java create mode 100644 xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteDelegate.java diff --git a/xwords4/android/XWords4-dbg/AndroidManifest.xml b/xwords4/android/XWords4-dbg/AndroidManifest.xml index 8e85836f6..f319a6e0d 100644 --- a/xwords4/android/XWords4-dbg/AndroidManifest.xml +++ b/xwords4/android/XWords4-dbg/AndroidManifest.xml @@ -95,7 +95,10 @@ android:label="@string/relay_invite_title" android:configChanges="keyboardHidden|orientation|screenSize" /> - + + Êtes-vous sûr de vouloir effacer les %1$d mots sélectionnés ?\n\n(Cette action ne peut pas être annulée.) */ - public static final int confirm_studylist_clear_fmt=0x7f090013; + public static final int confirm_studylist_clear_fmt=0x7f090014; /** %1$s (%2$d games) %1$s (%2$d parties) */ - public static final int group_name_fmt=0x7f090012; + public static final int group_name_fmt=0x7f090013; /** Are you sure you want to delete the %1$d selected group[s]? Êtes-vous sûr de vouloir effacer les %1$d groupes sélectionnés ? */ - public static final int groups_confirm_del_fmt=0x7f090010; + public static final int groups_confirm_del_fmt=0x7f090011; /** \n\n(%1$d game[s] will also be deleted.) \n\n(%1$d parties seront aussi effacées.) */ - public static final int groups_confirm_del_games_fmt=0x7f090011; + public static final int groups_confirm_del_games_fmt=0x7f090012; /** Please select the %1$d device[s] @@ -440,6 +440,9 @@ partie. Voulez-vous inviter quelqu\'un - - à moins que vous ne l\'ayez déjà fait ? */ public static final int invite_msg_fmt=0x7f090004; + /** + */ + public static final int invite_p2p_desc_fmt=0x7f09000e; /** */ public static final int invite_relay_desc_fmt=0x7f09000d; @@ -455,15 +458,15 @@ que vous voulez inviter à votre partie, puis touchez \"%2$s\". /** %1$s (%2$d wordlists) %1$s (%2$d listes de mots) */ - public static final int lang_name_fmt=0x7f090016; + public static final int lang_name_fmt=0x7f090017; /** %1$s played %2$s for %3$d points %1$s a joué %2$s pour %3$d points */ - public static final int lmi_move_fmt=0x7f09001a; + public static final int lmi_move_fmt=0x7f09001b; /** %1$s traded %2$d tiles %1$s a échangé %2$d jetons */ - public static final int lmi_trade_fmt=0x7f09001b; + public static final int lmi_trade_fmt=0x7f09001c; /** Otherwise they're listed with this to give some indication of how far along they are. I may list "tiles left" someday instead... @@ -497,7 +500,7 @@ relai dans le salon \"%2$s\". En attente de %3$d joueur[s]. /** %1$d day[s] %1$d jour[s] */ - public static final int nag_days_fmt=0x7f090019; + public static final int nag_days_fmt=0x7f09001a; /** body of warning notification reminder message. First three are used to build a string based on the length of time that's then inserted in the fourth. E.g "PlayerName moved more than 2 day[s], @@ -507,26 +510,26 @@ relai dans le salon \"%2$s\". En attente de %3$d joueur[s]. %1$d hour[s] %1$d heure[s] */ - public static final int nag_hours_fmt=0x7f090018; + public static final int nag_hours_fmt=0x7f090019; /** body of warning notification reminder message. First three are used to build a string based on the length of time that's then inserted in the fourth. E.g "PlayerName moved more than 2 day[s], 4 hour[s] ago." */ - public static final int nag_minutes_fmt=0x7f090017; + public static final int nag_minutes_fmt=0x7f090018; /** Installed %1$d new translations %1$d nouvelles traductions installées */ - public static final int new_xlations_fmt=0x7f090015; + public static final int new_xlations_fmt=0x7f090016; /** XLATE-ME %1$d player[s] %1$d joueur[s] */ - public static final int nplayers_fmt=0x7f09001c; + public static final int nplayers_fmt=0x7f09001d; /** %1$d word[s] copied %1$d mots copiés */ - public static final int paste_done_fmt=0x7f090014; + public static final int paste_done_fmt=0x7f090015; /** Text of dialog asking user to confirm a move that exchanges tiles (instead of forming a new word to earn points) Text of dialog asking user to confirm a move that exchanges @@ -539,7 +542,7 @@ jetons sélectionnés (%2$s) ? public static final int query_trade_fmt=0x7f09000a; /** Shown after "resend messages" menuitem chosen */ - public static final int resent_msgs_fmt=0x7f09001d; + public static final int resent_msgs_fmt=0x7f09001e; /** Intro to the paragraph listing all of the tiles remaining Intro to the paragraph lisiting all of the tiles remaining %1$d tiles left in pool and all @@ -573,7 +576,7 @@ tous les chevalets :\n returned by util_getUserString */ public static final int strd_robot_traded_fmt=0x7f090007; - public static final int warn_relay_games_fmt=0x7f09000f; + public static final int warn_relay_games_fmt=0x7f090010; } public static final class string { /** copyright info @@ -640,16 +643,16 @@ tous les chevalets :\n public static final int about_web=0x7f0501d3; /** %1$s added to %2$s studylist */ - public static final int add_done_fmt=0x7f05028e; + public static final int add_done_fmt=0x7f050291; /** Add %1$s to studylist */ - public static final int add_to_study_fmt=0x7f050288; + public static final int add_to_study_fmt=0x7f05028b; /** Debugging stuff. Localize if you think your langauge users will care. XLATE-ME For debugging */ - public static final int advanced=0x7f0502fc; + public static final int advanced=0x7f0502ff; /** This button takes you to the normal Game Configure screen This button takes you to the normal Game Configure screen Advanced game settings @@ -659,8 +662,8 @@ XLATE-ME /** XLATE-ME You should never need these... */ - public static final int advanced_summary=0x7f0502fd; - public static final int after_restart=0x7f050353; + public static final int advanced_summary=0x7f050300; + public static final int after_restart=0x7f050356; /** The wordlist %1$s contains only @@ -673,7 +676,7 @@ XLATE-ME on the device %1$s. Please check that the device is within range and that Crosswords is installed on it. */ - public static final int app_not_found_fmt=0x7f0502d4; + public static final int app_not_found_fmt=0x7f0502d7; public static final int app_version=0x7f050000; /** the background color of the area outside the board, e.g. between entries in the scoreboard @@ -717,7 +720,7 @@ XLATE-ME Browse wordlist board menu for small devices only */ - public static final int board_menu_dict=0x7f05022c; + public static final int board_menu_dict=0x7f05022f; /** ############################################################ # :Menus: @@ -812,7 +815,7 @@ XLATE-ME /** XLATE-ME Network stats */ - public static final int board_menu_game_netstats=0x7f050307; + public static final int board_menu_game_netstats=0x7f05030a; /** Meaningful only for networked games, this menu causes all messages that have not yet been acknowledged by a remote device in the game to be resent. Eventually I hope to be @@ -834,10 +837,10 @@ XLATE-ME /** Resign */ public static final int board_menu_game_resign=0x7f050106; - public static final int board_menu_game_showInvites=0x7f050308; + public static final int board_menu_game_showInvites=0x7f05030b; /** Invite */ - public static final int board_menu_invite=0x7f050281; + public static final int board_menu_invite=0x7f050284; /** Pass @@ -872,7 +875,7 @@ XLATE-ME Undo/Redo */ - public static final int board_menu_undo_current=0x7f050225; + public static final int board_menu_undo_current=0x7f050228; /** Undos the last *committed* turn. Note that this is different from the undo button that undoes or redoes an in-progress not-yet-committed turn. This is disabled for networked @@ -921,7 +924,7 @@ XLATE-ME */ public static final int board_submenu_game=0x7f050101; /** The remaining strings (down to the color edit dialog below) - are showns as the names of editable colors and as the the + are showns as the names of editable colors and as the title of the color editor that comes up when the name is tapped. (color for) double-letter bonus squares on the board @@ -1014,7 +1017,7 @@ XLATE-ME one or more?\n\n(You may also need to open it on the device you want to pair with.) */ - public static final int bt_no_devs=0x7f0502d3; + public static final int bt_no_devs=0x7f0502d6; /** Turn Bluetooth on In the Bluetooth invite device dialog In the Bluetooth invite device dialog @@ -1055,7 +1058,7 @@ XLATE-ME public static final int button_close_game=0x7f05019f; /** Decline */ - public static final int button_decline=0x7f050261; + public static final int button_decline=0x7f050264; /** @@ -1130,7 +1133,7 @@ XLATE-ME second). */ public static final int button_delete=0x7f050092; - public static final int button_disable_relay=0x7f05024c; + public static final int button_disable_relay=0x7f05024f; /** Used for button in dialog put up with the relay says the remote partner of this game has deleted it. Ok, meaning "don't discard", is the other option. This same button is @@ -1155,7 +1158,7 @@ XLATE-ME /** XLATE-ME Discard changes */ - public static final int button_discard_changes=0x7f0502f3; + public static final int button_discard_changes=0x7f0502f6; /** Done @@ -1191,18 +1194,18 @@ XLATE-ME /** XLATE-ME Edit */ - public static final int button_edit=0x7f0502f2; - public static final int button_enable=0x7f050337; + public static final int button_edit=0x7f0502f5; + public static final int button_enable=0x7f05033a; /** XLATE-ME Enable Bluetooth */ - public static final int button_enable_bt=0x7f05024a; - public static final int button_enable_relay=0x7f05024b; + public static final int button_enable_bt=0x7f05024d; + public static final int button_enable_relay=0x7f05024e; /** XLATE-ME Enable SMS */ - public static final int button_enable_sms=0x7f050249; - public static final int button_go_settings=0x7f050283; + public static final int button_enable_sms=0x7f05024c; + public static final int button_go_settings=0x7f050286; /** Invite checked @@ -1218,7 +1221,7 @@ XLATE-ME /** XLATE-ME Later */ - public static final int button_later=0x7f05024d; + public static final int button_later=0x7f050250; /** New strings that need to be documented and found a home above. New strings that need to be documented and found a home @@ -1344,11 +1347,11 @@ XLATE-ME public static final int button_notagain=0x7f0501bb; /** Reconnect */ - public static final int button_reconnect=0x7f050273; - public static final int button_reinvite=0x7f0502ed; + public static final int button_reconnect=0x7f050276; + public static final int button_reinvite=0x7f0502f0; /** */ - public static final int button_relay_add=0x7f050216; + public static final int button_relay_add=0x7f050217; /** Button shown in game over dialog triggering creation of new game with the same players and parameters as the one that just ended. @@ -1360,7 +1363,7 @@ XLATE-ME game with the same players and parameters as the one that just ended. */ - public static final int button_rematch=0x7f050272; + public static final int button_rematch=0x7f050275; /** When you select the list_item_reset contextual menu, you are asked to confirm. This is the text of the first button ("Cancel" is the second). @@ -1447,7 +1450,7 @@ XLATE-ME */ - public static final int button_sms_add=0x7f050215; + public static final int button_sms_add=0x7f050216; /** Text of button allowing user to choose to open with a different (but same-language wordlist) Text of button allowing user to choose to open with a @@ -1501,7 +1504,7 @@ XLATE-ME public static final int button_trade_commit=0x7f0500e1; /** Button for alert with title above */ - public static final int button_wait=0x7f0502ec; + public static final int button_wait=0x7f0502ef; /** ############################################################ # Dialogs @@ -1548,10 +1551,10 @@ XLATE-ME /** The group for new games, %1$s, cannot be deleted. */ - public static final int cannot_delete_default_group_fmt=0x7f050271; + public static final int cannot_delete_default_group_fmt=0x7f050274; /** Move selected games to: */ - public static final int change_group=0x7f050276; + public static final int change_group=0x7f050279; /** text of button in About Crosswords dialog summoning above dialog text of button in About Crosswords dialog summoning above @@ -1627,7 +1630,7 @@ XLATE-ME message-composition field to be sent. */ public static final int chat_send=0x7f05018a; - public static final int chat_sender_fmt=0x7f05022a; + public static final int chat_sender_fmt=0x7f05022d; /** ############################################################ # :Screens: # Chat screen @@ -1674,17 +1677,17 @@ XLATE-ME public static final int chat_title_fmt=0x7f050187; /** Checking for wordlists in %1$s… */ - public static final int checking_for_fmt=0x7f05032e; + public static final int checking_for_fmt=0x7f050331; /** Checking */ - public static final int checking_title=0x7f05032d; + public static final int checking_title=0x7f050330; /** Everything is up-to-date. */ - public static final int checkupdates_none_found=0x7f05024f; + public static final int checkupdates_none_found=0x7f050252; /** EXPERIMENTAL: "label" for invite on clipboard. If it's shown it's by some Android utility */ - public static final int clip_label=0x7f050341; + public static final int clip_label=0x7f050344; /** color of the "crosshairs", lines drawn vertically and horizontally through the square the user is currently touching in order to guide the fat-fingered (most of us) in @@ -1708,9 +1711,9 @@ XLATE-ME and cannot be saved. Would you like to discard your changes, or edit to give it a way to connect? */ - public static final int config_no_connvia=0x7f0502f1; - public static final int confirm_clear_chat=0x7f050343; - public static final int confirm_clear_relay=0x7f05021d; + public static final int config_no_connvia=0x7f0502f4; + public static final int confirm_clear_chat=0x7f050346; + public static final int confirm_clear_relay=0x7f050220; /** Additional text appended to text confirm_delete_dictf in the wordlist delete confiration dialog in the case where the wordlist to be deleted is the last in its language. The name @@ -1721,14 +1724,14 @@ XLATE-ME of the language is substituted for %1$s. */ public static final int confirm_deleteonly_dicts_fmt=0x7f0500ac; - public static final int confirm_drop_relay=0x7f050333; - public static final int confirm_drop_relay_bt=0x7f050335; - public static final int confirm_drop_relay_sms=0x7f050336; + public static final int confirm_drop_relay=0x7f050336; + public static final int confirm_drop_relay_bt=0x7f050338; + public static final int confirm_drop_relay_sms=0x7f050339; /** Your device is set up for %1$s. Would you like to download a wordlist so you can play Crosswords in %1$s? */ - public static final int confirm_get_locdict_fmt=0x7f0502fb; + public static final int confirm_get_locdict_fmt=0x7f0502fe; /** Text of confirmation dialog for above Text of confirmation dialog for above Are you sure you want to restore @@ -1798,37 +1801,37 @@ XLATE-ME enabled? */ - public static final int confirm_sms_expl=0x7f05023e; + public static final int confirm_sms_expl=0x7f050241; /** No: leave disabled */ - public static final int confirm_sms_leave=0x7f050240; + public static final int confirm_sms_leave=0x7f050243; /** Enable play via SMS? */ - public static final int confirm_sms_prompt=0x7f05023f; + public static final int confirm_sms_prompt=0x7f050242; /** Confirm your SMS plan */ - public static final int confirm_sms_title=0x7f05023d; + public static final int confirm_sms_title=0x7f050240; /** Yes: I have unlimited texting */ - public static final int confirm_sms_unlimited=0x7f050241; + public static final int confirm_sms_unlimited=0x7f050244; /** Yes: I\'ll pay all carrier charges */ - public static final int confirm_sms_willpay=0x7f050242; + public static final int confirm_sms_willpay=0x7f050245; /** text of dialog shown when the menu item board_menu_undo_last is chosen. text of dialog shown when the menu item board_menu_undo_last @@ -1901,7 +1904,7 @@ XLATE-ME Connection (via SMS/text) */ - public static final int connect_label_sms=0x7f05021e; + public static final int connect_label_sms=0x7f050221; /** These are the possible values for the connect_frequency setting presented as a drop-down list. These are the possible values for the connect_frequency @@ -1923,70 +1926,70 @@ XLATE-ME /** XLATE-ME Change Communicate via */ - public static final int connection_via_label=0x7f0502e6; + public static final int connection_via_label=0x7f0502e9; /** (Last failure was %1$s) */ - public static final int connstat_lastother_succ_fmt=0x7f050235; + public static final int connstat_lastother_succ_fmt=0x7f050238; /** (Last successful send was %1$s) */ - public static final int connstat_lastother_unsucc_fmt=0x7f050236; + public static final int connstat_lastother_unsucc_fmt=0x7f050239; /** Last receipt was %1$s */ - public static final int connstat_lastreceipt_fmt=0x7f050237; + public static final int connstat_lastreceipt_fmt=0x7f05023a; /** Last send was %1$s (%2$s) */ - public static final int connstat_lastsend_fmt=0x7f050234; + public static final int connstat_lastsend_fmt=0x7f050237; /** Network status for game connected via %1$s: */ - public static final int connstat_net_fmt=0x7f050230; - public static final int connstat_net_noaddr=0x7f05022f; + public static final int connstat_net_fmt=0x7f050233; + public static final int connstat_net_noaddr=0x7f050232; /** No messages have been received. */ - public static final int connstat_noreceipt=0x7f050238; + public static final int connstat_noreceipt=0x7f05023b; /** internet/relay */ - public static final int connstat_relay=0x7f050239; + public static final int connstat_relay=0x7f05023c; /** sms/texting */ - public static final int connstat_sms=0x7f05023a; + public static final int connstat_sms=0x7f05023d; /** successful */ - public static final int connstat_succ=0x7f050232; + public static final int connstat_succ=0x7f050235; /** unsuccessful */ - public static final int connstat_unsucc=0x7f050233; + public static final int connstat_unsucc=0x7f050236; /** title of dialog brought up in response to the board_menu_game_counts menu. The dialog lists all tiles in the language being used for the game together with how many @@ -2004,7 +2007,7 @@ XLATE-ME public static final int counts_values_title=0x7f0501b5; /** %1$s (in use) */ - public static final int cur_menu_marker_fmt=0x7f050280; + public static final int cur_menu_marker_fmt=0x7f050283; /** Tile picker\n(so far: %1$s) @@ -2013,19 +2016,19 @@ XLATE-ME public static final int cur_tiles_fmt=0x7f0501e9; /** SMS Data is only available on GSM phones. */ - public static final int data_gsm_only=0x7f05029d; + public static final int data_gsm_only=0x7f0502a0; /** SD card write complete. */ - public static final int db_store_done=0x7f05032f; + public static final int db_store_done=0x7f050332; /** XLATE-ME Enable debug features */ - public static final int debug_features=0x7f050303; + public static final int debug_features=0x7f050306; /** XLATE-ME Menuitems etc. (release builds only) */ - public static final int debug_features_summary=0x7f050304; + public static final int debug_features_summary=0x7f050307; /** dictionary used by default for human players when creating new game clarification of above @@ -2053,13 +2056,13 @@ XLATE-ME label within default wordlists in app preferences Default language */ - public static final int default_language=0x7f0502d5; + public static final int default_language=0x7f0502d8; /** Store wordlists internally */ - public static final int default_loc=0x7f050264; + public static final int default_loc=0x7f050267; /** (Not in external/sdcard memory) */ - public static final int default_loc_summary=0x7f050265; + public static final int default_loc_summary=0x7f050268; /** Welcome dialog text Welcome dialog text Thanks for installing @@ -2132,8 +2135,8 @@ XLATE-ME public static final int default_update_url=0x7f050082; /** Delete wordlist[s] */ - public static final int delete_dicts=0x7f0502bf; - public static final int devid_title=0x7f05030b; + public static final int delete_dicts=0x7f0502c2; + public static final int devid_title=0x7f05030e; /** Playing via SMS is currently disabled. You can enable it in Settings->Network game settings. @@ -2144,7 +2147,7 @@ XLATE-ME */ - public static final int dft_sms_name_fmt=0x7f050213; + public static final int dft_sms_name_fmt=0x7f050214; /** No word in %1$s starts with @@ -2171,15 +2174,15 @@ XLATE-ME public static final int dict_browse_title_fmt=0x7f0501eb; /** %1$s (%2$s/%3$d words) */ - public static final int dict_desc_fmt=0x7f0502c6; + public static final int dict_desc_fmt=0x7f0502c9; /** XLATE-ME Wordlist download URL */ - public static final int dict_host=0x7f050300; + public static final int dict_host=0x7f050303; /** Number of words: %1$d\nDownload size: %2$dK\nNote: %3$s */ - public static final int dict_info_fmt=0x7f0502c3; + public static final int dict_info_fmt=0x7f0502c6; /** label for dropdown by which wordlist is chosen that this player will use. The language the game will use (which constrains the choice of wordlists) is substituted in for @@ -2197,7 +2200,7 @@ XLATE-ME public static final int dict_lang_label_fmt=0x7f0500dd; /** Tap to download */ - public static final int dict_on_server=0x7f0502c5; + public static final int dict_on_server=0x7f0502c8; /** string name="invite_mime">text/plainDo not notify me no matter how long it\'s been my turn */ - public static final int disable_nag_summary=0x7f0502f9; + public static final int disable_nag_summary=0x7f0502fc; /** Disable turn reminders */ - public static final int disable_nag_title=0x7f0502f8; - public static final int disable_nags_title=0x7f0502f7; + public static final int disable_nag_title=0x7f0502fb; + public static final int disable_nags_title=0x7f0502fa; public static final int disable_relay=0x7f050163; public static final int disable_relay_summary=0x7f050164; /** text of item at bottom of dicts choice spinner. It @@ -2316,25 +2319,25 @@ XLATE-ME public static final int download_dicts=0x7f0500a7; /** Download finished */ - public static final int download_done=0x7f050262; + public static final int download_done=0x7f050265; /** Download unsuccessful */ - public static final int download_failed=0x7f050263; + public static final int download_failed=0x7f050266; /** Downloads Directory */ - public static final int download_path_title=0x7f050266; + public static final int download_path_title=0x7f050269; /** Downloading %1$s… */ public static final int downloading_dict_fmt=0x7f05019c; - public static final int drop_relay_warning_fmt=0x7f050332; + public static final int drop_relay_warning_fmt=0x7f050335; /** Display snapshots of games Display snapshots of games Invitation received but ignored: it has already been used to create a game. */ - public static final int dropped_dupe=0x7f05027f; - public static final int dualpane_exit_now=0x7f05034c; - public static final int dualpane_restart=0x7f050352; + public static final int dropped_dupe=0x7f050282; + public static final int dualpane_exit_now=0x7f05034f; + public static final int dualpane_restart=0x7f050355; /** Shown in the main screen when you launch Crosswords from an invitation (received in email or messaging app, say) and there's already a game running that matches that invitation. @@ -2388,9 +2391,12 @@ XLATE-ME color of empty squares on the board (that are not bonus squares) */ public static final int empty=0x7f05014d; + /** Shows in WiFiDirect Invite dialog when no known peers + */ + public static final int empty_p2p_inviter=0x7f05021c; /** */ - public static final int empty_relay_inviter=0x7f05021a; + public static final int empty_relay_inviter=0x7f05021d; /** Shows in SMS Invite dialog when no phone numbers have been saved previously Shows in SMS Invite dialog when no phone numbers have been saved previously This phone list is empty. Use the @@ -2398,60 +2404,60 @@ XLATE-ME button to enter numbers directly. */ - public static final int empty_sms_inviter=0x7f050219; - public static final int enable_dualpane=0x7f05034d; - public static final int enable_dualpane_summary=0x7f0502cb; + public static final int empty_sms_inviter=0x7f05021b; + public static final int enable_dualpane=0x7f050350; + public static final int enable_dualpane_summary=0x7f0502ce; /** XLATE-ME Accept invitations more than once */ - public static final int enable_dupes_summary=0x7f050313; + public static final int enable_dupes_summary=0x7f050316; /** XLATE-ME Accept duplicate invites */ - public static final int enable_dupes_title=0x7f050311; + public static final int enable_dupes_title=0x7f050314; /** NFC is turned off on this device. You can use the Android Settings app to turn it on . */ - public static final int enable_nfc=0x7f050282; + public static final int enable_nfc=0x7f050285; /** XLATE-ME Fake invitation to aid debugging */ - public static final int enable_nfc_toself_summary=0x7f050316; + public static final int enable_nfc_toself_summary=0x7f050319; /** XLATE-ME Enable NFC to self */ - public static final int enable_nfc_toself_title=0x7f050315; + public static final int enable_nfc_toself_title=0x7f050318; /** XLATE-ME Rooms others can see and join */ - public static final int enable_pubroom_summary=0x7f0502e5; + public static final int enable_pubroom_summary=0x7f0502e8; /** XLATE-ME Enable public rooms */ - public static final int enable_pubroom_title=0x7f0502e4; - public static final int enable_relay_toself_summary=0x7f05033f; - public static final int enable_relay_toself_title=0x7f05033e; + public static final int enable_pubroom_title=0x7f0502e7; + public static final int enable_relay_toself_summary=0x7f050342; + public static final int enable_relay_toself_title=0x7f050341; /** Allow games via SMS */ - public static final int enable_sms=0x7f05023b; + public static final int enable_sms=0x7f05023e; /** Only if you have unlimited texting! */ - public static final int enable_sms_summary=0x7f05023c; + public static final int enable_sms_summary=0x7f05023f; /** XLATE-ME Skip radio when phone numbers same */ - public static final int enable_sms_toself_summary=0x7f050318; + public static final int enable_sms_toself_summary=0x7f05031b; /** XLATE-ME Short-circuit SMS to self */ - public static final int enable_sms_toself_title=0x7f050317; + public static final int enable_sms_toself_title=0x7f05031a; /** Tap tiles to select… */ public static final int entering_trade=0x7f0500e3; @@ -2460,11 +2466,11 @@ XLATE-ME device \"%1$s\" has already accepted an invitation to this game. */ - public static final int err_dup_invite_fmt=0x7f0502df; + public static final int err_dup_invite_fmt=0x7f0502e2; /** XLATE-ME Update checks URL */ - public static final int expl_update_url=0x7f050322; + public static final int expl_update_url=0x7f050325; /** if this preference is checked, a dialog will be posted every time a robot makes a move or a move is received from a remote player. @@ -2489,7 +2495,7 @@ XLATE-ME explanation of the above */ public static final int explain_robot_summary=0x7f050156; - public static final int fetching_from_relay=0x7f050345; + public static final int fetching_from_relay=0x7f050348; /** title of dialog brought up in response to the board_menu_game_final menu. The dialog displays the final score and an accounting of it (including subtractions for @@ -2519,13 +2525,13 @@ XLATE-ME /** XLATE-ME Pretend to have radio */ - public static final int force_radio_title=0x7f050319; + public static final int force_radio_title=0x7f05031c; /** Even if my screen is too small */ - public static final int force_tablet_summary=0x7f0502ca; + public static final int force_tablet_summary=0x7f0502cd; /** Force tablet layout */ - public static final int force_tablet_title=0x7f0502c9; + public static final int force_tablet_title=0x7f0502cc; /** ############################################################ # :Dialogs: @@ -2595,7 +2601,7 @@ XLATE-ME */ - public static final int game_btname_title=0x7f05020e; + public static final int game_btname_title=0x7f05020f; /** used to create default names of games (when user has not named them.) used to create default names of games (when user has not @@ -2638,7 +2644,7 @@ XLATE-ME Building game summary… */ - public static final int game_list_tmp=0x7f05022d; + public static final int game_list_tmp=0x7f050230; /** text of checkbox at top of dialog allowing to unlock in-play game to make changes text of checkbox at top of dialog allowing to unlock in-play @@ -2650,17 +2656,17 @@ XLATE-ME public static final int game_locked=0x7f0500b7; /** Name group */ - public static final int game_name_group_title=0x7f050270; + public static final int game_name_group_title=0x7f050273; /** XLATE-ME New game name: */ - public static final int game_name_label=0x7f050210; + public static final int game_name_label=0x7f050211; /** XLATE-ME Name your game */ - public static final int game_name_title=0x7f05020f; + public static final int game_name_title=0x7f050210; /** @@ -2675,7 +2681,7 @@ XLATE-ME /** XLATE-ME gameid */ - public static final int game_summary_field_gameid=0x7f050320; + public static final int game_summary_field_gameid=0x7f050323; /** Put the language there, so it reads "Game 2 (English)" Put the language there, so it reads "Game 2 (English)" Game language\u200C @@ -2685,7 +2691,7 @@ XLATE-ME /** XLATE-ME Pending packet count */ - public static final int game_summary_field_npackets=0x7f050321; + public static final int game_summary_field_npackets=0x7f050324; /** List names of opponents (summarized), e.g. "Game 2 (vs Kati)" List names of opponents (summarized), e.g. "Game 2 (vs Kati)" Opponent name[s] @@ -2695,7 +2701,7 @@ XLATE-ME /** XLATE-ME rowid */ - public static final int game_summary_field_rowid=0x7f05031f; + public static final int game_summary_field_rowid=0x7f050322; /** List the state of the game, "Game over" or "10 moves made" etc. List the state of the game, "Game over" or "10 moves made" @@ -2724,7 +2730,7 @@ XLATE-ME Check for updates */ - public static final int gamel_menu_checkupdates=0x7f05024e; + public static final int gamel_menu_checkupdates=0x7f050251; /** ############################################################ # :Menus: @@ -2767,46 +2773,46 @@ XLATE-ME /** XLATE-ME Load DB from SD card */ - public static final int gamel_menu_loaddb=0x7f050310; + public static final int gamel_menu_loaddb=0x7f050313; /** XLATE-ME %1$s/%2$s XLATE-ME Write DB to SD card */ - public static final int gamel_menu_storedb=0x7f05030f; + public static final int gamel_menu_storedb=0x7f050312; /** Studylist… */ - public static final int gamel_menu_study=0x7f05028b; - public static final int get_relay_number=0x7f05021c; + public static final int gamel_menu_study=0x7f05028e; + public static final int get_relay_number=0x7f05021f; /** Enter phone number: */ - public static final int get_sms_number=0x7f05021b; + public static final int get_sms_number=0x7f05021e; /** Get info */ - public static final int getinfo=0x7f0502be; + public static final int getinfo=0x7f0502c1; public static final int git_rev=0x7f050084; /** XLATE-ME Source version id */ - public static final int git_rev_title=0x7f05030a; + public static final int git_rev_title=0x7f05030d; /** Don\'t try a second time */ - public static final int got_langdict_summary=0x7f050324; + public static final int got_langdict_summary=0x7f050327; /** Fetch default wordlist for language */ - public static final int got_langdict_title=0x7f050323; + public static final int got_langdict_title=0x7f050326; /** Green */ public static final int green=0x7f050151; /** My games */ - public static final int group_cur_games=0x7f05026d; + public static final int group_cur_games=0x7f050270; /** New games */ - public static final int group_new_games=0x7f05026e; + public static final int group_new_games=0x7f050271; /** Used as the default name for remote players displayed within the Game configure screen Final state: game is over. @@ -2985,7 +2991,7 @@ XLATE-ME too? */ - public static final int inform_dict_diffdict_fmt=0x7f050259; + public static final int inform_dict_diffdict_fmt=0x7f05025c; /** You and the host of this @@ -2994,14 +3000,14 @@ XLATE-ME Used in formatting final scores display */ - public static final int inform_dict_diffversion_fmt=0x7f050257; + public static final int inform_dict_diffversion_fmt=0x7f05025a; /** \u0020(You will have to download it first.) */ - public static final int inform_dict_download=0x7f05025a; + public static final int inform_dict_download=0x7f05025d; /** Wordlist mismatch */ - public static final int inform_dict_title=0x7f050258; + public static final int inform_dict_title=0x7f05025b; /** Will new games, on default, randomly rearrange the start order of players. Will new games, on default, randomly rearrange the start @@ -3086,23 +3092,23 @@ XLATE-ME sms */ public static final int invite_chooser_sms=0x7f050186; - public static final int invite_copied=0x7f050340; + public static final int invite_copied=0x7f050343; /** %1$s has invited you to play Crosswords using the wordlist %2$s (for play in %3$s), but it is not installed. Would you like to download the wordlist or decline the invitation? */ - public static final int invite_dict_missing_body_fmt=0x7f05025f; + public static final int invite_dict_missing_body_fmt=0x7f050262; /** You have been invited to play Crosswords using the wordlist %2$s (for play in %3$s), but it is not installed. Would you like to download the wordlist? */ - public static final int invite_dict_missing_body_noname_fmt=0x7f050260; + public static final int invite_dict_missing_body_noname_fmt=0x7f050263; /** Missing wordlist */ - public static final int invite_dict_missing_title=0x7f05025e; - public static final int invite_dualpane=0x7f05034b; + public static final int invite_dict_missing_title=0x7f050261; + public static final int invite_dualpane=0x7f05034e; public static final int invite_host=0x7f05007f; /** This is the body of the html version of the invitation. A URL is created with parameters describing the game and @@ -3140,11 +3146,11 @@ XLATE-ME /** XLATE-ME Invite more than one player per remote device */ - public static final int invite_multi_summary=0x7f0502e3; + public static final int invite_multi_summary=0x7f0502e6; /** XLATE-ME Invite multiple */ - public static final int invite_multi_title=0x7f0502e2; + public static final int invite_multi_title=0x7f0502e5; /** Most users create games with only two players, which is the default, but Crosswords supports up to four. When I'm using the above string to encourage the opener of a game missing @@ -3179,6 +3185,7 @@ XLATE-ME */ public static final int invite_notice_title=0x7f050201; + public static final int invite_p2p_desc_extra=0x7f050218; public static final int invite_prefix=0x7f050086; /** Sending invitation to Crosswords on %1$s */ @@ -3194,7 +3201,7 @@ XLATE-ME expect it to take a while. They will still be able to connect.) */ - public static final int invite_stays=0x7f0502ee; + public static final int invite_stays=0x7f0502f1; /** Send invitation using SMS (texting) or via email? Send invitation using NFC (Android @@ -3243,7 +3250,7 @@ XLATE-ME public static final int invited_msg=0x7f0500e9; /** First line of debug-only Invites list dialog */ - public static final int invites_net_fmt=0x7f050231; + public static final int invites_net_fmt=0x7f050234; /** text of checkbox asking if user wants to search for open public rooms text of checkbox asking if user wants to search for open @@ -3428,44 +3435,44 @@ XLATE-ME different wordlists.) */ public static final int lang_label=0x7f0500bc; - public static final int lang_name_arabic=0x7f0502a8; - public static final int lang_name_catalan=0x7f0502af; - public static final int lang_name_czech=0x7f0502b2; - public static final int lang_name_danish=0x7f0502ac; - public static final int lang_name_dutch=0x7f0502ae; - public static final int lang_name_english=0x7f0502a4; - public static final int lang_name_french=0x7f0502a5; - public static final int lang_name_german=0x7f0502a6; - public static final int lang_name_greek=0x7f0502b3; - public static final int lang_name_italian=0x7f0502ad; - public static final int lang_name_polish=0x7f0502ab; - public static final int lang_name_portuguese=0x7f0502b0; - public static final int lang_name_russian=0x7f0502b1; - public static final int lang_name_slovak=0x7f0502b4; - public static final int lang_name_spanish=0x7f0502a9; - public static final int lang_name_swedish=0x7f0502aa; - public static final int lang_name_turkish=0x7f0502a7; + public static final int lang_name_arabic=0x7f0502ab; + public static final int lang_name_catalan=0x7f0502b2; + public static final int lang_name_czech=0x7f0502b5; + public static final int lang_name_danish=0x7f0502af; + public static final int lang_name_dutch=0x7f0502b1; + public static final int lang_name_english=0x7f0502a7; + public static final int lang_name_french=0x7f0502a8; + public static final int lang_name_german=0x7f0502a9; + public static final int lang_name_greek=0x7f0502b6; + public static final int lang_name_italian=0x7f0502b0; + public static final int lang_name_polish=0x7f0502ae; + public static final int lang_name_portuguese=0x7f0502b3; + public static final int lang_name_russian=0x7f0502b4; + public static final int lang_name_slovak=0x7f0502b7; + public static final int lang_name_spanish=0x7f0502ac; + public static final int lang_name_swedish=0x7f0502ad; + public static final int lang_name_turkish=0x7f0502aa; /** Unknown */ - public static final int lang_unknown=0x7f0502c7; + public static final int lang_unknown=0x7f0502ca; /** Game language/wordlist */ public static final int langdict_label=0x7f0500bd; /** Put new games here */ - public static final int list_group_default=0x7f05026a; + public static final int list_group_default=0x7f05026d; /** Delete group */ - public static final int list_group_delete=0x7f050268; + public static final int list_group_delete=0x7f05026b; /** Move down */ - public static final int list_group_movedown=0x7f05026c; + public static final int list_group_movedown=0x7f05026f; /** Move up */ - public static final int list_group_moveup=0x7f05026b; + public static final int list_group_moveup=0x7f05026e; /** Rename */ - public static final int list_group_rename=0x7f050269; + public static final int list_group_rename=0x7f05026c; /** ############## menu items ############## pulls up dialog to configure the selected game Used to format game name plus some other information as the @@ -3502,7 +3509,7 @@ XLATE-ME pulls up dialog to delete the selected game */ public static final int list_item_delete=0x7f05009e; - public static final int list_item_deselect=0x7f050348; + public static final int list_item_deselect=0x7f05034b; /** pulls up dialog to change the group of the selected game pulls up dialog to change the group of the selected game pulls up dialog to change the group of the selected game @@ -3541,18 +3548,18 @@ XLATE-ME except for any configuration. */ public static final int list_item_reset=0x7f05009f; - public static final int list_item_select=0x7f050347; + public static final int list_item_select=0x7f05034a; /** formatting for last move summary in notifications formatting for last move summary in notifications %1$s passed (0 points) */ - public static final int lmi_pass_fmt=0x7f0502d0; + public static final int lmi_pass_fmt=0x7f0502d3; /** %1$s lost a turn */ - public static final int lmi_phony_fmt=0x7f0502d1; + public static final int lmi_phony_fmt=0x7f0502d4; /** Tiles assigned to %1$s */ - public static final int lmi_tiles_fmt=0x7f0502d2; + public static final int lmi_tiles_fmt=0x7f0502d5; /** One of the strings used in the right column of the list of installed wordlists to describe those that are part of Crosswords and that cannot be uninstalled or moved. @@ -3594,24 +3601,24 @@ XLATE-ME public static final int loc_external=0x7f0500b3; /** All */ - public static final int loc_filters_all=0x7f0502a0; + public static final int loc_filters_all=0x7f0502a3; /** Latest menu */ - public static final int loc_filters_menu=0x7f0502a2; + public static final int loc_filters_menu=0x7f0502a5; /** Modified by me */ - public static final int loc_filters_modified=0x7f0502a3; + public static final int loc_filters_modified=0x7f0502a6; /** Filter by: */ - public static final int loc_filters_prompt=0x7f05029e; + public static final int loc_filters_prompt=0x7f0502a1; /** Latest screen */ - public static final int loc_filters_screen=0x7f0502a1; + public static final int loc_filters_screen=0x7f0502a4; /** Illegal translation: a translated string must have the same format specifiers (e.g. %1$s) as the original. */ - public static final int loc_fmts_mismatch=0x7f0502b9; + public static final int loc_fmts_mismatch=0x7f0502bc; /** see move_dictf above see move_dictf above see move_dictf above @@ -3619,30 +3626,30 @@ XLATE-ME public static final int loc_internal=0x7f0500b2; /** Check */ - public static final int loc_item_check=0x7f0502b6; + public static final int loc_item_check=0x7f0502b9; /** for loc item edit menu for loc item edit menu Clear */ - public static final int loc_item_clear=0x7f0502b5; + public static final int loc_item_clear=0x7f0502b8; /** Copy official */ - public static final int loc_item_copy_bless=0x7f0502b8; + public static final int loc_item_copy_bless=0x7f0502bb; /** Copy English */ - public static final int loc_item_copy_eng=0x7f0502b7; + public static final int loc_item_copy_eng=0x7f0502ba; /** %1$s (official) */ - public static final int loc_lang_blessed=0x7f050299; + public static final int loc_lang_blessed=0x7f05029c; /** %1$s (yours) */ - public static final int loc_lang_local=0x7f05029a; + public static final int loc_lang_local=0x7f05029d; /** Translate */ - public static final int loc_menu_xlate=0x7f050298; + public static final int loc_menu_xlate=0x7f05029b; /** Search for: */ - public static final int loc_search_prompt=0x7f05029f; + public static final int loc_search_prompt=0x7f0502a2; /** This is the "hint" printed in light text in the empty player name field ############################################################ @@ -3693,21 +3700,21 @@ XLATE-ME /** XLATE-ME Enable logging */ - public static final int logging_on=0x7f050301; + public static final int logging_on=0x7f050304; /** XLATE-ME (release builds only) */ - public static final int logging_on_summary=0x7f050302; + public static final int logging_on_summary=0x7f050305; /** Word lookup */ - public static final int lookup_title=0x7f050294; + public static final int lookup_title=0x7f050297; /** (Not in contacts) */ - public static final int manual_owner_name=0x7f050217; + public static final int manual_owner_name=0x7f050219; /** Max length @@ -3719,31 +3726,31 @@ XLATE-ME Chat */ - public static final int menu_chat=0x7f050229; + public static final int menu_chat=0x7f05022c; /** Flip board */ - public static final int menu_flip=0x7f050227; + public static final int menu_flip=0x7f05022a; /** Next hint */ - public static final int menu_hint_next=0x7f050224; + public static final int menu_hint_next=0x7f050227; /** Prev hint */ - public static final int menu_hint_prev=0x7f050223; + public static final int menu_hint_prev=0x7f050226; /** Juggle rack */ - public static final int menu_juggle=0x7f050226; + public static final int menu_juggle=0x7f050229; /** text of menu that brings up the Settings (preferences) dialog text of menu that brings up the Settings (preferences) dialog text of menu that brings up the Settings (preferences) dialog @@ -3751,19 +3758,19 @@ XLATE-ME public static final int menu_prefs=0x7f050095; /** Rate Crosswords */ - public static final int menu_rateme=0x7f050286; + public static final int menu_rateme=0x7f050289; /** Toggle values */ - public static final int menu_toggle_values=0x7f05022b; + public static final int menu_toggle_values=0x7f05022e; /** Zoom in/out */ - public static final int menu_zoom=0x7f050228; + public static final int menu_zoom=0x7f05022b; /** Min length @@ -3782,14 +3789,14 @@ XLATE-ME wordslist that's not installed Tap to download missing wordlist */ - public static final int missing_dict_detail=0x7f05025d; + public static final int missing_dict_detail=0x7f050260; /** Title of notification shown when invitation requires a wordslist that's not installed Title of notification shown when invitation requires a wordslist that's not installed Game invitation pending */ - public static final int missing_dict_title=0x7f05025c; + public static final int missing_dict_title=0x7f05025f; /** Used as a substitute for the names of remote players when they aren't available yet because the connection is not complete. Displayed in the lists of players found in each @@ -3946,26 +3953,26 @@ XLATE-ME public static final int msgs_progress=0x7f050097; /** %1$s moved more than %2$s ago. */ - public static final int nag_body_fmt=0x7f0502cd; + public static final int nag_body_fmt=0x7f0502d0; /** XLATE-ME Reminder intervals (minutes1,minutes2,...) */ - public static final int nag_intervals=0x7f050314; + public static final int nag_intervals=0x7f050317; /** Nagging: title of notification reminder message Nagging: title of notification reminder message Reminder: It\'s your turn */ - public static final int nag_title=0x7f0502cc; + public static final int nag_title=0x7f0502cf; /** above is inserted in this the last time I warn above is inserted in this the last time I warn Last warning: %1$s */ - public static final int nag_warn_last_fmt=0x7f0502ce; + public static final int nag_warn_last_fmt=0x7f0502d1; /** XLATE-ME %1$s copy */ - public static final int name_copy_fmt=0x7f050211; - public static final int name_dict_fmt=0x7f05030e; + public static final int name_copy_fmt=0x7f050212; + public static final int name_dict_fmt=0x7f050311; public static final int nbs_port=0x7f050085; /** text of checkbox. If this checkbox is checked, games created for network play will by default have the hint feature @@ -3994,15 +4001,15 @@ XLATE-ME /** XLATE-ME Game network stats */ - public static final int netstats_title=0x7f050309; + public static final int netstats_title=0x7f05030c; /** XLATE-ME For experienced players */ - public static final int network_advanced_summary=0x7f0502e1; + public static final int network_advanced_summary=0x7f0502e4; /** XLATE-ME Advanced */ - public static final int network_advanced_title=0x7f0502e0; + public static final int network_advanced_title=0x7f0502e3; /** Network game settings */ public static final int network_behavior=0x7f05015f; @@ -4018,13 +4025,13 @@ XLATE-ME Tap to download and install */ - public static final int new_app_avail=0x7f050253; + public static final int new_app_avail=0x7f050256; /** New version of %1$s */ - public static final int new_app_avail_fmt=0x7f050252; + public static final int new_app_avail_fmt=0x7f050255; /** New game via Bluetooth @@ -4043,37 +4050,37 @@ XLATE-ME New wordlist available */ - public static final int new_dict_avail=0x7f050250; + public static final int new_dict_avail=0x7f050253; /** Tap to update %1$s */ - public static final int new_dict_avail_fmt=0x7f050251; + public static final int new_dict_avail_fmt=0x7f050254; /** XLATE-ME New one-device game */ - public static final int new_game=0x7f0502d7; + public static final int new_game=0x7f0502da; /** XLATE-ME Would you like to create this game using default settings?\n\nOr would you like to configure it first? */ - public static final int new_game_message=0x7f0502da; + public static final int new_game_message=0x7f0502dd; /** XLATE-ME (You will have a chance to invite other players when it is open.) */ - public static final int new_game_message_net=0x7f0502dc; + public static final int new_game_message_net=0x7f0502df; /** XLATE-ME This game must be configured before it can be opened. */ - public static final int new_game_message_nodflt=0x7f0502db; + public static final int new_game_message_nodflt=0x7f0502de; /** XLATE-ME New networked game */ - public static final int new_game_networked=0x7f0502d8; + public static final int new_game_networked=0x7f0502db; /** @@ -4086,7 +4093,7 @@ XLATE-ME %1$s has invited you to play */ - public static final int new_name_body_fmt=0x7f050214; + public static final int new_name_body_fmt=0x7f050215; public static final int new_relay_body=0x7f050203; /** hint (text shown when field is empty) for room name field hint (text shown when field is empty) for room name field @@ -4266,16 +4273,16 @@ XLATE-ME */ - public static final int newgame_sms_header=0x7f050212; + public static final int newgame_sms_header=0x7f050213; /** Name your new group: */ - public static final int newgroup_label=0x7f050267; + public static final int newgroup_label=0x7f05026a; /** XLATE-ME To invite via NFC just touch the back of this device against the one you want to invite—any time the game is open. */ - public static final int nfc_just_tap=0x7f0502ef; + public static final int nfc_just_tap=0x7f0502f2; /** XLATE-ME GSM XLATE-ME @@ -4283,7 +4290,7 @@ XLATE-ME XLATE-ME Send via NFC to self? */ - public static final int nfc_to_self=0x7f05031e; + public static final int nfc_to_self=0x7f050321; /** Title of dialog for renaming game (triggered by selecting list_item_rename) If you try to copy a networked game you get this error @@ -4525,10 +4532,10 @@ XLATE-ME you get this error message */ public static final int no_games_to_refresh=0x7f050098; - public static final int no_invites=0x7f05034a; + public static final int no_invites=0x7f05034d; /** Google Play app not found */ - public static final int no_market=0x7f050287; + public static final int no_market=0x7f05028a; /** displayed when you long-tap a scoreboard entry and there's no most recent score to show displayed when you long-tap a scoreboard entry and there's no @@ -4552,7 +4559,7 @@ XLATE-ME substituted. */ public static final int no_name_found_fmt=0x7f0500c4; - public static final int no_relay_conn=0x7f050331; + public static final int no_relay_conn=0x7f050334; /** This is not currently shown Crosswords wordlists, which are just compressed lists of words plus tile information, determine @@ -4599,7 +4606,7 @@ XLATE-ME selection instead of exiting. Hit it again to exit the app. */ - public static final int not_again_backclears=0x7f05027a; + public static final int not_again_backclears=0x7f05027d; /** This button opens the wordlist @@ -4627,11 +4634,11 @@ XLATE-ME /** EXPERIMENTAL: Newbie hint next when invite_choice_clip shown when chosen */ - public static final int not_again_clip_expl_fmt=0x7f050342; - public static final int not_again_comms_bt=0x7f05033a; - public static final int not_again_comms_p2p=0x7f05033b; - public static final int not_again_comms_relay=0x7f050338; - public static final int not_again_comms_sms=0x7f050339; + public static final int not_again_clip_expl_fmt=0x7f050345; + public static final int not_again_comms_bt=0x7f05033d; + public static final int not_again_comms_p2p=0x7f05033e; + public static final int not_again_comms_relay=0x7f05033b; + public static final int not_again_comms_sms=0x7f05033c; /** This is shown in the Board screen when you successfully connecting a game to the relay and are the last device in the game to do so, i.e. the game is now complete and you should @@ -4682,7 +4689,7 @@ XLATE-ME for games with more than two devices, which are rare. */ public static final int not_again_conndmid=0x7f0501ca; - public static final int not_again_dfltname_fmt=0x7f050349; + public static final int not_again_dfltname_fmt=0x7f05034c; /** This screen lets you install new wordslists and view the ones you already have.\n\nWhat wordlists you have installed determines:\n• What languages you can play @@ -4690,7 +4697,7 @@ XLATE-ME legal.\n\nCheck the \"Show downloadable\" box at the top to see what\'s available. */ - public static final int not_again_dicts=0x7f0502c8; + public static final int not_again_dicts=0x7f0502cb; /** This is shown when you choose the board_menu_done menu item. It's to let you know that there's a shortcut that does almost the same thing. @@ -4711,7 +4718,7 @@ XLATE-ME and want them back, enable them now. You can turn them off again in Settings. */ - public static final int not_again_enablepublic=0x7f0502f6; + public static final int not_again_enablepublic=0x7f0502f9; /** Shown when you tap the flip button on the toolbar of the main Board screen Shown when you tap the flip button on the toolbar of the main @@ -4727,7 +4734,7 @@ XLATE-ME the same ones as the original.\n\n(You will not be able to save it unless it does.) */ - public static final int not_again_fmt_expl=0x7f0502ba; + public static final int not_again_fmt_expl=0x7f0502bd; /** XLATE-ME These two buttons do the same thing as the first two items in this window\'s Action Bar @@ -4736,7 +4743,7 @@ XLATE-ME section of App settings). */ - public static final int not_again_hidenewgamebuttons=0x7f0502e8; + public static final int not_again_hidenewgamebuttons=0x7f0502eb; /** Shown when you tap the next hint button on the toolbar of the main Board screen Shown when you tap the next hint button on the toolbar of the @@ -4804,13 +4811,13 @@ XLATE-ME then act on selected games, e.g. to delete them, using the menu or \"Actionbar.\" */ - public static final int not_again_newselect=0x7f050279; - public static final int not_again_rematch_two_only=0x7f05033d; + public static final int not_again_newselect=0x7f05027c; + public static final int not_again_rematch_two_only=0x7f050340; /** The selected words will be copied to the system clipboard. You can then paste them into any app that supports pasting text, e.g. an email app. */ - public static final int not_again_studycopy=0x7f050293; + public static final int not_again_studycopy=0x7f050296; /** The following strings (all whose names start with "not_again") appear in the New user info dialog. @@ -4909,7 +4916,7 @@ XLATE-ME public static final int not_again_values=0x7f0501c6; /** (None) */ - public static final int note_none=0x7f0502c4; + public static final int note_none=0x7f0502c7; public static final int notify_chat_body_fmt=0x7f0501ab; public static final int notify_chat_title_fmt=0x7f0501aa; /** This text is displayed as the "summary" for both of the @@ -4960,7 +4967,8 @@ XLATE-ME /** XLATE-ME Number on this device */ - public static final int nplayers_prompt=0x7f0502de; + public static final int nplayers_prompt=0x7f0502e1; + public static final int p2p_invite_title=0x7f05020e; /** text of label identifying the field where human players can enter an option password. The label and field disappear when the robot player checkbox is checked because it makes no @@ -4991,7 +4999,7 @@ XLATE-ME play – if he/she is also using NFC. \u0020pct. */ - public static final int pct_suffix=0x7f050285; + public static final int pct_suffix=0x7f050288; /** If this preference is checked, tapping on the scoreboard entry for any player reveals that player's tiles and any pending move (after asking for his password if one is set.) @@ -5043,7 +5051,7 @@ XLATE-ME Connected number[s]: */ - public static final int phone_label=0x7f05021f; + public static final int phone_label=0x7f050222; /** Don't warn, but simply force to skip turn (give 0 points) when user attempts to play word not in the wordlist. Don't warn, but simply force to skip turn (give 0 points) @@ -5396,27 +5404,27 @@ XLATE-ME non-networked games */ public static final int players_label_standalone=0x7f0500b8; - public static final int post_dualpane_off_body=0x7f050350; - public static final int post_dualpane_on_body=0x7f05034f; - public static final int post_dualpane_title=0x7f05034e; + public static final int post_dualpane_off_body=0x7f050353; + public static final int post_dualpane_on_body=0x7f050352; + public static final int post_dualpane_title=0x7f050351; /** Prefs related to in-app localization */ - public static final int pref_group_l10n_summary=0x7f05032a; + public static final int pref_group_l10n_summary=0x7f05032d; /** Localization Stuff */ - public static final int pref_group_l10n_title=0x7f050329; + public static final int pref_group_l10n_title=0x7f05032c; /** Prefs related to play via internet/relay */ - public static final int pref_group_relay_summary=0x7f050328; + public static final int pref_group_relay_summary=0x7f05032b; /** Relay Stuff */ - public static final int pref_group_relay_title=0x7f050327; + public static final int pref_group_relay_title=0x7f05032a; /** Prefs related to play-via-sms */ - public static final int pref_group_sms_summary=0x7f050326; + public static final int pref_group_sms_summary=0x7f050329; /** SMS Stuff */ - public static final int pref_group_sms_title=0x7f050325; + public static final int pref_group_sms_title=0x7f050328; /** Label for the first "human player" name preference Label for the first "human player" name preference Human player @@ -5424,10 +5432,10 @@ XLATE-ME public static final int pref_human_name=0x7f050129; /** Get intermediate builds */ - public static final int pref_item_update_summary=0x7f05032c; + public static final int pref_item_update_summary=0x7f05032f; /** Update between releases */ - public static final int pref_item_update_title=0x7f05032b; + public static final int pref_item_update_title=0x7f05032e; /** Label for the first player color preference Label for the first player color preference First player @@ -5631,11 +5639,11 @@ XLATE-ME Used when prev player's name can't be looked up Your opponent */ - public static final int prev_player=0x7f0502cf; - public static final int processing_games=0x7f050346; + public static final int prev_player=0x7f0502d2; + public static final int processing_games=0x7f050349; /** Downloading */ - public static final int progress_title=0x7f0502c2; + public static final int progress_title=0x7f0502c5; /** Words no longer than @@ -5651,7 +5659,7 @@ XLATE-ME /** XLATE-ME Relay device port */ - public static final int proxy_port=0x7f05030d; + public static final int proxy_port=0x7f050310; /** Short for "points", this is shown at the right end of the tray in place of the first tile placed along with the points the current move would earn if committed. @@ -5685,16 +5693,16 @@ XLATE-ME middle of a game, like "do you want to commit this move?" */ public static final int query_title=0x7f0501b9; - public static final int radio_name_cdma=0x7f05031d; - public static final int radio_name_gsm=0x7f05031c; + public static final int radio_name_cdma=0x7f050320; + public static final int radio_name_gsm=0x7f05031f; /** XLATE-ME Don\'t pretend */ - public static final int radio_name_real=0x7f05031a; + public static final int radio_name_real=0x7f05031d; /** XLATE-ME Tablet/no radio */ - public static final int radio_name_tablet=0x7f05031b; + public static final int radio_name_tablet=0x7f05031e; /** ############################################################ # :Dialogs: @@ -5734,8 +5742,8 @@ XLATE-ME /** XLATE-ME Invite redirect host */ - public static final int redir_host=0x7f0502ff; - public static final int rel_invite_title=0x7f050344; + public static final int redir_host=0x7f050302; + public static final int rel_invite_title=0x7f050347; /** Title of dialog used to alert players to relay-related problems with the current game. the color of text, e.g. "2L", shown on a bonus square on the @@ -5751,7 +5759,7 @@ XLATE-ME public static final int relay_alert=0x7f0500f2; /** Message from relay */ - public static final int relay_alert_title=0x7f050278; + public static final int relay_alert_title=0x7f05027b; public static final int relay_behavior=0x7f050161; /** explanation of the above */ @@ -5759,33 +5767,33 @@ XLATE-ME /** XLATE-ME Relay host */ - public static final int relay_host=0x7f0502fe; + public static final int relay_host=0x7f050301; public static final int relay_invite_title=0x7f05020d; /** XLATE-ME Relay game port */ - public static final int relay_port=0x7f05030c; + public static final int relay_port=0x7f05030f; /** Shown in toast when relaunching after switching dicts Shown in toast when relaunching after switching dicts Reloading game with %1$s Shown in toast when relaunching after switching dicts */ - public static final int reload_new_dict_fmt=0x7f05025b; + public static final int reload_new_dict_fmt=0x7f05025e; /** XLATE-ME Issuing rematch invitation. You will see this message until it has been accepted.\n\nYou do not need to keep this game open while waiting. You will be notified when the game is ready to play. */ - public static final int rematch_msg=0x7f0502f5; - public static final int rematch_name_fmt=0x7f0502d9; - public static final int rematch_sent_toast=0x7f0502f4; + public static final int rematch_msg=0x7f0502f8; + public static final int rematch_name_fmt=0x7f0502dc; + public static final int rematch_sent_toast=0x7f0502f7; /** Processing wordlist information… */ - public static final int remote_digesting=0x7f0502bc; + public static final int remote_digesting=0x7f0502bf; /** Fetching wordlist information from server… */ - public static final int remote_empty=0x7f0502bb; + public static final int remote_empty=0x7f0502be; /** checkbox determining of this player is on this device or remote. If remote, then the rest of the fields disappear (since they will be set by the remote device.) @@ -5801,16 +5809,16 @@ XLATE-ME /** Unable to fetch wordlist information from server. */ - public static final int remote_no_net=0x7f0502bd; + public static final int remote_no_net=0x7f0502c0; /** Remote device undid a turn. */ - public static final int remote_undone=0x7f050222; + public static final int remote_undone=0x7f050225; /** Change the name of this group to: */ - public static final int rename_group_label=0x7f05026f; + public static final int rename_group_label=0x7f050272; /** text within rename dialog (triggered by selecting list_item_rename) text within rename dialog (triggered by selecting @@ -5875,16 +5883,16 @@ XLATE-ME title for popup of public rooms found on server */ public static final int room_public_prompt=0x7f0500c2; - public static final int seeking_relay=0x7f050330; + public static final int seeking_relay=0x7f050333; /** Games: %1$d */ - public static final int sel_games_fmt=0x7f05027b; + public static final int sel_games_fmt=0x7f05027e; /** Groups: %1$d */ - public static final int sel_groups_fmt=0x7f05027c; + public static final int sel_groups_fmt=0x7f05027f; /** Selected: %1$d */ - public static final int sel_items_fmt=0x7f050297; + public static final int sel_items_fmt=0x7f05029a; /** ############################################################ # :Dialogs: @@ -5908,7 +5916,7 @@ XLATE-ME /** XLATE-ME Hide buttons */ - public static final int set_pref=0x7f0502e7; + public static final int set_pref=0x7f0502ea; /** text of separator marking out other-setting area of the dialog see move_dictf above @@ -5969,10 +5977,10 @@ XLATE-ME public static final int show_arrow_summary=0x7f050142; /** Show downloadable */ - public static final int show_remote=0x7f0502c0; + public static final int show_remote=0x7f0502c3; /** Wordlist browser */ - public static final int show_wordlist_browser=0x7f050277; + public static final int show_wordlist_browser=0x7f05027a; /** If this preference is checked, the user will not be asked to confirm after selecting the "Turn done" menu (or tapping the points display at the right end of the tray) @@ -5994,16 +6002,16 @@ XLATE-ME public static final int skip_confirm_turn_summary=0x7f050158; /** Delete selected */ - public static final int slmenu_clear_sel=0x7f05028d; + public static final int slmenu_clear_sel=0x7f050290; /** Copy to clipboard */ - public static final int slmenu_copy_sel=0x7f05028c; + public static final int slmenu_copy_sel=0x7f05028f; /** Unselect all */ - public static final int slmenu_deselect_all=0x7f050296; + public static final int slmenu_deselect_all=0x7f050299; /** Select all */ - public static final int slmenu_select_all=0x7f050295; + public static final int slmenu_select_all=0x7f050298; /** XLATE-ME The version of Crosswords on the phone with number \"%1$s\" is incompatible with this one for play @@ -6018,13 +6026,13 @@ XLATE-ME public static final int sms_invite_title=0x7f05020c; /** Tap the receiving device now */ - public static final int sms_ready_text=0x7f050284; + public static final int sms_ready_text=0x7f050287; /** Square rack tiles */ - public static final int square_tiles=0x7f050274; + public static final int square_tiles=0x7f050277; /** Even if they can be taller */ - public static final int square_tiles_summary=0x7f050275; + public static final int square_tiles_summary=0x7f050278; /** Used in formatting moves and history Used to separate names of players when listing them on one line in a game summary. The \u0020 is a space in xml. @@ -6112,7 +6120,7 @@ XLATE-ME placed, i.e. they do not form a single word. */ public static final int str_no_empties_in_turn=0x7f050191; - public static final int str_no_hint_found=0x7f05033c; + public static final int str_no_hint_found=0x7f05033f; /** Same as above, but used when you try to show tiles belonging to a player on another device (a remote player.) Same as above, but used when you try to show tiles belonging @@ -6183,8 +6191,8 @@ XLATE-ME public static final int str_phony_rejected=0x7f050115; /** [#%d] %s: %d */ - public static final int str_placer_fmt=0x7f050256; - /** Shown when using the the Game configure screen to configure a + public static final int str_placer_fmt=0x7f050259; + /** Shown when using the Game configure screen to configure a networked game and you try to make all players local. Shown when using the the Game configure screen to configure a networked game and you try to make all players local. @@ -6225,7 +6233,7 @@ XLATE-ME public static final int str_remote_moved_fmt=0x7f05010e; /** [Resigned] %s: %d */ - public static final int str_resigned_fmt=0x7f050255; + public static final int str_resigned_fmt=0x7f050258; /** ############################################################ # Board info/error dialog messages @@ -6339,7 +6347,7 @@ XLATE-ME Used in formatting final scores display [Winner] %s: %d */ - public static final int str_winner_fmt=0x7f050254; + public static final int str_winner_fmt=0x7f050257; /** Used in formatting game history (not move summaries since information about the current rack is hidden then) Used in formatting game history (not move summaries since @@ -6432,18 +6440,18 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Your words for: */ - public static final int study_langpick=0x7f050290; + public static final int study_langpick=0x7f050293; /** You have not yet saved any words into a studylist for %1$s. */ - public static final int study_no_lang_fmt=0x7f050291; + public static final int study_no_lang_fmt=0x7f050294; /** You have not yet saved any words into a studylist. */ - public static final int study_no_lists=0x7f050292; + public static final int study_no_lists=0x7f050295; /** Studylist for %1$s */ - public static final int studylist_title_fmt=0x7f05028f; + public static final int studylist_title_fmt=0x7f050292; /** If substituting an existing same-language wordlist by choosing button_substdict user gets to choose from a list of wordlists. This is the title of that list. @@ -6456,7 +6464,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Game in play @@ -6468,7 +6476,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Game in play with %1$s */ - public static final int summary_conn_sms_fmt=0x7f050220; + public static final int summary_conn_sms_fmt=0x7f050223; /** Preference to control what's listed next to game name in the first line of a game summary in the main games-list screen, e.g., if the option is "Game Language", "English" in the @@ -6553,7 +6561,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020(GSM phones only) */ - public static final int summary_send_data_sms=0x7f050306; + public static final int summary_send_data_sms=0x7f050309; /** explanation of the above explanation of the above Sort racks whenever new tiles @@ -6564,10 +6572,10 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Offer to add to and display lists of words to remember */ - public static final int summary_studyon=0x7f05028a; + public static final int summary_studyon=0x7f05028d; /** Thumbnail size */ - public static final int summary_thumbsize=0x7f05027d; + public static final int summary_thumbsize=0x7f050280; /** Unconnected @@ -6593,7 +6601,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Disabled */ - public static final int thumb_off=0x7f05027e; + public static final int thumb_off=0x7f050281; /** color of the tiles' background color of the "crosshairs", lines drawn vertically and horizontally through the square the user is currently @@ -6638,7 +6646,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Communicate via */ - public static final int title_addrs_pref=0x7f0502d6; + public static final int title_addrs_pref=0x7f0502d9; /** ############################################################ # :Screens: @@ -6759,7 +6767,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Send SMS as data */ - public static final int title_send_data_sms=0x7f050305; + public static final int title_send_data_sms=0x7f050308; /** If this preference is checked, tiles in the rack will be re-ordered alphabetically whenever tiles are added, i.e. after ever move. @@ -6774,7 +6782,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Enable studylists */ - public static final int title_studyon=0x7f050289; + public static final int title_studyon=0x7f05028c; /** title of dialog allowing user to pick tiles "face up". (This feature is not yet supported on Android.) @@ -6883,11 +6891,11 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020 */ - public static final int update_dicts_fmt=0x7f0502c1; + public static final int update_dicts_fmt=0x7f0502c4; /** XLATE-ME Use defaults */ - public static final int use_defaults=0x7f0502dd; + public static final int use_defaults=0x7f0502e0; /** text of checkbox controlling whether there's a game timer text of checkbox. If this checkbox is checked, games created for network play will by default have the hint feature @@ -6906,37 +6914,37 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020Waiting for players */ - public static final int waiting_title=0x7f0502e9; + public static final int waiting_title=0x7f0502ec; /** XLATE-ME Bluetooth is currently off on this device. No moves will be sent via Bluetooth.\n\nYou can enable Bluetooth now, or later. */ - public static final int warn_bt_disabled=0x7f050244; + public static final int warn_bt_disabled=0x7f050247; /** XLATE-ME Every networked game must have at least one way of communicating. If you have no default connection options every new networked game will have to be configured manually. */ - public static final int warn_no_comms=0x7f0502f0; + public static final int warn_no_comms=0x7f0502f3; /** The number %1$s for %2$s is not a \"mobile\" number. Import anyway? */ - public static final int warn_nomobile_fmt=0x7f050218; - public static final int warn_relay_disabled=0x7f050245; - public static final int warn_relay_havegames=0x7f050248; - public static final int warn_relay_later=0x7f050246; - public static final int warn_relay_remove=0x7f050247; + public static final int warn_nomobile_fmt=0x7f05021a; + public static final int warn_relay_disabled=0x7f050248; + public static final int warn_relay_havegames=0x7f05024b; + public static final int warn_relay_later=0x7f050249; + public static final int warn_relay_remove=0x7f05024a; /** Play via SMS is currently @@ -6949,15 +6957,15 @@ activer les parties par SMS, allez dans Paramètres->Paramètres des parties en réseau.) */ - public static final int warn_sms_disabled=0x7f050243; + public static final int warn_sms_disabled=0x7f050246; /** Are you certain this number is on an account with unlimited texting? Click cancel if you are not. */ - public static final int warn_unlimited=0x7f050221; - public static final int wifi_warning=0x7f050334; + public static final int warn_unlimited=0x7f050224; + public static final int wifi_warning=0x7f050337; /** First letters @@ -6966,14 +6974,14 @@ réseau.) public static final int word_search_hint=0x7f0501e6; /** Add option to every screen menu */ - public static final int xlations_enabled_summary=0x7f05029c; + public static final int xlations_enabled_summary=0x7f05029f; /** Enable local translating */ - public static final int xlations_enabled_title=0x7f05029b; + public static final int xlations_enabled_title=0x7f05029e; /** XLATE-ME Fake locale for translation */ - public static final int xlations_locale=0x7f050312; + public static final int xlations_locale=0x7f050315; /** Empty in English, this should contain the name of the translator/creator of the strings.xml file for this language diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 0e4fff2a3..dbae47a20 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -403,7 +403,7 @@ when user attempts to play word not in the wordlist. --> Disallow phonies - At least one player must be marked \"Remote\" for a game started as Host. @@ -975,7 +975,7 @@ Edit colors used on the board @@ -1921,6 +1921,7 @@ SMS Invitation Relay Invitation + WiFi Direct Invitation Bluetooth game name @@ -1956,6 +1957,20 @@ Please check the %1$d devices you want to invite to your new game, then tap \"%2$s\". + + + Please select the name of the + WiFiDirect device you want to invite to your new game, then tap + \"%2$s\". + Please select the %1$d WiFiDirect device names you + want to invite to your new game, then tap \"%2$s\". + + + Only devices that are + currently available are shown. If a nearby device isn\'t showing + up please make sure that WiFi is turned on, that Crosswords is + installed, and that play via WiFi Direct is enabled. + (Not in contacts) @@ -1965,6 +1980,11 @@ This phone list is empty. Use the \"Import contact\" button to add people you want to invite, the + button to enter numbers directly. + + + There are currently no devices + reachable via WiFiDirect that have Crosswords installed. + This list of devices is empty. Use the \"Scan games\" button to scan your old games diff --git a/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml b/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml index 684534942..22b41b7a2 100644 --- a/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml @@ -342,7 +342,7 @@ Wollasid seinohp - Ta tsael eno reyalp tsum eb dekram \"Etomer\" rof a emag detrats sa Tsoh. @@ -839,7 +839,7 @@ Tide sroloc desu no eht draob @@ -1657,6 +1657,7 @@ SMS Noitativni Yaler Noitativni + IfIw Tcerid Noitativni Htooteulb emag eman @@ -1692,6 +1693,18 @@ ot ruoy wen ,emag neht pat \"%2$s\". + + Esaelp tceles eht eman fo eht + TcErIdifiw ecived uoy tnaw ot etivni ot ruoy wen ,emag neht pat + \"%2$s\". + Esaelp tceles eht %1$d TcErIdifiw ecived seman uoy + tnaw ot etivni ot ruoy wen ,emag neht pat \"%2$s\". + + Ylno secived taht era + yltnerruc elbaliava era nwohs. Fi a ybraen ecived nsi\'t gniwohs + pu esaelp ekam erus taht IfIw si denrut ,no taht Sdrowssorc si + ,dellatsni dna taht yalp aiv IfIw Tcerid si delbane. + tOn( ni )stcatnoc Eht rebmun %1$s rof %2$s si ton @@ -1700,6 +1713,9 @@ Siht enohp tsil si ytpme. Esu eht \"Tropmi tcatnoc\" nottub ot dda elpoep uoy tnaw ot ,etivni eht + nottub ot retne srebmun yltcerid. + + Ereht era yltnerruc on secived + elbahcaer aiv TcErIdifiw taht evah Sdrowssorc dellatsni. Siht tsil fo secived si ytpme. Esu eht \"Nacs semag\" nottub ot nacs ruoy dlo semag diff --git a/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml b/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml index 200e89d7d..6a21980f4 100644 --- a/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml +++ b/xwords4/android/XWords4/res_src/values-ca_PS/strings.xml @@ -342,7 +342,7 @@ DISALLOW PHONIES - AT LEAST ONE PLAYER MUST BE MARKED \"REMOTE\" FOR A GAME STARTED AS HOST. @@ -839,7 +839,7 @@ EDIT COLORS USED ON THE BOARD @@ -1657,6 +1657,7 @@ SMS INVITATION RELAY INVITATION + WIFI DIRECT INVITATION BLUETOOTH GAME NAME @@ -1692,6 +1693,18 @@ TO YOUR NEW GAME, THEN TAP \"%2$s\". + + PLEASE SELECT THE NAME OF THE + WIFIDIRECT DEVICE YOU WANT TO INVITE TO YOUR NEW GAME, THEN TAP + \"%2$s\". + PLEASE SELECT THE %1$d WIFIDIRECT DEVICE NAMES YOU + WANT TO INVITE TO YOUR NEW GAME, THEN TAP \"%2$s\". + + ONLY DEVICES THAT ARE + CURRENTLY AVAILABLE ARE SHOWN. IF A NEARBY DEVICE ISN\'T SHOWING + UP PLEASE MAKE SURE THAT WIFI IS TURNED ON, THAT CROSSWORDS IS + INSTALLED, AND THAT PLAY VIA WIFI DIRECT IS ENABLED. + (NOT IN CONTACTS) THE NUMBER %1$s FOR %2$s IS NOT @@ -1700,6 +1713,9 @@ THIS PHONE LIST IS EMPTY. USE THE \"IMPORT CONTACT\" BUTTON TO ADD PEOPLE YOU WANT TO INVITE, THE + BUTTON TO ENTER NUMBERS DIRECTLY. + + THERE ARE CURRENTLY NO DEVICES + REACHABLE VIA WIFIDIRECT THAT HAVE CROSSWORDS INSTALLED. THIS LIST OF DEVICES IS EMPTY. USE THE \"SCAN GAMES\" BUTTON TO SCAN YOUR OLD GAMES diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java index 009611377..e6e93ca38 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java @@ -673,9 +673,9 @@ public class BoardDelegate extends DelegateBase case RELAY_INVITE_RESULT: missingMeans = InviteMeans.RELAY; break; - // case P2P_INVITE_RESULT: - // missingMeans = InviteMeans.WIFIDIRECT; - // break; + case P2P_INVITE_RESULT: + missingMeans = InviteMeans.WIFIDIRECT; + break; } if ( null != missingMeans ) { @@ -1117,6 +1117,11 @@ public class BoardDelegate extends DelegateBase RelayInviteDelegate.launchForResult( m_activity, m_nMissing, RequestCode.RELAY_INVITE_RESULT ); break; + case WIFIDIRECT: + WiDirInviteDelegate.launchForResult( m_activity, + m_nMissing, + RequestCode.P2P_INVITE_RESULT ); + break; case EMAIL: case CLIPBOARD: NetLaunchInfo nli = new NetLaunchInfo( m_summary, m_gi, 1, @@ -2462,6 +2467,9 @@ public class BoardDelegate extends DelegateBase DbgUtils.logex( nfi ); } break; + case WIFIDIRECT: + WiDirService.inviteRemote( m_activity, dev, nli ); + break; } if ( null != dev ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java index a54047dff..8229392b8 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java @@ -727,19 +727,19 @@ public class DlgDelegate { items.add( getString( R.string.invite_choice_bt ) ); means.add( DlgClickNotify.InviteMeans.BLUETOOTH ); } + if ( XWApp.RELAYINVITE_SUPPORTED ) { + items.add( getString( R.string.invite_choice_relay ) ); + means.add( DlgClickNotify.InviteMeans.RELAY ); + } + if ( WiDirService.supported() ) { + items.add( getString( R.string.invite_choice_p2p ) ); + means.add( DlgClickNotify.InviteMeans.WIFIDIRECT ); + } if ( XWPrefs.getNFCToSelfEnabled( m_activity ) || NFCUtils.nfcAvail( m_activity )[0] ) { items.add( getString( R.string.invite_choice_nfc ) ); means.add( DlgClickNotify.InviteMeans.NFC ); } - if ( XWApp.RELAYINVITE_SUPPORTED ) { - items.add( getString( R.string.invite_choice_relay ) ); - means.add( DlgClickNotify.InviteMeans.RELAY ); - } - // if ( WiDirService.supported() ) { - // items.add( getString( R.string.invite_choice_p2p ) ); - // means.add( DlgClickNotify.InviteMeans.WIFIDIRECT ); - // } items.add( getString( R.string.slmenu_copy_sel ) ); means.add( DlgClickNotify.InviteMeans.CLIPBOARD ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/RequestCode.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/RequestCode.java index 7cea6fc14..7220a6324 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/RequestCode.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/RequestCode.java @@ -28,7 +28,7 @@ public enum RequestCode { BT_INVITE_RESULT, SMS_INVITE_RESULT, RELAY_INVITE_RESULT, - // P2P_INVITE_RESULT, + P2P_INVITE_RESULT, // PermUtils PERM_REQUEST, diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteActivity.java new file mode 100644 index 000000000..595a4b2cb --- /dev/null +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteActivity.java @@ -0,0 +1,35 @@ +/* -*- compile-command: "find-and-ant.sh debug install"; -*- */ +/* + * Copyright 2012 by Eric House (xwords@eehouse.org). All rights + * reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.eehouse.android.xw4; + +import android.os.Bundle; + +public class WiDirInviteActivity extends InviteActivity { + + private WiDirInviteDelegate m_dlgt; + + @Override + protected void onCreate( Bundle savedInstanceState ) + { + m_dlgt = new WiDirInviteDelegate( this, savedInstanceState ); + super.onCreate( savedInstanceState, m_dlgt ); + } +} diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteDelegate.java new file mode 100644 index 000000000..f924ff320 --- /dev/null +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirInviteDelegate.java @@ -0,0 +1,104 @@ +/* -*- compile-command: "find-and-ant.sh debug install"; -*- */ +/* + * Copyright 2016 by Eric House (xwords@eehouse.org). All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.eehouse.android.xw4; + +import android.widget.ArrayAdapter; +import android.app.Activity; +import android.content.Context; +import android.database.Cursor; +import android.os.Bundle; +import android.content.Intent; +import java.util.Map; +import java.util.Iterator; + + +import junit.framework.Assert; + +public class WiDirInviteDelegate extends InviteDelegate + implements WiDirService.DevSetListener { + private static final String SAVE_NAME = "SAVE_NAME"; + private Map m_macsToName; + private Activity m_activity; + + public static void launchForResult( Activity activity, int nMissing, + RequestCode requestCode ) + { + Intent intent = new Intent( activity, WiDirInviteActivity.class ); + intent.putExtra( INTENT_KEY_NMISSING, nMissing ); + activity.startActivityForResult( intent, requestCode.ordinal() ); + } + + public WiDirInviteDelegate( Delegator delegator, Bundle savedInstanceState ) + { + super( delegator, savedInstanceState, R.layout.inviter ); + m_activity = delegator.getActivity(); + } + + @Override + protected void init( Bundle savedInstanceState ) + { + String msg = getString( R.string.button_invite ); + msg = getQuantityString( R.plurals.invite_p2p_desc_fmt, m_nMissing, + m_nMissing, msg ); + msg += "\n\n" + getString( R.string.invite_p2p_desc_extra ); + super.init( R.id.button_invite, R.id.invite_desc, msg ); + } + + @Override + protected void onResume() + { + super.onResume(); + WiDirService.registerDevSetListener( this ); + } + + @Override + protected void onPause() + { + super.onPause(); + WiDirService.unregisterDevSetListener( this ); + } + + // DevSetListener interface + public void setChanged( Map macToName ) + { + m_macsToName = macToName; + runOnUiThread( new Runnable() { + @Override + public void run() { + rebuildList(); + } + } ); + } + + private void rebuildList() + { + int count = m_macsToName.size(); + String[] names = new String[count]; + String[] addrs = new String[count]; + Iterator iter = m_macsToName.keySet().iterator(); + for ( int ii = 0; ii < count; ++ii ) { + String mac = iter.next(); + addrs[ii] = mac; + names[ii] = m_macsToName.get(mac); + } + + updateListAdapter( R.layout.inviter_item, names, addrs, false ); + } +} diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirService.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirService.java index bbf690c1c..31a57cff4 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirService.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/WiDirService.java @@ -51,11 +51,13 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.Map; import java.util.Set; -import java.util.Collection; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -87,8 +89,9 @@ public class WiDirService extends XWService { private static final String KEY_GAMEID = "gmid"; private static final String KEY_DATA = "data"; - private static final String KEY_MAC = "myMac"; + private static final String KEY_MAC = "mac"; private static final String KEY_NAME = "name"; + private static final String KEY_MAP = "map"; private static final String KEY_RETADDR = "raddr"; private static final String CMD_PING = "ping"; @@ -111,12 +114,19 @@ public class WiDirService extends XWService { private static BiDiSockWrap.Iface sIface; private static Map sSocketWrapMap = new HashMap(); + private static Map sUserMap = new HashMap(); private static Map sPendingDevs = new HashMap(); private static String sMacAddress; private static String sDeviceName; + private static Set s_devListeners + = new HashSet(); private P2pMsgSink m_sink; + public interface DevSetListener { + void setChanged( Map macToName ); + } + @Override public void onCreate() { @@ -192,21 +202,36 @@ public class WiDirService extends XWService { public static String formatNetStateInfo() { - return String.format( "name: %s; mac: %s; role: %s; nThreads: %d", - sDeviceName, getMyMacAddress(), - sAmServer ? "owner" : "guest", + String map = mapToString( copyUserMap() ); + return String.format( "map: %s role: %s; nThreads: %d", + map, sAmServer ? "owner" : "guest", Thread.activeCount() ); } private static String getMyMacAddress() { return getMyMacAddress(null); } + public static void registerDevSetListener( DevSetListener dsl ) + { + synchronized( s_devListeners ) { + s_devListeners.add( dsl ); + } + updateListeners(); + } + + public static void unregisterDevSetListener( DevSetListener dsl ) + { + synchronized( s_devListeners ) { + s_devListeners.remove( dsl ); + } + } + public static void inviteRemote( Context context, String macAddr, NetLaunchInfo nli ) { + DbgUtils.logd( CLAZZ, "inviteRemote(%s)", macAddr ); + Assert.assertNotNull( macAddr ); String nliString = nli.toString(); DbgUtils.logd( CLAZZ, "inviteRemote(%s)", nliString ); - // String nliData = intent.getStringExtra( KEY_DATA ); - // String macAddr = intent.getStringExtra( KEY_DEST ); boolean[] forwarding = { false }; BiDiSockWrap wrap = getForSend( macAddr, forwarding ); @@ -256,7 +281,7 @@ public class WiDirService extends XWService { DbgUtils.logex( jse ); } } else { - DbgUtils.logd( CLAZZ, "no socket for packet for %s", macAddr ); + DbgUtils.logd( CLAZZ, "sendPacket: no socket for %s", macAddr ); } return nSent; } @@ -343,25 +368,25 @@ public class WiDirService extends XWService { } }; - if ( BuildConfig.DEBUG ) { - sGroupListener = new GroupInfoListener() { - public void onGroupInfoAvailable( WifiP2pGroup group ) { - if ( null == group ) { - DbgUtils.logd( CLAZZ, "onGroupInfoAvailable(null)!" ); - } else { - DbgUtils.logd( CLAZZ, "onGroupInfoAvailable(owner: %b)!", - group.isGroupOwner() ); - Assert.assertTrue( sAmGroupOwner == group.isGroupOwner() ); - if ( sAmGroupOwner ) { - Collection devs = group.getClientList(); + sGroupListener = new GroupInfoListener() { + public void onGroupInfoAvailable( WifiP2pGroup group ) { + if ( null == group ) { + DbgUtils.logd( CLAZZ, "onGroupInfoAvailable(null)!" ); + } else { + DbgUtils.logd( CLAZZ, "onGroupInfoAvailable(owner: %b)!", + group.isGroupOwner() ); + Assert.assertTrue( sAmGroupOwner == group.isGroupOwner() ); + if ( sAmGroupOwner ) { + Collection devs = group.getClientList(); + synchronized( sUserMap ) { for ( WifiP2pDevice dev : devs ) { String macAddr = dev.deviceAddress; - // DbgUtils.logd( CLAZZ, "group member: %s/%s", - // dev.deviceAddress, - // dev.deviceName ); + sUserMap.put( macAddr, dev.deviceName ); BiDiSockWrap wrap = sSocketWrapMap.get( macAddr ); if ( null == wrap ) { - DbgUtils.logd( CLAZZ, "no socket for %s", macAddr ); + DbgUtils.logd( CLAZZ, + "groupListener: no socket for %s", + macAddr ); } else { DbgUtils.logd( CLAZZ, "socket for %s connected: %b", macAddr, wrap.isConnected() ); @@ -369,16 +394,16 @@ public class WiDirService extends XWService { } } } - DbgUtils.logd( CLAZZ, "thread count: %d", Thread.activeCount() ); - new Handler().postDelayed( new Runnable() { - @Override - public void run() { - getMgr().requestGroupInfo( sChannel, sGroupListener ); - } - }, 60 * 1000 ); } - }; - } + DbgUtils.logd( CLAZZ, "thread count: %d", Thread.activeCount() ); + new Handler().postDelayed( new Runnable() { + @Override + public void run() { + getMgr().requestGroupInfo( sChannel, sGroupListener ); + } + }, 60 * 1000 ); + } + }; sIntentFilter = new IntentFilter(); sIntentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION); @@ -686,14 +711,17 @@ public class WiDirService extends XWService { if ( cmd.equals( CMD_PING ) ) { storeByAddress( wrap, asObj ); try { - wrap.send( new JSONObject() - .put( KEY_CMD, CMD_PONG ) - .put( KEY_MAC, getMyMacAddress() ) ); + JSONObject packet = new JSONObject() + .put( KEY_CMD, CMD_PONG ) + .put( KEY_MAC, getMyMacAddress() ); + addMappings( packet ); + wrap.send( packet ); } catch ( JSONException jse ) { DbgUtils.logex( jse ); } } else if ( cmd.equals( CMD_PONG ) ) { storeByAddress( wrap, asObj ); + readMappings( asObj ); } else if ( cmd.equals( CMD_INVITE ) ) { if ( ! forwardedPacket( asObj, bytes ) ) { Intent intent = getIntentTo( P2PAction.GOT_INVITE ); @@ -720,6 +748,86 @@ public class WiDirService extends XWService { } } + private static void addMappings( JSONObject packet ) + { + synchronized( sUserMap ) { + try { + JSONArray array = new JSONArray(); + for ( String mac : sUserMap.keySet() ) { + JSONObject map = new JSONObject() + .put( KEY_MAC, mac ) + .put( KEY_NAME, sUserMap.get(mac) ); + array.put( map ); + } + packet.put( KEY_MAP, array ); + } catch ( JSONException ex ) { + DbgUtils.logex( ex ); + } + } + } + + private static void readMappings( JSONObject asObj ) + { + synchronized( sUserMap ) { + try { + JSONArray array = asObj.getJSONArray( KEY_MAP ); + for ( int ii = 0; ii < array.length(); ++ii ) { + JSONObject map = array.getJSONObject( ii ); + String name = map.getString( KEY_NAME ); + String mac = map.getString( KEY_MAC ); + sUserMap.put( mac, name ); + } + } catch ( JSONException ex ) { + DbgUtils.logex( ex ); + } + } + updateListeners(); + } + + private static void updateListeners() + { + DevSetListener[] listeners = null; + synchronized( s_devListeners ) { + if ( 0 < s_devListeners.size() ) { + listeners = new DevSetListener[s_devListeners.size()]; + Iterator iter = s_devListeners.iterator(); + for ( int ii = 0; ii < listeners.length; ++ii ) { + listeners[ii] = iter.next(); + } + } + } + + if ( null != listeners ) { + Map macToName = copyUserMap(); + macToName.remove( getMyMacAddress() ); + + for ( DevSetListener listener : listeners ) { + listener.setChanged( macToName ); + } + } + } + + private static Map copyUserMap() + { + Map macToName; + synchronized ( sUserMap ) { + macToName = new HashMap(sUserMap); + } + return macToName; + } + + private static String mapToString( Map macToName ) + { + String result = ""; + Iterator iter = macToName.keySet().iterator(); + for ( int ii = 0; iter.hasNext(); ++ii ) { + String mac = iter.next(); + result += String.format( "%d: %s=>%s; ", ii, mac, + macToName.get( mac ) ); + } + return result; + } + private static boolean forwardedPacket( JSONObject asObj, byte[] bytes ) { boolean forwarded = false; @@ -852,6 +960,9 @@ public class WiDirService extends XWService { .getParcelableExtra(WifiP2pManager.EXTRA_WIFI_P2P_DEVICE); sMacAddress = device.deviceAddress; sDeviceName = device.deviceName; + synchronized( sUserMap ) { + sUserMap.put( sMacAddress, sDeviceName ); + } DbgUtils.logd( CLAZZ, "Got my MAC Address: %s and name: %s", sMacAddress, sDeviceName ); @@ -904,9 +1015,7 @@ public class WiDirService extends XWService { // you'll want to create a client thread that connects to the group // owner. } - if ( BuildConfig.DEBUG ) { - getMgr().requestGroupInfo( sChannel, sGroupListener ); - } + getMgr().requestGroupInfo( sChannel, sGroupListener ); } else { Assert.fail(); }