Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #72 from alexstyl/develop
Browse files Browse the repository at this point in the history
Release 6.0 - Crash fixes & Paypal Donations
  • Loading branch information
alexstyl authored Nov 7, 2016
2 parents f62544a + 30340ba commit 41d8434
Show file tree
Hide file tree
Showing 47 changed files with 558 additions and 2,661 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'io.fabric.tools:gradle:1.21.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand All @@ -30,6 +30,6 @@ task clean(type: Delete) {
ext {
androidCompileSdkVersion = 24
androidBuildToolsVersion = '24.0.2'
androidVersionCode = 61
androidVersionName = '5.1'
androidVersionCode = 62
androidVersionName = '6.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ public enum Screen {
DONATE("donate"),
ABOUT("about"),
CONTACT_PERMISSION_REQUESTED("contact permission"),
WEAR_CONTACT_EVENTS("wear: contacts events");
WEAR_CONTACT_EVENTS("wear: contacts events"),
PLAY_STORE("playstore"),
GOOGLE_PLUS_COMMUNITY("google plus community"),
EMAIL_SUPPORT("email support");

private final String screenName;

Expand Down
Binary file modified common/src/main/res/mipmap-hdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/res/mipmap-mdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/res/mipmap-xhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/res/mipmap-xxhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/res/mipmap-xxxhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>
<!-- The original name of the app is Memento Calendar. In Greek though the name is Εορτολόγιο Memento (Nameday Almanac Memento)
as the name makes more sense. If there is a local specific name, make sure to write it here. If not, leave it as is-->
<string name="localised_app_name">Memento Namedays</string>
<string name="localised_app_name">Memento Calendar</string>
<string name="today">Today</string>
<string name="tomorrow">Tomorrow</string>
<string name="birthday">Birthday</string>
Expand All @@ -11,8 +11,8 @@ as the name makes more sense. If there is a local specific name, make sure to wr
<string name="nameday">Name Day</string>
<string name="contacts_birthday">"It's %s's birthday!"</string>
<string name="contacts_nameday">"It's %s's nameday!"</string>
<string name="namedays_no_names">No name days for this dayOfMonth</string>
<string name="birthday_no_birthday">No contact has their birthday this dayOfMonth</string>
<string name="namedays_no_names">No name days for this day</string>
<string name="birthday_no_birthday">No contact has their birthday this day</string>
<string name="action_settings">Settings</string>
<string name="disable">Disable</string>
<string name="enable">Enable</string>
Expand All @@ -37,10 +37,10 @@ as the name makes more sense. If there is a local specific name, make sure to wr
<string name="no_app_found">No application found in order to perform this action</string>
<string name="send_mail_via">Send e-mail via</string>
<string name="daily_reminder">Daily Reminder</string>
<string name="daily_reminder_summary">"Remind me for every dayOfMonth's events"</string>
<string name="daily_reminder_summary">"Remind me for every day's events"</string>
<string name="ringtone">Ringtone</string>
<string name="vibrate">Vibrate</string>
<string name="daily_reminder_time_summary">Every dayOfMonth at %s</string>
<string name="daily_reminder_time_summary">Every day at %s</string>
<string name="set_time">Set time</string>
<string name="set">Set</string>
<string name="Discard">Discard</string>
Expand All @@ -51,8 +51,8 @@ as the name makes more sense. If there is a local specific name, make sure to wr
<string name="label_widget_textonly"
translatable="false">@string/upcoming</string>
<string name="ringtone_silent">Silent</string>
<string name="contacts_today">Contacts celebrating this dayOfMonth</string>
<string name="no_contacts_to_wish">There are no contacts celebrating this dayOfMonth</string>
<string name="contacts_today">Contacts celebrating this day</string>
<string name="no_contacts_to_wish">There are no contacts celebrating this day</string>
<string name="upcoming">Upcoming</string>
<string name="turns_age">Turns %1$d</string>
<string name="display_namedays_names">Today\'s Namedays</string>
Expand Down
3 changes: 1 addition & 2 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'

ext {
android_support_version = '24.2.1'
android_support_version = '25.0.0'
}


Expand Down Expand Up @@ -39,7 +39,6 @@ android {
versionCode androidVersionCode
versionName androidVersionName
manifestPlaceholders = [crashlyticsApiKey: crashlyticsKey]
buildConfigField 'String', 'API_KEY_VENDING', '\"' + androidVendingKey + "\""
}

buildTypes {
Expand Down

This file was deleted.

103 changes: 103 additions & 0 deletions mobile/src/main/java/com/alexstyl/specialdates/ExternalNavigator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
package com.alexstyl.specialdates;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;

import com.alexstyl.specialdates.analytics.Analytics;
import com.alexstyl.specialdates.analytics.Screen;
import com.alexstyl.specialdates.util.Utils;
import com.novoda.simplechromecustomtabs.SimpleChromeCustomTabs;

public class ExternalNavigator {

public static final Uri GOOGLE_PLUS_COMMUNITY = Uri.parse("https://plus.google.com/u/0/communities/112144353599130693487");
private static final String GOOGLE_PLUS_PACKAGE_NAME = "com.google.android.apps.plus";
private static final String NO_FRAGMENT = null;
private static final Intent PLAY_STORE_INTENT;

static {
Uri playstoreUri = createPlayStoreUri();
PLAY_STORE_INTENT = new Intent(Intent.ACTION_VIEW, playstoreUri);
}

private static Uri createPlayStoreUri() {
String packageName = MementoApplication.getContext().getPackageName();
return Uri.parse("market://details?id=" + packageName);
}

private final Activity activity;
private final Analytics analytics;

public ExternalNavigator(Activity activity, Analytics analytics) {
this.activity = activity;
this.analytics = analytics;
SimpleChromeCustomTabs.initialize(activity);
}

public boolean canGoToPlayStore() {
return canResolveIntent(PLAY_STORE_INTENT);
}

public void toPlayStore() {
try {
activity.startActivity(PLAY_STORE_INTENT);
analytics.trackScreen(Screen.PLAY_STORE);
} catch (ActivityNotFoundException e) {
ErrorTracker.track(e);
}
}

public void toGooglePlusCommunityBrowser() {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(GOOGLE_PLUS_COMMUNITY);
activity.startActivity(intent);
} catch (ActivityNotFoundException e) {
ErrorTracker.track(e);
}
}

public void toGooglePlusCommunityApp() {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setPackage(GOOGLE_PLUS_PACKAGE_NAME);
intent.setData(GOOGLE_PLUS_COMMUNITY);
activity.startActivity(intent);
analytics.trackScreen(Screen.GOOGLE_PLUS_COMMUNITY);
} catch (ActivityNotFoundException e) {
ErrorTracker.track(e);
}
}

public boolean canGoToEmailSupport() {
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "to", NO_FRAGMENT));
return canResolveIntent(emailIntent);
}

public void toEmailSupport() {
try {
Intent intent = Utils.getSupportEmailIntent(activity);
activity.startActivity(intent);
analytics.trackScreen(Screen.EMAIL_SUPPORT);
} catch (ActivityNotFoundException ex) {
Toast.makeText(activity, R.string.no_app_found, Toast.LENGTH_SHORT).show();
ErrorTracker.track(ex);
}

}

public void connectTo(Activity activity) {
SimpleChromeCustomTabs.getInstance().connectTo(activity);
}

public void disconnectTo(Activity activity) {
SimpleChromeCustomTabs.getInstance().disconnectFrom(activity);
}

private boolean canResolveIntent(Intent intent) {
return activity.getPackageManager().resolveActivity(intent, 0) != null;
}
}
Loading

0 comments on commit 41d8434

Please sign in to comment.