Android Question add appcenter sdk to b4a

Discussion in 'Android Questions' started by b4xqar, Aug 1, 2019.

  1. b4xqar

    b4xqar Member Licensed User

    upload_2019-8-1_21-43-31.png

    is there a way to add this to the b4a android ?
     
  2. DonManfred

    DonManfred Expert Licensed User

    You need to write a wrapper library (in java) to use it. Based on the Snippets i guess it is using KOTLIN.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Posting instructions as text so others can help you:
    Code:
    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:
    Code:
    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))
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice