Titles and body text for sync upgrade prompts--just need button and listener logic

pull/14/head
Sam Bosley 12 years ago
parent 074d6f678a
commit bab8092c97

@ -22,25 +22,31 @@ public class SyncUpgradePrompt {
if (lastPromptDate == -1)
lastPromptDate = Preferences.getLong(P_SYNC_UPGRADE_PROMPT, 0L);
Dialog d = null;
if (DateUtilities.now() - lastPromptDate > DateUtilities.ONE_WEEK * 3) {
if (!PluginServices.getActFmPreferenceService().isLoggedIn()) {
if (PluginServices.getGtasksPreferenceService().isLoggedIn()) {
// Logged into google but not astrid
// TODO: Show prompt
// TODO: Buttons and listeners
d = getDialog(activity, R.string.sync_upgr_gtasks_only_title, R.string.sync_upgr_gtasks_only_body);
} else {
// Logged into neither
// TODO: Show prompt
// TODO: Buttons and listeners
d = getDialog(activity, R.string.sync_upgr_neither_title, R.string.sync_upgr_neither_body);
}
setLastPromptDate(DateUtilities.now());
} else if (PluginServices.getGtasksPreferenceService().isLoggedIn()) {
// Logged into both
// TODO: Show prompt
// TODO: Buttons and listeners
d = getDialog(activity, R.string.sync_upgr_both_title, R.string.sync_upgr_both_body);
setLastPromptDate(Long.MAX_VALUE);
} else {
// Logged into just astrid--don't need to show prompts anymore
setLastPromptDate(Long.MAX_VALUE);
}
}
if (d != null)
d.show();
}
private static void setLastPromptDate(long date) {

@ -340,5 +340,14 @@
<string name="share_with_google">Share on Google+</string>
<string name="share_speech_bubble">By sharing, you\'ll help others be more productive!</string>
<!-- Sync upgrade messages -->
<string name="sync_upgr_both_title">Using Astrid.com + Google without Duplicates</string>
<string name="sync_upgr_both_body">Let\'s be honest. Google Tasks is convenient but not as cool as Astrid. To avoid duplicates you can no longer sync with Astrid.com and background sync with Google Tasks at the same time. You can still import your Google Tasks by visiting Settings → Backup &amp; Sync</string>
<string name="sync_upgr_gtasks_only_title">Upgrade to Astrid Sync for Free!</string>
<string name="sync_upgr_gtasks_only_body">Access your tasks from all your devices and from Gmail with Astrid.com sync. Upgrade to Astrid.com Sync (you can always go back to Google Tasks - but you won\'t want to)!</string>
<string name="sync_upgr_neither_title">Free backup &amp; Sync!</string>
<string name="sync_upgr_neither_body">Don\'t put your to-dos at risk! New and improved Astrid sync to keep and access your tasks from anywhere.</string>
</resources>

Loading…
Cancel
Save