mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
The email apps won't display non-http schemes as clickable links, so
go with html and encode both the invite and install links as php refs that get redirected. Works, but eliminates SMS as sending mechanism.
This commit is contained in:
parent
cd6aa8fe98
commit
9c298a16e7
4 changed files with 30 additions and 8 deletions
|
@ -558,8 +558,13 @@
|
|||
that many people.)</string>
|
||||
|
||||
<string name="invite_subject">Let\'s play Crosswords</string>
|
||||
<string name="invite_bodyf">Tap on this link to start a game:
|
||||
%1$s .</string>
|
||||
<string name="invite_bodyf">\u003ca href=\"%1$s\"\u003ETap here to
|
||||
accept\u003c/a\u003E my invitation and join this
|
||||
game.\u003cbr\u003E \u003ca
|
||||
href=\"http://eehouse.org/market.php\"\u003E
|
||||
Tap here to install Crosswords\u003c/a\u003E if you haven\'t
|
||||
already.</string>
|
||||
|
||||
<string name="invite_chooser">Send invitation via</string>
|
||||
|
||||
<string name="no_download_warning">Unable to download. Do you have
|
||||
|
|
|
@ -38,6 +38,7 @@ import java.util.concurrent.locks.Lock;
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import android.text.Html;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
|
@ -412,13 +413,13 @@ public class GameUtils {
|
|||
|
||||
if ( null != gameUri ) {
|
||||
Intent intent = new Intent( Intent.ACTION_SEND );
|
||||
intent.setType( "text/plain" );
|
||||
intent.setType("text/html");
|
||||
intent.putExtra( Intent.EXTRA_SUBJECT,
|
||||
context.getString( R.string.invite_subject ) );
|
||||
|
||||
String format = context.getString( R.string.invite_bodyf );
|
||||
String message = String.format( format, gameUri.toString() );
|
||||
intent.putExtra( Intent.EXTRA_TEXT, message );
|
||||
intent.putExtra( Intent.EXTRA_TEXT, Html.fromHtml(message) );
|
||||
|
||||
String chooserMsg = context.getString( R.string.invite_chooser );
|
||||
context.startActivity( Intent.createChooser( intent, chooserMsg ) );
|
||||
|
|
20
xwords4/android/scripts/market.php
Normal file
20
xwords4/android/scripts/market.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
print <<<EOF
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Crosswords install redirect</title>
|
||||
<meta http-equiv="REFRESH"
|
||||
content="0;url=market://search?q=pname:org.eehouse.android.xw4">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to the market...</p>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
EOF;
|
||||
|
||||
?>
|
|
@ -30,10 +30,6 @@ print <<<EOF
|
|||
If this fails it's probably because you don't have a new enough version of Crosswords installed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="market://search?q=pname:org.eehouse.android.xw4">Tap here</a> to fix that.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue