Android Question add appcenter sdk to b4a

Erel

Administrator
Staff member
Licensed User
Posting instructions as text so others can help you:
B4X:
import com.microsoft.appcenter.AppCenter;
import com.microsoft.appcenter.analytics.Analytics;
import com.microsoft.appcenter.crashes.Crashes;

AppCenter.start(getApplication(), "{Your App Secret}", Analytics.class);
It shouldn't be difficult to call it with JavaObject or inline Java.

Something like:
B4X:
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim AppCenter As JavaObject
AppCenter.InitializeStatic("com.microsoft.appcenter.AppCenter")
Dim Analytics As JavaObject
Analytics.InitializeStatic("com.microsoft.appcenter.analytics.Analytics")
AppCenter.RunMethod("start", Array(ctxt, "your app secret", Analytics))
 
Top