diff --git a/.gitignore b/.gitignore
index 997c4e61e..e50b796b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ keystore.properties
mobile/keystore.properties
mobile/alpha/release/output.json
*.lnk
+*.log
diff --git a/mobile/build.gradle b/mobile/build.gradle
index 133113ca2..d5845ee9f 100644
--- a/mobile/build.gradle
+++ b/mobile/build.gradle
@@ -238,7 +238,9 @@ dependencies {
implementation 'com.afollestad.material-dialogs:commons:0.9.3.0'
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
- implementation 'com.github.MFlisar:GDPRDialog:1.0'
+
+ implementation 'com.github.ItsCalebJones:GDPRDialog:54231db'
+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.github.jrvansuita:MaterialAbout:0.2.1'
implementation 'com.github.mukeshsolanki:MarkdownView-Android:1.0.4'
diff --git a/mobile/src/main/java/me/calebjones/spacelaunchnow/ui/main/MainActivity.java b/mobile/src/main/java/me/calebjones/spacelaunchnow/ui/main/MainActivity.java
index 241a88498..ba1ec8b75 100644
--- a/mobile/src/main/java/me/calebjones/spacelaunchnow/ui/main/MainActivity.java
+++ b/mobile/src/main/java/me/calebjones/spacelaunchnow/ui/main/MainActivity.java
@@ -90,7 +90,7 @@
import me.calebjones.spacelaunchnow.utils.customtab.CustomTabActivityHelper;
import timber.log.Timber;
-public class MainActivity extends BaseActivity implements GDPR.IGDPRCallback{
+public class MainActivity extends BaseActivity implements GDPR.IGDPRCallback {
private static final String NAV_ITEM_ID = "navItemId";
private static ListPreferences listPreferences;
@@ -292,23 +292,23 @@ public void onFeedbackTapped() {
),
new DividerDrawerItem(),
new ExpandableDrawerItem().withName(R.string.get_help).withIcon(GoogleMaterial.Icon.gmd_account_box).withDescription(R.string.help_description).withIdentifier(20).withSelectable(false).withSubItems(
- new SecondaryDrawerItem()
- .withIcon(GoogleMaterial.Icon.gmd_info_outline)
- .withName(R.string.whats_new)
- .withDescription(R.string.whats_new_subtitle)
- .withIdentifier(R.id.menu_new)
- .withSelectable(false),
- new SecondaryDrawerItem()
- .withIcon(GoogleMaterial.Icon.gmd_account_box)
- .withName(R.string.about).withDescription(R.string.about_subtitle)
- .withIdentifier(R.id.about)
- .withSelectable(false),
- new SecondaryDrawerItem()
- .withIcon(GoogleMaterial.Icon.gmd_feedback)
- .withName(R.string.feedback)
- .withDescription(R.string.feedback_subtitle)
- .withIdentifier(R.id.menu_feedback)
- .withSelectable(false)
+ new SecondaryDrawerItem()
+ .withIcon(GoogleMaterial.Icon.gmd_info_outline)
+ .withName(R.string.whats_new)
+ .withDescription(R.string.whats_new_subtitle)
+ .withIdentifier(R.id.menu_new)
+ .withSelectable(false),
+ new SecondaryDrawerItem()
+ .withIcon(GoogleMaterial.Icon.gmd_account_box)
+ .withName(R.string.about).withDescription(R.string.about_subtitle)
+ .withIdentifier(R.id.about)
+ .withSelectable(false),
+ new SecondaryDrawerItem()
+ .withIcon(GoogleMaterial.Icon.gmd_feedback)
+ .withName(R.string.feedback)
+ .withDescription(R.string.feedback_subtitle)
+ .withIdentifier(R.id.menu_feedback)
+ .withSelectable(false)
),
new DividerDrawerItem(),
new PrimaryDrawerItem().withName(R.string.settings)
@@ -466,7 +466,7 @@ public void run() {
configureAdState(GDPR.getInstance().getConsentState());
}
- private void showRemoveAd(){
+ private void showRemoveAd() {
snackbar = Snackbar
.make(coordinatorLayout, R.string.upgrade_pro, Snackbar.LENGTH_INDEFINITE)
.setActionTextColor(ContextCompat.getColor(context, R.color.colorAccent))
@@ -492,7 +492,7 @@ private synchronized void showRemainingCount() {
String message = String.format("%s more times until rate pop-up", count);
Toast mToast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
mToast.setText(message);
- if (BuildConfig.DEBUG){
+ if (BuildConfig.DEBUG) {
mToast.show();
}
}
@@ -537,7 +537,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
} else {
getMenuInflater().inflate(R.menu.main_menu, menu);
}
- if(SupporterHelper.isSupporter()){
+ if (SupporterHelper.isSupporter()) {
menu.findItem(R.id.action_supporter).setVisible(false);
menu.removeItem(R.id.action_supporter);
}
@@ -559,11 +559,11 @@ public boolean onOptionsItemSelected(MenuItem item) {
return true;
}
- if (id == R.id.action_consent){
- showGDPRIfNecessary(true, GDPRLocation.UNKNOWN);
+ if (id == R.id.action_consent) {
+ showGDPRIfNecessary(true, GDPRLocation.IN_EAA_OR_UNKNOWN);
}
- if (id == R.id.action_supporter){
+ if (id == R.id.action_supporter) {
Intent intent = new Intent(this, SupporterActivity.class);
startActivity(intent);
return true;
@@ -813,7 +813,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
}
private void showGDPRIfNecessary(boolean forceShow, GDPRLocation location) {
- if (forceShow || location == GDPRLocation.EAA) {
+ if (forceShow || location == GDPRLocation.IN_EAA_OR_UNKNOWN) {
try {
GDPR.getInstance().showDialog(this, getGDPRSetup(), location);
} catch (IllegalStateException e) {
@@ -822,8 +822,9 @@ private void showGDPRIfNecessary(boolean forceShow, GDPRLocation location) {
}
}
- private GDPRSetup getGDPRSetup(){
- return new GDPRSetup(GDPRDefinitions.ADMOB,
+ private GDPRSetup getGDPRSetup() {
+
+ return new GDPRSetup(GDPRDefinitions.ADMOB,
GDPRDefinitions.FIREBASE_CRASH,
new GDPRNetwork("Fabric - Crashlytics",
"https://try.crashlytics.com/terms/",
@@ -836,12 +837,12 @@ private GDPRSetup getGDPRSetup(){
true,
false),
GDPRDefinitions.FIREBASE_ANALYTICS)
- .withPrivacyPolicy("https://spacelaunchnow.me/app/privacy")
- .withAllowNoConsent(false)
- .withExplicitAgeConfirmation(true)
- .withCheckRequestLocation(true)
- .withBottomSheet(true)
- .withForceSelection(true);
+ .withPrivacyPolicy("https://spacelaunchnow.me/app/privacy")
+ .withAllowNoConsent(false)
+ .withExplicitAgeConfirmation(true)
+ .withCheckRequestLocation(true)
+ .withBottomSheet(true)
+ .withForceSelection(true);
}
@Override
@@ -860,23 +861,24 @@ public void onConsentInfoUpdate(GDPRConsentState consentState, boolean isNewStat
bundle.putString("GDPR_Location", consentState.getLocation().name());
firebaseAnalytics.logEvent("SLN_GDPR_EVENT", bundle);
firebaseAnalytics.setUserProperty("gdpr_consent", consent.name());
- firebaseAnalytics.setUserProperty("gdpr_location", consentState.getLocation().name());
+ firebaseAnalytics.setUserProperty("gdpr_location", consentState.getLocation().name());
// user just selected this consent, do whatever you want...
switch (consent) {
case UNKNOWN:
// never happens!
break;
case NO_CONSENT:
- if (!SupporterHelper.isSupporter()) {
- Intent intent = new Intent(this, SupporterActivity.class);
+ if (!SupporterHelper.isSupporter()) {
+ Intent intent = new Intent(this, SupporterActivity.class);
startActivity(intent);
}
firebaseAnalytics.setAnalyticsCollectionEnabled(false);
break;
case NON_PERSONAL_CONSENT_ONLY:
-
+ firebaseAnalytics.setAnalyticsCollectionEnabled(true);
break;
case PERSONAL_CONSENT:
+ firebaseAnalytics.setAnalyticsCollectionEnabled(true);
break;
}
} else {
@@ -893,6 +895,7 @@ public void onConsentInfoUpdate(GDPRConsentState consentState, boolean isNewStat
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(false);
break;
case NON_PERSONAL_CONSENT_ONLY:
+ firebaseAnalytics.setAnalyticsCollectionEnabled(true);
break;
case PERSONAL_CONSENT:
// user restarted activity and consent was already given...
@@ -907,11 +910,11 @@ private void configureAdState(GDPRConsentState consentState) {
boolean allowAds = true;
GDPRConsent consent = consentState.getConsent();
- if (consentState.getLocation() == GDPRLocation.EAA && consent == GDPRConsent.UNKNOWN){
+ if (consentState.getLocation() == GDPRLocation.IN_EAA_OR_UNKNOWN && consent == GDPRConsent.UNKNOWN) {
allowAds = false;
}
- if (consent == GDPRConsent.NO_CONSENT || consent == GDPRConsent.NON_PERSONAL_CONSENT_ONLY){
+ if (consent == GDPRConsent.NO_CONSENT || consent == GDPRConsent.NON_PERSONAL_CONSENT_ONLY) {
allowsPersonalAds = false;
}
diff --git a/mobile/src/main/res/values/strings.xml b/mobile/src/main/res/values/strings.xml
index d1e4dcef4..65b8b7fd5 100644
--- a/mobile/src/main/res/values/strings.xml
+++ b/mobile/src/main/res/values/strings.xml
@@ -396,7 +396,6 @@
cloud database
crash reporting
analytics reporting
- Can we continue to use your data for these purposes%1$s? \n\n(You may continue to use the application no matter your choice.)
Hello blank fragment
diff --git a/mobile/version.properties b/mobile/version.properties
index 88dbb021c..13c9f3f4d 100644
--- a/mobile/version.properties
+++ b/mobile/version.properties
@@ -1,2 +1,2 @@
-#Thu May 24 16:49:50 EDT 2018
-AI_VERSION_CODE=61
+#Sat May 26 11:08:24 EDT 2018
+AI_VERSION_CODE=63
diff --git a/wear/version.properties b/wear/version.properties
index 1e414e5e0..4f39d7ec5 100644
--- a/wear/version.properties
+++ b/wear/version.properties
@@ -1,2 +1,2 @@
-#Thu May 24 16:49:50 EDT 2018
-AI_VERSION_CODE=160
+#Sat May 26 11:08:25 EDT 2018
+AI_VERSION_CODE=162