Allows you to use the API of AppCenter Android SDK on the desktop jvm.
repositories {
maven { url 'https://www.jitpack.io' }
}
dependencies {
implementation 'com.github.Apisium:appcenter-sdk-jvm:<version>'
}
import android.app.Application;
import com.microsoft.appcenter.analytics.Analytics;
import com.microsoft.appcenter.crashes.Crashes;
import com.microsoft.appcenter.crashes.model.TestCrashException;
public class Main {
public static void main(String[] args) throws InterruptedException {
Application app = Application.getApplication(Main.class.getPackage().getName(), 1, "1.0.0");
AppCenter.start(app, "YOUR APP SECRET", Crashes.class, Analytics.class);
app.start();
Analytics.trackEvent("test");
Crashes.trackError(new TestCrashException());
Thread.sleep(10000); // wait for the crash report to be sent
app.close();
}
}
Property | Default Value |
---|---|
com.microsoft.appcenter.preferences | .appcenter-preferences.json |
com.microsoft.appcenter.debug | false |
com.microsoft.appcenter.loglevel | 6 |
com.microsoft.appcenter.crashes.uncaughtexception.autosend | false |
Shirasawa