mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
Add information to strings to help translations.
Fix notification sound so it's controlled by notification volume. Bump version number.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.google.android.apps.chrometophone"
|
||||
android:versionCode="9"
|
||||
android:versionName="2.0.0">
|
||||
android:versionName="2.1.0">
|
||||
<!-- 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" />
|
||||
|
||||
@@ -1,34 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Name of the application in the launcher [CHAR LIMIT=NONE] -->
|
||||
<string name="app_name">Chrome to Phone</string>
|
||||
|
||||
<!-- Button name for going back in setup flow [CHAR LIMIT=NONE] -->
|
||||
<string name="back">Back</string>
|
||||
|
||||
<!-- Button name for going next in setup flow [CHAR LIMIT=NONE] -->
|
||||
<string name="next">Next</string>
|
||||
|
||||
<!-- Button name for exiting the app at start of setup flow [CHAR LIMIT=NONE] -->
|
||||
<string name="exit">Exit</string>
|
||||
|
||||
<!-- Prompt to ask user which Google account to use [CHAR LIMIT=NONE] -->
|
||||
<string name="select_text">Select an account to use:</string>
|
||||
|
||||
<!-- Message that appears if there are no accounts configured on the phone [CHAR LIMIT=NONE] -->
|
||||
<string name="no_accounts">There are no accounts setup on this phone.</string>
|
||||
|
||||
<!-- Prompt to ask the user to click the 'Next' button to establish a connection [CHAR LIMIT=NONE] -->
|
||||
<string name="click_next_text">Click Next to establish the connection between Chrome and this phone.</string>
|
||||
|
||||
<!-- Message that warns the user that Google Apps accounts are not supported [CHAR LIMIT=NONE] -->
|
||||
<string name="google_apps_warning_text">(Note: Chrome to Phone does not currently support Google Apps accounts).</string>
|
||||
|
||||
<!-- Prompt that is shown when Chrome to Phone is connecting to Chrome [CHAR LIMIT=NONE] -->
|
||||
<string name="connecting_text">Connecting...</string>
|
||||
|
||||
<!-- Message that appears above the 'Disconnect phone' button [CHAR LIMIT=NONE] -->
|
||||
<string name="disconnect_text">If you no longer want to send links to this phone, press the button below.</string>
|
||||
|
||||
<!-- Message that appears when Chrome to Phone is disconnecting from Chrome [CHAR LIMIT=NONE] -->
|
||||
<string name="disconnecting_text">Disconnecting...</string>
|
||||
|
||||
<!-- Message that appears when Chrome to Phone cannot connect [CHAR LIMIT=NONE] -->
|
||||
<string name="connect_error_text">Error: Unable to connect.</string>
|
||||
|
||||
<!-- Error message that appears if the user attempts to use a Google Apps account instead of a normal Google Account -->
|
||||
<string name="auth_error_text">Error: Google Apps accounts not supported.</string>
|
||||
|
||||
<!-- Button name at end of setup flow -->
|
||||
<string name="finish">Finish</string>
|
||||
|
||||
<!-- Message to ask user to select their link action preference (either 'Automatically launch links' or 'Let me launch links manually') [CHAR LIMIT=NONE] -->
|
||||
<string name="select_link_action_text">Please set your link action preference:</string>
|
||||
|
||||
<!-- Option to have Chrome to Phone automatically launch links [CHAR LIMIT=NONE] -->
|
||||
<string name="auto_launch_text">Automatically launch links</string>
|
||||
|
||||
<!-- Option to have Chrome to Phone let the user manually launch links [CHAR LIMIT=NONE] -->
|
||||
<string name="manual_launch_text">Let me launch links manually</string>
|
||||
|
||||
<!-- Message that appears at the end of the setup flow. Preserve occurrences of <br> [CHAR LIMIT=NONE] -->
|
||||
<string name="setup_complete_text">
|
||||
Set-up complete. Your phone is now connected and ready to receive links from Chrome. <br><br>
|
||||
If you have not already done so, you now need to install the Chrome Extension by visiting the
|
||||
Chrome Extension gallery on your desktop at<br>http://chrome.google.com/extensions/
|
||||
and searching for "Chrome to Phone".
|
||||
</string>
|
||||
|
||||
<!-- Message that appears when Chrome to Phone has connected -->
|
||||
<string name="connected_with_account_text">Your phone is connected to Chrome using this account:</string>
|
||||
|
||||
<!-- Message that states the link action preference (either 'Automatically launch links' or 'Let me launch links manually') [CHAR LIMIT=NONE] -->
|
||||
<string name="link_action_pref_text">Link action preference:</string>
|
||||
|
||||
<!-- Button name to disconnect Chrome to Phone from Chrome [CHAR LIMIT=NONE] -->
|
||||
<string name="disconnect">Disconnect phone</string>
|
||||
|
||||
<!-- Error message when Chrome to Phone cannot disconnect from Chrome [CHAR LIMIT=NONE] -->
|
||||
<string name="disconnect_error_text">Error: Unable to disconnect.</string>
|
||||
|
||||
<!-- Button name in menu for Help -->
|
||||
<string name="help">Help</string>
|
||||
|
||||
<!-- Notification shown when text from the desktop is copied to Android's clipboard (user can now paste the text) [CHAR LIMIT=NONE] -->
|
||||
<string name="copied_desktop_clipboard">Copied desktop clipboard</string>
|
||||
|
||||
<!-- Introduction text at start of setup flow. Preserve occurrences of <br>, <a href="{tos_link}">, <a href="{pp_link}">, and <a/> [CHAR LIMIT=NONE] -->
|
||||
<string name="intro_text">
|
||||
Chrome to Phone lets you easily share links, maps, and currently selected phone numbers and text
|
||||
between your computer and your phone. <br><br>You need to install the Chrome
|
||||
@@ -41,6 +90,8 @@
|
||||
<a href="{tos_link}">Terms of Service</a> and
|
||||
<a href="{pp_link}">Privacy Policy</a>.
|
||||
</string>
|
||||
|
||||
<!-- Text that appears when user chooses Help in the menu. Preserve occurrences of <br>, <a href="{tos_link}">, <a href="{pp_link}">, and <a/> [CHAR LIMIT=NONE] -->
|
||||
<string name="help_text">
|
||||
Chrome to Phone lets you easily share links, maps, and currently selected phone numbers and text
|
||||
between your computer and your phone. <br><br>It is comprised of two components:
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.media.AudioManager;
|
||||
import android.media.Ringtone;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
@@ -149,7 +150,6 @@ public class C2DMReceiver extends C2DMBaseReceiver {
|
||||
Notification notification = new Notification(icon, title, when);
|
||||
notification.setLatestEventInfo(context, title, msg,
|
||||
PendingIntent.getActivity(context, 0, intent, 0));
|
||||
notification.defaults = Notification.DEFAULT_SOUND;
|
||||
notification.flags |= Notification.FLAG_AUTO_CANCEL;
|
||||
|
||||
SharedPreferences settings = Prefs.get(context);
|
||||
@@ -158,6 +158,7 @@ public class C2DMReceiver extends C2DMBaseReceiver {
|
||||
NotificationManager nm =
|
||||
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
nm.notify(notificatonID, notification);
|
||||
playNotificationSound(context);
|
||||
|
||||
SharedPreferences.Editor editor = settings.edit();
|
||||
editor.putInt("notificationID", ++notificatonID % 32);
|
||||
@@ -168,6 +169,7 @@ public class C2DMReceiver extends C2DMBaseReceiver {
|
||||
Uri uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||
if (uri != null) {
|
||||
Ringtone rt = RingtoneManager.getRingtone(context, uri);
|
||||
rt.setStreamType(AudioManager.STREAM_NOTIFICATION);
|
||||
if (rt != null) rt.play();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user