「Countly」
1、工位局域网调通了上报链路
This commit is contained in:
@@ -25,7 +25,7 @@ public class MoGoApplication extends MultiDexApplication {
|
||||
private static final String TAG = "MoGoApplication";
|
||||
|
||||
|
||||
private String COUNTLY_APP_KEY = "b03e1aeb596d75cc8a7d186db0889ed7d1f55ce1";
|
||||
private String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240";
|
||||
private String COUNTLY_SERVER_URL = "http://172.30.10.190";
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/icon"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ly.count.android.benchmark;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import ly.count.android.sdk.Countly;
|
||||
import ly.count.android.sdk.CountlyConfig;
|
||||
import ly.count.android.sdk.CountlyStore;
|
||||
@@ -8,8 +9,8 @@ import ly.count.android.sdk.ModuleLog;
|
||||
import ly.count.android.sdk.PerformanceCounterCollector;
|
||||
|
||||
public class App extends Application {
|
||||
private final static String COUNTLY_SERVER_URL = "https://xxx.count.ly";
|
||||
private final static String COUNTLY_APP_KEY = "YOUR_APP_KEY";
|
||||
private final static String COUNTLY_SERVER_URL = "http://172.30.10.190";
|
||||
private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240";
|
||||
private final static String DEVICE_ID = "YOUR_DEVICE_ID";
|
||||
|
||||
public static PerformanceCounterCollector appPcc;
|
||||
@@ -19,12 +20,13 @@ public class App extends Application {
|
||||
super.onCreate();
|
||||
|
||||
CountlyConfig config = new CountlyConfig(this, COUNTLY_APP_KEY, COUNTLY_SERVER_URL)
|
||||
.setDeviceId(DEVICE_ID)
|
||||
.setLoggingEnabled(true)
|
||||
.giveAllConsents()
|
||||
.setRequestDropAgeHours(10)//to trigger the age blocks
|
||||
.setEventQueueSizeToSend(100)//for testing the main use case
|
||||
.setParameterTamperingProtectionSalt("test-benchmark-salt");
|
||||
.setDeviceId(DEVICE_ID)
|
||||
.setLoggingEnabled(true)
|
||||
.giveAllConsents()
|
||||
.setRequestDropAgeHours(10)//to trigger the age blocks
|
||||
.setEventQueueSizeToSend(100)//for testing the main use case
|
||||
.setHttpPostForced(true)
|
||||
.setParameterTamperingProtectionSalt("mogo_auto");
|
||||
|
||||
appPcc = new PerformanceCounterCollector();
|
||||
config.pcc = appPcc;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
@@ -10,6 +10,7 @@
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/Theme.Kotlin">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -9,15 +9,15 @@ import ly.count.android.sdk.CountlyConfig
|
||||
* Main Application class
|
||||
*/
|
||||
class App : Application() {
|
||||
private val COUNTLY_SERVER_URL = "https://your.server.ly"
|
||||
private val COUNTLY_APP_KEY = "YOUR_APP_KEY"
|
||||
private val COUNTLY_SERVER_URL = "http://172.30.10.190"
|
||||
private val COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240"
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
// if (COUNTLY_SERVER_URL == "https://your.server.ly" || COUNTLY_APP_KEY == "YOUR_APP_KEY") {
|
||||
// Log.e("CountlyDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY")
|
||||
// return
|
||||
// }
|
||||
if (COUNTLY_SERVER_URL == "https://your.server.ly" || COUNTLY_APP_KEY == "YOUR_APP_KEY") {
|
||||
Log.e("CountlyDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY")
|
||||
return
|
||||
}
|
||||
|
||||
val countlyConfig = CountlyConfig(
|
||||
this,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
@@ -1,15 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="ly.count.android.demo.crash">
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity"
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -2,32 +2,36 @@ package ly.count.android.demo.crash;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
import ly.count.android.sdk.Countly;
|
||||
import ly.count.android.sdk.CountlyConfig;
|
||||
import ly.count.android.sdknative.CountlyNative;
|
||||
|
||||
public class App extends Application {
|
||||
|
||||
private final static String COUNTLY_SERVER_URL = "https://your.server.ly";
|
||||
private final static String COUNTLY_APP_KEY = "YOUR_APP_KEY";
|
||||
private final static String COUNTLY_SERVER_URL = "http://172.30.10.190";
|
||||
private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240";
|
||||
private final static String DEFAULT_URL = "https://your.server.ly";
|
||||
private final static String DEFAULT_APP_KEY = "YOUR_APP_KEY";
|
||||
|
||||
@Override public void onCreate() {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
// if (DEFAULT_URL.equals(COUNTLY_SERVER_URL) || DEFAULT_APP_KEY.equals(COUNTLY_APP_KEY)) {
|
||||
// Log.e("CountlyCrashDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY");
|
||||
// return;
|
||||
// }
|
||||
if (DEFAULT_URL.equals(COUNTLY_SERVER_URL) || DEFAULT_APP_KEY.equals(COUNTLY_APP_KEY)) {
|
||||
Log.e("CountlyCrashDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY");
|
||||
return;
|
||||
}
|
||||
|
||||
Countly.applicationOnCreate();
|
||||
|
||||
CountlyConfig config = new CountlyConfig(this, COUNTLY_APP_KEY, COUNTLY_SERVER_URL).setDeviceId("4432")
|
||||
.setLoggingEnabled(true)
|
||||
.enableCrashReporting()
|
||||
.setViewTracking(true)
|
||||
.setRequiresConsent(false);
|
||||
.setLoggingEnabled(true)
|
||||
.enableCrashReporting()
|
||||
.setViewTracking(true)
|
||||
.setHttpPostForced(true)
|
||||
.setParameterTamperingProtectionSalt("mogo_auto")
|
||||
.setRequiresConsent(false);
|
||||
Countly.sharedInstance().init(config);
|
||||
|
||||
CountlyNative.initNative(getApplicationContext());
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
@@ -17,6 +17,7 @@
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/icon"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -30,8 +30,8 @@ import static ly.count.android.sdk.messaging.CountlyPush.COUNTLY_BROADCAST_PERMI
|
||||
|
||||
public class App extends Application {
|
||||
/** You should use try.count.ly instead of YOUR_SERVER for the line below if you are using Countly trial service */
|
||||
private final static String COUNTLY_SERVER_URL = "https://your.server.ly";
|
||||
private final static String COUNTLY_APP_KEY = "YOUR_APP_KEY";
|
||||
private final static String COUNTLY_SERVER_URL = "http://172.30.10.190";
|
||||
private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240";
|
||||
private final static String DEFAULT_URL = "https://your.server.ly";
|
||||
private final static String DEFAULT_APP_KEY = "YOUR_APP_KEY";
|
||||
|
||||
@@ -41,10 +41,10 @@ public class App extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
// if (DEFAULT_URL.equals(COUNTLY_SERVER_URL) || DEFAULT_APP_KEY.equals(COUNTLY_APP_KEY)) {
|
||||
// Log.e("CountlyDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY");
|
||||
// return;
|
||||
// }
|
||||
if (DEFAULT_URL.equals(COUNTLY_SERVER_URL) || DEFAULT_APP_KEY.equals(COUNTLY_APP_KEY)) {
|
||||
Log.e("CountlyDemo", "Please provide correct COUNTLY_SERVER_URL and COUNTLY_APP_KEY");
|
||||
return;
|
||||
}
|
||||
|
||||
if (false) {
|
||||
//setting up strict mode for additional validation
|
||||
@@ -209,8 +209,8 @@ public class App extends Application {
|
||||
// Countly.CountlyFeatureNames.apm, Countly.CountlyFeatureNames.remoteConfig, Countly.CountlyFeatureNames.feedback
|
||||
//})
|
||||
|
||||
.setHttpPostForced(false)
|
||||
.setParameterTamperingProtectionSalt("test-salt-checksum")
|
||||
.setHttpPostForced(true)
|
||||
.setParameterTamperingProtectionSalt("mogo_auto")
|
||||
.addCustomNetworkRequestHeaders(customHeaderValues)
|
||||
//.enableCertificatePinning(certificates)
|
||||
//.enablePublicKeyPinning(certificates)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
Reference in New Issue
Block a user