Deep link TOS. Bump version number

This commit is contained in:
burke.davey
2010-07-31 21:36:02 +00:00
parent 64b1562c69
commit b829d718ea
3 changed files with 20 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.apps.chrometophone"
android:versionCode="5"
android:versionName="1.4">
android:versionCode="6"
android:versionName="1.5">
<!-- Only this application can receive the messages and registration result -->
<permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" />

View File

@@ -35,7 +35,7 @@
the set up on your phone: &lt;br>&lt;br>1. Choose the Google Account to use.&lt;br>
2. Connect your Chrome and your phone.&lt;br>3. Set your link action preference.&lt;br>&lt;br>
By using this application, you agree to the &lt;br>
&lt;a href="http://m.google.com/tos">Terms of Service&lt;/a> and
&lt;a href="{tos_link}">Terms of Service&lt;/a> and
&lt;a href="http://m.google.com/privacy">Privacy Policy&lt;/a>
</string>
<string name="help_text">

View File

@@ -16,6 +16,7 @@
package com.google.android.apps.chrometophone;
import java.util.ArrayList;
import java.util.Locale;
import android.accounts.Account;
import android.accounts.AccountManager;
@@ -141,8 +142,9 @@ public class MainActivity extends Activity {
}
private void setIntroScreenContent() {
String introText = getString(R.string.intro_text).replace("{tos_link}", getTosLink());
TextView textView = (TextView) findViewById(R.id.intro_text);
textView.setText(Html.fromHtml(getString((R.string.intro_text))));
textView.setText(Html.fromHtml(introText));
textView.setMovementMethod(LinkMovementMethod.getInstance());
Button exitButton = (Button) findViewById(R.id.exit);
@@ -351,6 +353,20 @@ public class MainActivity extends Activity {
}
}
private String getTosLink() {
String link = "http://m.google.com/toscountry"; // default
String country = Locale.getDefault().getCountry();
if (country.equals("US")) {
link = "http://m.google.com/tospage";
} else if (country.equals("GB")) {
link = "http://m.google.co.uk/tospage";
} else if (country.equals("CA")) {
link = "http://m.google.ca/tospage";
}
return link;
}
private final BroadcastReceiver mUpdateUIReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {