add market url to install and break ugly/non-localized url out of

localized strings.xml.
This commit is contained in:
Andy2 2011-05-19 06:52:42 -07:00
parent 4c5c435fb5
commit 7349a61f5a
3 changed files with 10 additions and 4 deletions

View file

@ -74,6 +74,9 @@
<string name="default_host">eehouse.org</string>
<string name="dict_url">http://eehouse.org/and_dicts_hh</string>
<string name="app_version">4.4 beta 27</string>
<string name="app_market_url">https://market.android.com/search?q=pname:org.eehouse.android.xw4</string>
<!--string name="app_market_url">market://search?q=pname:org.eehouse.android.xw4</string-->
<string name="game_urlf">http://%1$s/redir.php?room=%2$s\u0026lang=%3$d</string>
<!--string name="dict_url">http://10.0.2.2/~eehouse/and_dicts</string-->

View file

@ -559,8 +559,7 @@
you haven\'t already?</string>
<string name="invite_subject">Let\'s play Crosswords</string>
<string name="invite_bodyf">Click on this link to start a game:
http://%1$s/redir.php?room=%2$s\u0026lang=%3$d. Use this link
to install Crosswords.</string>
%1$s. (If you don\'t have Crosswords: %2$s.)</string>
<string name="invite_chooser">Send invitation via</string>
</resources>

View file

@ -381,9 +381,13 @@ public class GameUtils {
intent.setType( "plain/text" );
intent.putExtra( Intent.EXTRA_SUBJECT,
context.getString( R.string.invite_subject ) );
String format = context.getString( R.string.invite_bodyf );
String format = context.getString( R.string.game_urlf );
String host = CommonPrefs.getDefaultRelayHost( context );
String message = String.format( format, host, room, lang );
String gameUrl = String.format( format, host, room, lang );
format = context.getString( R.string.invite_bodyf );
String appUrl = context.getString( R.string.app_market_url );
String message = String.format( format, gameUrl, appUrl );
intent.putExtra( Intent.EXTRA_TEXT, message );
String chooserMsg = context.getString( R.string.invite_chooser );