mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Remove Google Analytics from Android package
This commit is contained in:
parent
11ce0e8f8a
commit
3d0db60ad9
5 changed files with 0 additions and 130 deletions
|
@ -99,7 +99,6 @@ copy {
|
|||
dependencies {
|
||||
implementation 'commons-io:commons-io:2.6'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
@ -109,5 +108,3 @@ allprojects {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "",
|
||||
"project_id": ""
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "",
|
||||
"android_client_info": {
|
||||
"package_name": "io.openrct2.debug"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": ""
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 2,
|
||||
"analytics_property": {
|
||||
"tracking_id": "UA-XXXXXXXX-1"
|
||||
}
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "",
|
||||
"android_client_info": {
|
||||
"package_name": "io.openrct2.develop"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": ""
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 2,
|
||||
"analytics_property": {
|
||||
"tracking_id": "UA-XXXXXXXX-1"
|
||||
}
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "",
|
||||
"android_client_info": {
|
||||
"package_name": "io.openrct2"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": ""
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 2,
|
||||
"analytics_property": {
|
||||
"tracking_id": "UA-XXXXXXXX-1"
|
||||
}
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -21,9 +21,6 @@ import android.util.Log;
|
|||
import android.view.Display;
|
||||
import android.view.Surface;
|
||||
|
||||
import com.google.android.gms.analytics.HitBuilders;
|
||||
import com.google.android.gms.analytics.Tracker;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -90,15 +87,6 @@ public class MainActivity extends AppCompatActivity {
|
|||
String[] supportedAbis = getSupportedAbis();
|
||||
PointF resolution = getResolutionDips();
|
||||
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
|
||||
|
||||
Tracker tracker = ((OpenRCT2App) getApplication()).getDefaultTracker();
|
||||
tracker.setScreenName("Main");
|
||||
tracker.setScreenResolution(Math.round(resolution.x), Math.round(resolution.y));
|
||||
tracker.send(new HitBuilders.ScreenViewBuilder()
|
||||
.setCustomDimension(1, Float.toString(displayMetrics.density))
|
||||
.setCustomDimension(2, TextUtils.join(", ", supportedAbis))
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,23 +2,5 @@ package io.openrct2;
|
|||
|
||||
import android.app.Application;
|
||||
|
||||
import com.google.android.gms.analytics.GoogleAnalytics;
|
||||
import com.google.android.gms.analytics.Tracker;
|
||||
|
||||
public class OpenRCT2App extends Application {
|
||||
private Tracker mTracker;
|
||||
|
||||
/**
|
||||
* Gets the default {@link Tracker} for this {@link Application}.
|
||||
*
|
||||
* @return tracker
|
||||
*/
|
||||
synchronized public Tracker getDefaultTracker() {
|
||||
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.global_tracker);
|
||||
}
|
||||
return mTracker;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue