update gradle, remove ads and tracking code

master
TuxCoder 8 years ago
parent a7a0ac34f8
commit d19e8a5644

@ -15,6 +15,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
}
dependencies {

@ -8,8 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
classpath 'com.google.gms:google-services:2.0.0-beta6'
classpath 'com.android.tools.build:gradle:2.1.0'
}
}

@ -4,6 +4,9 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
lintOptions {
abortOnError false
}
compileSdkVersion 23
buildToolsVersion "23.0.2"

@ -1 +1,81 @@
{"project_info":{"project_id":"routerkeygen-de3de","project_number":"640176020187","name":"Routerkeygen"},"client":[{"client_info":{"mobilesdk_app_id":"1:640176020187:android:cec0e54019dd85eb","client_id":"android:io.github.routerkeygen","client_type":1,"android_client_info":{"package_name":"io.github.routerkeygen"}},"oauth_client":[],"api_key":[],"services":{"analytics_service":{"status":2,"analytics_property":{"tracking_id":"UA-8008640-7"}},"cloud_messaging_service":{"status":1,"apns_config":[]},"appinvite_service":{"status":1,"other_platform_oauth_client":[]},"google_signin_service":{"status":1},"ads_service":{"status":2,"test_banner_ad_unit_id":"ca-app-pub-3940256099942544/6300978111","test_interstitial_ad_unit_id":"ca-app-pub-3940256099942544/1033173712"}}},{"client_info":{"mobilesdk_app_id":"1:640176020187:android:f20199c625c2e4b1","client_id":"android:org.exobel.routerkeygen","client_type":1,"android_client_info":{"package_name":"org.exobel.routerkeygen"}},"oauth_client":[],"api_key":[],"services":{"analytics_service":{"status":2,"analytics_property":{"tracking_id":"UA-8008640-7"}},"cloud_messaging_service":{"status":1,"apns_config":[]},"appinvite_service":{"status":1,"other_platform_oauth_client":[]},"google_signin_service":{"status":1},"ads_service":{"status":1}}}],"client_info":[],"ARTIFACT_VERSION":"1"}
{
"project_info": {
"project_id": "routerkeygen-de3de",
"project_number": "640176020187",
"name": "Routerkeygen"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:640176020187:android:cec0e54019dd85eb",
"client_id": "android:io.github.routerkeygen",
"client_type": 1,
"android_client_info": {
"package_name": "io.github.routerkeygen"
}
},
"oauth_client": [],
"api_key": [],
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "UA-8008640-7"
}
},
"cloud_messaging_service": {
"status": 1,
"apns_config": []
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"google_signin_service": {
"status": 1
},
"ads_service": {
"status": 2,
"test_banner_ad_unit_id": "ca-app-pub-3940256099942544/6300978111",
"test_interstitial_ad_unit_id": "ca-app-pub-3940256099942544/1033173712"
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:640176020187:android:f20199c625c2e4b1",
"client_id": "android:org.exobel.routerkeygen",
"client_type": 1,
"android_client_info": {
"package_name": "org.exobel.routerkeygen"
}
},
"oauth_client": [],
"api_key": [],
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "UA-8008640-7"
}
},
"cloud_messaging_service": {
"status": 1,
"apns_config": []
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"google_signin_service": {
"status": 1
},
"ads_service": {
"status": 1
}
}
}
],
"client_info": [],
"ARTIFACT_VERSION": "1"
}

@ -1,224 +0,0 @@
package org.exobel.routerkeygen;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.preference.PreferenceManager;
import android.text.format.DateUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.millennialmedia.InterstitialAd;
import com.millennialmedia.MMSDK;
import com.millennialmedia.InlineAd;
import com.millennialmedia.MMException;
import java.lang.ref.WeakReference;
public class AdsUtils {
private static final String BANNER_APID = "136973";
private static final String CONNECT_APID = "200804";
private static final String STARTUP_APID = "201332";
private static final String CONNECT_LAST_SHOWN_TIME = "CONNECT_LAST_SHOWN_TIME";
private static final String STARTUP_LAST_SHOWN_TIME = "STARTUP_LAST_SHOWN_TIME";
private static final String CONNECT_LAST_SHOWN_COUNT = "CONNECT_LAST_SHOWN_COUNT";
private static final String STARTUP_LAST_SHOWN_COUNT = "STARTUP_LAST_SHOWN_COUNT";
private static final int COUNTER_LIMIT = 5;
private AdsUtils() {
}
public static void loadAdIfNeeded(final Activity activity) {
final String TAG = activity.getLocalClassName();
final RelativeLayout adRelativeLayout = (RelativeLayout) activity
.findViewById(R.id.adBannerRelativeLayout);
if (checkDonation(activity)) {
adRelativeLayout.getLayoutParams().height = 0;
return;
}
MMSDK.initialize(activity);
// Create the adView
try {
final InlineAd inlineAd = InlineAd.createInstance(BANNER_APID, adRelativeLayout);
// set a refresh rate of 30 seconds that will be applied after the first request
inlineAd.setRefreshInterval(15000);
InlineAd.AdSize adSize = InlineAd.AdSize.BANNER;
// (Optional) Set the ad size
if (canFit(activity.getResources(), InlineAd.AdSize.LEADERBOARD.width)) {
adSize = InlineAd.AdSize.LEADERBOARD;
} else if (canFit(activity.getResources(), InlineAd.AdSize.FULL_BANNER.width)) {
adSize = InlineAd.AdSize.FULL_BANNER;
}
final float scale = activity.getResources().getDisplayMetrics().density;
final int adHeight = (int) (adSize.height * scale + 0.5f);
final WeakReference<RelativeLayout> adLayoutRef = new WeakReference<RelativeLayout>(adRelativeLayout);
// The InlineAdMetadata instance is used to pass additional metadata to the server to
// improve ad selection
final InlineAd.InlineAdMetadata inlineAdMetadata = new InlineAd.InlineAdMetadata().
setAdSize(adSize);
inlineAd.setListener(new InlineAd.InlineListener() {
@Override
public void onRequestSucceeded(InlineAd inlineAd) {
Log.i(TAG, "Inline Ad loaded.");
final RelativeLayout ad = adLayoutRef.get();
if (ad != null) {
ad.getLayoutParams().height = adHeight;
}
}
@Override
public void onRequestFailed(InlineAd inlineAd, InlineAd.InlineErrorStatus errorStatus) {
Log.i(TAG, errorStatus.toString());
}
@Override
public void onClicked(InlineAd inlineAd) {
Log.i(TAG, "Inline Ad clicked.");
}
@Override
public void onResize(InlineAd inlineAd, int width, int height) {
Log.i(TAG, "Inline Ad starting resize.");
}
@Override
public void onResized(InlineAd inlineAd, int width, int height, boolean toOriginalSize) {
Log.i(TAG, "Inline Ad resized.");
}
@Override
public void onExpanded(InlineAd inlineAd) {
Log.i(TAG, "Inline Ad expanded.");
}
@Override
public void onCollapsed(InlineAd inlineAd) {
Log.i(TAG, "Inline Ad collapsed.");
}
@Override
public void onAdLeftApplication(InlineAd inlineAd) {
Log.i(TAG, "Inline Ad left application.");
}
});
inlineAd.request(inlineAdMetadata);
} catch (MMException e) {
Log.e(TAG, "Error creating inline ad", e);
// abort loading ad
}
}
public static void displayStartupInterstitial(Activity activity) {
displayInterstitial(activity, STARTUP_APID, STARTUP_LAST_SHOWN_COUNT,
STARTUP_LAST_SHOWN_TIME);
}
public static void displayConnectInterstitial(Activity activity) {
displayInterstitial(activity, CONNECT_APID, CONNECT_LAST_SHOWN_COUNT,
CONNECT_LAST_SHOWN_TIME);
}
private static void displayInterstitial(final Activity activity,
final String apid, final String countKey, final String timeKey) {
final String TAG = activity.getLocalClassName();
if (checkDonation(activity)) {
return; // NO ADS!
}
MMSDK.initialize(activity);
final SharedPreferences mPrefs = PreferenceManager
.getDefaultSharedPreferences(activity);
final SharedPreferences.Editor editor = mPrefs.edit();
int counter = mPrefs.getInt(countKey, 0);
final long timePassed = System.currentTimeMillis()
- mPrefs.getLong(timeKey, 0);
counter++;
editor.putInt(countKey, counter);
editor.apply();
if (timePassed > DateUtils.WEEK_IN_MILLIS || counter >= COUNTER_LIMIT) try {
final InterstitialAd interstitialAd = InterstitialAd.createInstance(apid);
interstitialAd.setListener(new InterstitialAd.InterstitialListener() {
@Override
public void onLoaded(InterstitialAd interstitialAd) {
Log.i(TAG, "Interstitial Ad loaded.");
// Show the Ad using the display options you configured.
try {
interstitialAd.show(activity);
} catch (MMException e) {
Log.i(activity.getLocalClassName(), "Unable to show interstitial ad content, exception occurred");
e.printStackTrace();
}
}
@Override
public void onLoadFailed(InterstitialAd interstitialAd,
InterstitialAd.InterstitialErrorStatus errorStatus) {
Log.i(TAG, "Interstitial Ad load failed.");
}
@Override
public void onShown(InterstitialAd interstitialAd) {
editor.putInt(countKey, 0);
editor.putLong(timeKey, System.currentTimeMillis());
editor.apply();
Log.i(TAG, "Interstitial Ad shown.");
}
@Override
public void onShowFailed(InterstitialAd interstitialAd,
InterstitialAd.InterstitialErrorStatus errorStatus) {
Log.i(TAG, "Interstitial Ad show failed.");
}
@Override
public void onClosed(InterstitialAd interstitialAd) {
Log.i(TAG, "Interstitial Ad closed.");
}
@Override
public void onClicked(InterstitialAd interstitialAd) {
Log.i(TAG, "Interstitial Ad clicked.");
}
@Override
public void onAdLeftApplication(InterstitialAd interstitialAd) {
Log.i(TAG, "Interstitial Ad left application.");
}
@Override
public void onExpired(InterstitialAd interstitialAd) {
Log.i(TAG, "Interstitial Ad expired.");
}
});
interstitialAd.load(activity, null);
} catch (MMException e) {
Log.e(activity.getLocalClassName(), "Error creating interstitial ad", e);
// abort loading ad
}
}
public static boolean checkDonation(Activity activity) {
final PackageManager pm = activity.getPackageManager();
boolean app_installed;
try {
pm.getPackageInfo("org.exobel.routerkeygendownloader",
PackageManager.GET_ACTIVITIES);
app_installed = true;
} catch (PackageManager.NameNotFoundException e) {
app_installed = false;
}
if (!app_installed) {
try {
pm.getPackageInfo("org.doublecheck.wifiscanner",
PackageManager.GET_ACTIVITIES);
app_installed = true;
} catch (PackageManager.NameNotFoundException e) {
app_installed = false;
}
}
return app_installed;
}
// Determine if the requested adWidth can fit on the screen.
private static boolean canFit(Resources res, int adWidth) {
int adWidthPx = (int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, adWidth, res.getDisplayMetrics());
DisplayMetrics metrics = res.getDisplayMetrics();
return metrics.widthPixels >= adWidthPx;
}
}

@ -38,9 +38,6 @@ import android.provider.Settings;
import android.util.Log;
import com.farproc.wifi.connecter.Wifi;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.StandardExceptionParser;
import com.google.android.gms.analytics.Tracker;
import org.exobel.routerkeygen.AutoConnectManager.onConnectionListener;
@ -191,16 +188,6 @@ public class AutoConnectService extends Service implements onConnectionListener
}
} catch (Exception e) {
e.printStackTrace();
// Get tracker.
Tracker t = ((RouterKeygenApplication) getApplication()).getTracker();
t.send(new HitBuilders.ExceptionBuilder()
.setDescription(
new StandardExceptionParser(this, null)
.getDescription(Thread.currentThread().getName(), e))
.setFatal(false)
.build()
);
}
if (currentNetworkId == -1) {
mNotificationManager.notify(

@ -17,7 +17,9 @@ public class CancelOperationActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cancel_operation);
if (savedInstanceState != null) {
setContentView(R.layout.activity_cancel_operation);
}
if (getIntent().getStringExtra(SERVICE_TO_TERMINATE) == null)
finish();
else {

@ -5,11 +5,6 @@ import android.app.Application;
import android.os.Build;
import android.os.StrictMode;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.Tracker;
import com.millennialmedia.MMSDK;
import com.millennialmedia.UserData;
import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
@ -24,21 +19,6 @@ import org.exobel.routerkeygen.ui.Preferences;
ReportField.STACK_TRACE, ReportField.LOGCAT}, mode = ReportingInteractionMode.TOAST, resToastText = R.string.crash_toast_text)
public class RouterKeygenApplication extends Application {
private Tracker mTracker;
/**
* Gets the default {@link Tracker} for this {@link Application}.
* @return tracker
*/
synchronized public Tracker getTracker() {
if (mTracker == null) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
mTracker = analytics.newTracker(R.xml.analytics);
mTracker.enableAdvertisingIdCollection(true);
}
return mTracker;
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
@ -49,13 +29,6 @@ public class RouterKeygenApplication extends Application {
} catch (Exception e) {
e.printStackTrace();
}
try {
UserData userData = new UserData().
setEthnicity(UserData.Ethnicity.HISPANIC);
MMSDK.setUserData(userData);
} catch (Exception e) {
e.printStackTrace();
}
if (BuildConfig.DEBUG) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
StrictMode

@ -82,6 +82,7 @@ public class WifiScanReceiver extends BroadcastReceiver {
}
} catch (SecurityException e) {
//Sometimes getScanResults triggers a SecurityException
e.printStackTrace();
}
}

@ -28,9 +28,6 @@ import android.view.MenuItem;
import android.widget.Toast;
import com.google.android.gms.analytics.GoogleAnalytics;
import org.exobel.routerkeygen.AdsUtils;
import org.exobel.routerkeygen.R;
import org.exobel.routerkeygen.algorithms.Keygen;
import org.exobel.routerkeygen.algorithms.WiFiNetwork;
@ -45,7 +42,6 @@ public class ManualInputActivity extends Activity implements
getActionBar().setDisplayHomeAsUpEnabled(true);
AdsUtils.loadAdIfNeeded(this);
if (savedInstanceState == null) {
getFragmentManager()
.beginTransaction()
@ -61,16 +57,12 @@ public class ManualInputActivity extends Activity implements
@Override
public void onStart() {
super.onStart();
//Get an Analytics tracker to report app starts and uncaught exceptions etc.
GoogleAnalytics.getInstance(this).reportActivityStart(this);
}
@Override
public void onStop() {
super.onStop();
//Stop the analytics tracking
GoogleAnalytics.getInstance(this).reportActivityStop(this);
}
@Override

@ -26,9 +26,7 @@ import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.gms.analytics.GoogleAnalytics;
import org.exobel.routerkeygen.AdsUtils;
import org.exobel.routerkeygen.R;
import org.exobel.routerkeygen.algorithms.WiFiNetwork;
@ -42,7 +40,6 @@ public class NetworkActivity extends Activity {
getActionBar().setDisplayHomeAsUpEnabled(true);
AdsUtils.loadAdIfNeeded(this);
if (savedInstanceState == null) {
final Bundle arguments = new Bundle();
final WiFiNetwork wiFiNetwork = getIntent().getParcelableExtra(NetworkFragment.NETWORK_ID);
@ -59,16 +56,12 @@ public class NetworkActivity extends Activity {
@Override
public void onStart() {
super.onStart();
//Get an Analytics tracker to report app starts and uncaught exceptions etc.
GoogleAnalytics.getInstance(this).reportActivityStart(this);
}
@Override
public void onStop() {
super.onStop();
//Stop the analytics tracking
GoogleAnalytics.getInstance(this).reportActivityStop(this);
}

@ -53,12 +53,8 @@ import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewSwitcher;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.StandardExceptionParser;
import com.google.android.gms.analytics.Tracker;
import org.acra.ACRA;
import org.exobel.routerkeygen.AdsUtils;
import org.exobel.routerkeygen.AutoConnectService;
import org.exobel.routerkeygen.BuildConfig;
import org.exobel.routerkeygen.R;
@ -146,7 +142,6 @@ public class NetworkFragment extends Fragment {
i.putExtra(AutoConnectService.SCAN_RESULT,
wifiNetwork.getScanResult());
getActivity().startService(i);
AdsUtils.displayConnectInterstitial(getActivity());
}
});
}
@ -453,15 +448,6 @@ public class NetworkFragment extends Fragment {
// Get tracker.
final Activity activity = getActivity();
if (activity != null) {
Tracker t = ((RouterKeygenApplication) activity.getApplication()).getTracker();
t.send(new HitBuilders.ExceptionBuilder()
.setDescription(
new StandardExceptionParser(activity, null)
.getDescription(Thread.currentThread().getName(), e))
.setFatal(false)
.build()
);
}
}
if (nativeCalc && (keygen instanceof ThomsonKeygen)) {

@ -40,9 +40,6 @@ import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import com.google.android.gms.analytics.GoogleAnalytics;
import org.exobel.routerkeygen.AdsUtils;
import org.exobel.routerkeygen.BuildConfig;
import org.exobel.routerkeygen.R;
import org.exobel.routerkeygen.UpdateCheckerService;
@ -100,74 +97,6 @@ public class NetworksListActivity extends Activity implements
.getDefaultSharedPreferences(this);
welcomeScreenShown = mPrefs.getBoolean(Preferences.VERSION, false);
final long timePassed = System.currentTimeMillis()
- mPrefs.getLong(LAST_DIALOG_TIME, 0);
if (!welcomeScreenShown || (timePassed > DateUtils.WEEK_IN_MILLIS)) {
final SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(Preferences.VERSION, true);
editor.putLong(LAST_DIALOG_TIME, System.currentTimeMillis());
editor.apply();
// Checking for updates every week
if (BuildConfig.APPLICATION_ID.equals("org.exobel.routerkeygen")) {
startService(new Intent(getApplicationContext(),
UpdateCheckerService.class));
}
if (!AdsUtils.checkDonation(this)) {
final String whatsNewTitle = getString(R.string.msg_welcome_title);
final String whatsNewText = getString(R.string.msg_welcome_text);
final AlertDialog.Builder initialDialog = new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(whatsNewTitle)
.setMessage(whatsNewText)
.setNegativeButton(R.string.bt_dont_donate,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
dialog.dismiss();
}
})
.setPositiveButton(R.string.bt_google_play,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
try {
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse("market://details?id="
+ Preferences.GOOGLE_PLAY_DOWNLOADER)));
} catch (android.content.ActivityNotFoundException anfe) {
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse("http://play.google.com/store/apps/details?id="
+ Preferences.GOOGLE_PLAY_DOWNLOADER)));
}
Toast.makeText(getApplicationContext(),
R.string.msg_donation,
Toast.LENGTH_LONG).show();
dialog.dismiss();
}
});
if (BuildConfig.APPLICATION_ID.equals("org.exobel.routerkeygen")) {
initialDialog.setNeutralButton(R.string.bt_paypal,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
final String donateLink = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V3FFBTRTTV5DN";
Uri uri = Uri.parse(donateLink);
startActivity(new Intent(
Intent.ACTION_VIEW, uri));
dialog.dismiss();
}
}).show();
} else {
initialDialog.show();
}
}
}
if (welcomeScreenShown) {
AdsUtils.displayStartupInterstitial(this);
}
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swiperefresh);
mSwipeRefreshLayout.setOnRefreshListener(
@ -234,9 +163,6 @@ public class NetworksListActivity extends Activity implements
@Override
public void onStart() {
super.onStart();
AdsUtils.loadAdIfNeeded(this);
//Get an Analytics tracker to report app starts and uncaught exceptions etc.
GoogleAnalytics.getInstance(this).reportActivityStart(this);
getPrefs();
if (wifiOn) {
try {
@ -258,7 +184,6 @@ public class NetworksListActivity extends Activity implements
public void onResume() {
super.onResume();
getPrefs();
GoogleAnalytics.getInstance(this).setAppOptOut(!analyticsOptIn);
if (autoScan) {
mHandler.removeCallbacks(mAutoScanTask);
mHandler.postDelayed(mAutoScanTask, autoScanInterval * 1000L);
@ -280,8 +205,6 @@ public class NetworksListActivity extends Activity implements
public void onStop() {
super.onStop();
try {
//Stop the analytics tracking
GoogleAnalytics.getInstance(this).reportActivityStop(this);
unregisterReceiver(scanFinished);
unregisterReceiver(stateChanged);
} catch (Exception e) {
@ -296,7 +219,7 @@ public class NetworksListActivity extends Activity implements
}
registerReceiver(scanFinished, new IntentFilter(
WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
if (wifi.getWifiState() == WifiManager.WIFI_STATE_ENABLING) {
if (wifi.getWifiState() == WifiManager.WIFI_STATE_ENABLING ) {
registerReceiver(stateChanged, new IntentFilter(
WifiManager.WIFI_STATE_CHANGED_ACTION));
Toast.makeText(this, R.string.msg_wifienabling, Toast.LENGTH_SHORT)

@ -55,11 +55,9 @@ import android.widget.TabHost.TabSpec;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.ipaulpro.afilechooser.FileChooserActivity;
import com.ipaulpro.afilechooser.utils.FileUtils;
import org.exobel.routerkeygen.AdsUtils;
import org.exobel.routerkeygen.BuildConfig;
import org.exobel.routerkeygen.DictionaryDownloadService;
import org.exobel.routerkeygen.R;
@ -152,9 +150,8 @@ public class Preferences extends PreferenceActivity {
}
});
boolean app_installed = AdsUtils.checkDonation(this);
final PreferenceCategory mCategory = (PreferenceCategory) findPreference("2section");
if (!app_installed) {
/*if (!app_installed) {
mCategory.removePreference(findPreference("analytics_enabled"));
// If you haven't the donate app installed remove the paypal donate
// link.
@ -244,7 +241,7 @@ public class Preferences extends PreferenceActivity {
return true;
}
});
}
}*/
findPreference("changelog").setOnPreferenceClickListener(
new OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
@ -332,16 +329,12 @@ public class Preferences extends PreferenceActivity {
@Override
public void onStart() {
super.onStart();
//Get an Analytics tracker to report app starts and uncaught exceptions etc.
GoogleAnalytics.getInstance(this).reportActivityStart(this);
}
@Override
public void onStop() {
super.onStop();
//Stop the analytics tracking
GoogleAnalytics.getInstance(this).reportActivityStop(this);
}
protected Dialog onCreateDialog(int id) {

@ -7,6 +7,6 @@
<bool name="wifiOnDefault">true</bool>
<bool name="autoScanDefault">false</bool>
<bool name="analyticsDefault">true</bool>
<bool name="analyticsDefault">false</bool>
</resources>

@ -1,27 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="TypographyDashes">
<!-- the Local LogLevel for Analytics -->
<string name="ga_logLevel">verbose</string>
<!-- Replace placeholder ID with your tracking ID -->
<string name="ga_trackingId">UA-8008640-7</string>
<!-- Enable Activity tracking -->
<bool name="ga_autoActivityTracking">true</bool>
<!-- The screen names that will appear in reports -->
<screenName name="org.exobel.routerkeygen.ui.NetworksListFragment">
RouterKeygen NetworksListFragment
</screenName>
<screenName name="org.exobel.routerkeygen.ui.NetworkFragment">
RouterKeygen NetworkFragment
</screenName>
<!-- Enable automatic exception tracking -->
<bool name="ga_reportUncaughtExceptions">true</bool>
<!-- Set session time out to 60 seconds -->
<integer name="ga_sessionTimeout">300</integer>
</resources>
Loading…
Cancel
Save