add appcenter to android for analytics
This commit is contained in:
@@ -25,6 +25,12 @@ allprojects {
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "com.gladed.androidgitversion"
|
||||
|
||||
dependencies {
|
||||
def appCenterSdkVersion = '2.2.0'
|
||||
implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
|
||||
implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
||||
}
|
||||
|
||||
def getCurrentFlavor() {
|
||||
Gradle gradle = getGradle()
|
||||
|
||||
@@ -59,7 +65,7 @@ def outpath = "src/main/cpp"
|
||||
def ver_branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
|
||||
def ver_hash = "git log --pretty=format:%h -n 1".execute().text.trim()
|
||||
def ver_count = Integer.parseInt("git rev-list --count HEAD".execute().text.trim())
|
||||
def ver_tag = "git describe --tags --abbrev=0".execute().text.trim()
|
||||
def ver_tag = "git describe --tags --abbrev=0".execute().text.trim().split("-")[0]
|
||||
|
||||
println classpath
|
||||
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
package com.omixlab.panopainter;
|
||||
|
||||
import android.app.NativeActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.microsoft.appcenter.AppCenter;
|
||||
import com.microsoft.appcenter.analytics.Analytics;
|
||||
import com.microsoft.appcenter.crashes.Crashes;
|
||||
|
||||
public class PlatformActivity extends NativeActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
AppCenter.start(getApplication(), "ce4270ce-3c74-4455-b67f-ab991b682d10", Analytics.class, Crashes.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ void App::crash_test()
|
||||
#elif defined(_WIN32)
|
||||
__debugbreak();
|
||||
#elif defined(__ANDROID__)
|
||||
int *x = nullptr; *x = 42;
|
||||
LOG("%d", *x);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user