mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2026-02-12 02:54:02 +00:00
Deep link TOS. Bump version number
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
the set up on your phone: <br><br>1. Choose the Google Account to use.<br>
|
||||
2. Connect your Chrome and your phone.<br>3. Set your link action preference.<br><br>
|
||||
By using this application, you agree to the <br>
|
||||
<a href="http://m.google.com/tos">Terms of Service</a> and
|
||||
<a href="{tos_link}">Terms of Service</a> and
|
||||
<a href="http://m.google.com/privacy">Privacy Policy</a>
|
||||
</string>
|
||||
<string name="help_text">
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user