Skip to content

Commit

Permalink
removed analytics and ads completely until I figure out GDPR
Browse files Browse the repository at this point in the history
  • Loading branch information
androidseb committed May 26, 2018
1 parent bca56be commit b35a1ea
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 53 deletions.
3 changes: 0 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.firebase:firebase-core:9.2.0'
compile 'com.google.firebase:firebase-crash:9.2.0'
compile 'com.google.firebase:firebase-ads:9.2.0'
}

apply plugin: 'com.google.gms.google-services'
100 changes: 50 additions & 50 deletions app/src/main/java/com/exlyo/camerarestarter/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import android.widget.Toast;

import com.exlyo.camerarestarter.privatedata.AppPrivateData;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
//import com.google.android.gms.ads.AdRequest;
//import com.google.android.gms.ads.AdSize;
//import com.google.android.gms.ads.AdView;
//import com.google.android.gms.ads.MobileAds;

import java.io.BufferedReader;
import java.io.DataOutputStream;
Expand All @@ -44,7 +44,7 @@ public class MainActivity extends AppCompatActivity {
private static final String PREF_KEY_AUTO_CAMERA_ACTION = "auto_camera_action";
private static final String PREF_KEY_SYSTEM_START_NOTIFICATION = "system_start_notification";

private AdView mAdView;
//private AdView mAdView;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -125,29 +125,29 @@ public void run() {
if (MainActivity.this.isFinishing()) {
return null;
}
MainActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
if (MainActivity.this.isFinishing()) {
return;
}
adContainer.setVisibility(View.VISIBLE);
// Initialize the Mobile Ads SDK.
MobileAds.initialize(MainActivity.this, AppPrivateData.adMobAppId);
MobileAds.setAppMuted(true);
mAdView = new AdView(MainActivity.this);
mAdView.setAdSize(AdSize.SMART_BANNER);
mAdView.setAdUnitId(AppPrivateData.adUnitId);
adContainer.addView(mAdView,
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
// Create an ad request. Check your logcat output for the hashed device ID to
// get test ads on a physical device. e.g.
// "Use AdRequest.Builder.addTestDevice("ABCDEF012345") to get test ads on this device."
final AdRequest adRequest = new AdRequest.Builder().build();
// Start loading the ad in the background.
mAdView.loadAd(adRequest);
}
});
//MainActivity.this.runOnUiThread(new Runnable() {
// @Override
// public void run() {
// if (MainActivity.this.isFinishing()) {
// return;
// }
// adContainer.setVisibility(View.VISIBLE);
// // Initialize the Mobile Ads SDK.
// MobileAds.initialize(MainActivity.this, AppPrivateData.adMobAppId);
// MobileAds.setAppMuted(true);
// mAdView = new AdView(MainActivity.this);
// mAdView.setAdSize(AdSize.SMART_BANNER);
// mAdView.setAdUnitId(AppPrivateData.adUnitId);
// adContainer.addView(mAdView,
// new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
// // Create an ad request. Check your logcat output for the hashed device ID to
// // get test ads on a physical device. e.g.
// // "Use AdRequest.Builder.addTestDevice("ABCDEF012345") to get test ads on this device."
// final AdRequest adRequest = new AdRequest.Builder().build();
// // Start loading the ad in the background.
// mAdView.loadAd(adRequest);
// }
//});
return null;
}
}.execute();
Expand Down Expand Up @@ -356,35 +356,35 @@ public void run() {
}
}

@Override
protected void onPause() {
if (mAdView != null) {
mAdView.pause();
}
super.onPause();
}

@Override
protected void onResume() {
super.onResume();
if (mAdView != null) {
mAdView.resume();
}
}
//@Override
//protected void onPause() {
// if (mAdView != null) {
// mAdView.pause();
// }
// super.onPause();
//}
//
//@Override
//protected void onResume() {
// super.onResume();
// if (mAdView != null) {
// mAdView.resume();
// }
//}

@Override
protected void onActivityResult(final int _requestCode, final int _resultCode, final Intent _data) {
CRBillingManager.get().onActivityResult(_requestCode, _resultCode, _data);
super.onActivityResult(_requestCode, _resultCode, _data);
}

@Override
protected void onDestroy() {
if (mAdView != null) {
mAdView.destroy();
}
super.onDestroy();
}
//@Override
//protected void onDestroy() {
// if (mAdView != null) {
// mAdView.destroy();
// }
// super.onDestroy();
//}

public static void logEvent(final Context _context, final String _eventName) {
if (!AppPrivateData.hasFireBaseData) {
Expand Down

0 comments on commit b35a1ea

Please sign in to comment.