Skip to content

Instantly share code, notes, and snippets.

@turtlepile
Created August 11, 2022 08:58
Show Gist options
  • Save turtlepile/1f3c9d0da0e9ccf43fe73ffc66f20cb4 to your computer and use it in GitHub Desktop.
Save turtlepile/1f3c9d0da0e9ccf43fe73ffc66f20cb4 to your computer and use it in GitHub Desktop.
package com.arkitek.flutter.medisys;
import io.flutter.embedding.android.FlutterActivity;
import com.microsoft.appcenter.AppCenter;
import com.microsoft.appcenter.analytics.Analytics;
import com.microsoft.appcenter.crashes.Crashes;
import com.microsoft.appcenter.distribute.Distribute;
import android.os.Bundle;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
AppCenter.start(getApplication(), "{your-project-key-from-appcenter}", Distribute.class, Analytics.class, Crashes.class);
AppCenter.setEnabled(true);
Analytics.trackEvent("Application started");
super.onCreate(savedInstanceState);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment