Android SDK API

Last updated:2021-12-15
Expand all
Android SDK API

Noun engagement

Name Explanation Notes JMLinkBackstage position
URI Scheme App (b) the inter-operability of the inter-operability entrance and the transfer of parameters. Yes. AndroidManifest.xml Internal Start Page activity Enter. For example:mwsdk://, just fill in the code mwsdk All right, note: The initials cannot be numbers, capital letters are not supported, and special characters such as underlined are not supported. Left Navigator - > Application Settings - > JMLink Settings - >Scheme”
JMLink Key JMLink The only mark. Mobile client Use this to fetch JMLink Specific URI Scheme Configure JMLink Fill in Attention with code register() The first parameter is consistent. Left Navigator-> "JMLink"-"service management "------------------------------------------------------------------------------------------------------------------------------------------ Key”

Scheme Integration

Android System App It's isolated, through. URI Scheme,App You can call from one to another and you can pass the parameters.

manifest

<!-- 将“你的Scheme”替换为后台填写的URI Scheme。--> <activity android:name=".WelcomeActivity"> <intent-filter> <data android:scheme="你的Scheme"/> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
          <!-- 将“你的Scheme”替换为后台填写的URI Scheme。-->
<activity
 android:name=".WelcomeActivity">
 <intent-filter>
 <data android:scheme="你的Scheme"/>
 <action android:name="android.intent.action.VIEW" />
 <category android:name="android.intent.category.DEFAULT" />
 <category android:name="android.intent.category.BROWSABLE" />
 </intent-filter>
 <intent-filter>
 <action android:name="android.intent.action.MAIN" />
 <category android:name="android.intent.category.LAUNCHER" />
 </intent-filter>
</activity>

        
This code block is shown in the floating window

Supported version

applink Supported since version 1.2.0

Introduction

Google Applink Support Android 6.0 Over and above, for a chain of scenes like text messages, memos, emails, etc. Rise appWatch out for parts of the phone that may not be supported. applink

Usage

Use applink, needs to configure backstage to fill the application 's signature file SHA256 Value, sign file SHA256 Values can be obtained with the following command and with the client manifest Required applink Relevant Configuration Information

keytool -list -v -keystore 您的签名文件
          keytool -list -v -keystore 您的签名文件

        
This code block is shown in the floating window

manifest

<!-- 将“魔链分配的域名”替换为后台域名管理中支持applink的域名--> <!-- 如果想为多个域名添加applink,请增加多个intent-filter并修改host--> <activity android:name=".WelcomeActivity"> <intent-filter> <data android:scheme="你的Scheme"/> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter> //applink 配置 <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="魔链分配的域名" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
          <!-- 将“魔链分配的域名”替换为后台域名管理中支持applink的域名-->
<!-- 如果想为多个域名添加applink,请增加多个intent-filter并修改host-->
<activity
 android:name=".WelcomeActivity">
 <intent-filter>
 <data android:scheme="你的Scheme"/>
 <action android:name="android.intent.action.VIEW" />
 <category android:name="android.intent.category.DEFAULT" />
 <category android:name="android.intent.category.BROWSABLE" />
 </intent-filter>

    //applink 配置
     <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data
            android:scheme="https"
            android:host="魔链分配的域名" />
    </intent-filter>

 <intent-filter>
 <action android:name="android.intent.action.MAIN" />
 <category android:name="android.intent.category.LAUNCHER" />
 </intent-filter>
</activity>

        
This code block is shown in the floating window

SDK Initialize

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().init(Context context)
  • Description:
  • Initialization interface. If no privacy authorization by the user is required, it is recommended that Application Yes. onCreate; if a user ' s authorization is required, the authorization is given and the user consents to the call.
  • Parameters:
  • context:android Context
  • Example:
JMLink API.getInstance().init(this);
              JMLink API.getInstance().init(this);

        
This code block is shown in the floating window

SDK Settings debug Mode

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().setDebugMode(boolean enable)
  • Description:
  • Settings to open debug Mode.true will print more log information. Recommendation init Call before interface.
  • Parameters:
  • enable:debug Switches
  • Example:
JMLink API.getInstance().setDebugMode(true);
              JMLink API.getInstance().setDebugMode(true);

        
This code block is shown in the floating window

Developer needsRegistrationReceive deeplink Data Return Interface

Supported version

Supported since version 1.2.3

API definition

  • register(JMLinkResponse response)
  • Description:
  • RegistrationDefault route back. It's now. jmlink, which triggers hereJMLinkResponseCall back. Developer can get parameters in the back. Recommended procedure Application or static class or onCreate *** and must be in routerV2() Call before interface***
  • Parameters:
  • responseInterface echoes
  • Callback:

response(JMLinkResponseObj obj)

  • Below are the parameters in the object
  • paramMap: Custom parameters for jump-and-go time zones map(includes old versions) JMLink Medium key)
  • uri:Actual for Jumping uri
  • source:This time. JMLink One, one.Scheme(deeplink/applink),2、Replay(Deferred Deep Linking),3、Unknown(unknown source)
  • type:This callback type, 1,Installation(installed), 2,Open(opens) 3,Unknown(unknown)
JMLink API.getInstance().register(new JMLinkResponse() { @Override public void response(JMLinkResponseObj obj) { //获取参数,进行后续工作 Log.e(TAG, "replay = " + obj.paramMap + " " + obj.uri + " " + obj.source + " " + obj.type); } });
          JMLink API.getInstance().register(new JMLinkResponse() {
 @Override
 public void response(JMLinkResponseObj obj) {
         //获取参数,进行后续工作
 Log.e(TAG, "replay = " + obj.paramMap + " " + obj.uri + " " + obj.source + " " + obj.type);
 }
});

        
This code block is shown in the floating window

Specific Page Jump

This can be achieved through the following interfaces:

  • Open from a mobile browser through a short chain App Specific Pagesscheme Pull up)
  • By using the application treasure, you can open it directly from within. App Specific page. (If downloading a link is an application value, it is recommended to support the application value downloading. I'm not sure.
  • App When not installed, go to the download page by short-chain jump, and when installed, for the first time open to the previous pageDeferred Deep Linking。

Pass.schemePage jumps andDeferred Deep LinkingFunctions

  1. Adoption scheme Pull-up applications in intent.getData It's gonna include a lift. uri Get this. uri Call router interface allows you to jump to the specified page.
  2. When scheme Deferred Deep Linkingfunction to extract data. (equivalent to the old version) router and replay Interface 2 and 1)

Supported version

Supported since version 1.2.3

API definition

  • JMLink API.getInstance().routerV2(Uri jMLinkUri)
  • Description:
  • Based on application startup intent data Middle. uri, jump to a specific page. *** required manifest Configured scheme Received activity. And must. jmlink key Call after binding the page. ***
  • When uri Deferred Deep LinkingFunction to extract data
  • Parameters:
  • jMLinkUri: On application startup intent data Middle. uri
  • Example:
public class WelcomeActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //首先注册回调接口 JMLink API.getInstance().register(new JMLinkResponse() { @Override public void response(JMLinkResponseObj obj) { } }); //然后再进行数据路由 Uri uri = getIntent().getData(); JMLink API.getInstance().routerV2(uri); } }
          
public class WelcomeActivity extends Activity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 //首先注册回调接口
 JMLink API.getInstance().register(new JMLinkResponse() {
         @Override
         public void response(JMLinkResponseObj obj) {
         }
        });
        //然后再进行数据路由
        Uri uri = getIntent().getData();
        JMLink API.getInstance().routerV2(uri);
 }
}

        
This code block is shown in the floating window

Codeless Invite

User A Sharing App Content to User B, User B Install H5 Pages Shared Through User A App, the user A can accumulate the corresponding points without an invitation code for the entire journey.

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().getParam(String key)
  • Description:
  • From JS SDK PassedCodeless InviteInvite Parameter Information
  • Parameters:
  • key:The user-defined parameter from the developer key Like what?"u_id"
  • As a result, returns:
  • String:Customizes the actual value of the parameter. Return if None null
  • Example:
String uid = JMLink API.getInstance().getParam("u_id");
           String uid = JMLink API.getInstance().getParam("u_id");

        
This code block is shown in the floating window

In order to realize jmlink Service Jump to app Specifies the page,app The end needs to pass sdk Will jmlink key(portal when creating a short chain service), and Specific pages are bound. There are two specific approaches:

I. TRANSFER BY NOTE (expired)

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().registerWithAnnotation()
  • Description:
  • Turns on the note attachment. After Call sdk It's all marked.JMLinkRouterNote on Classes and jmlink key Make binding. Recommendation Application Category sdk init Call after.
  • Example:
//开启注解绑定 public class JMLinkExampleApplication extends Application { @Override public void onCreate() { super.onCreate(); JMLink API.getInstance().setDebugMode(true); JMLink API.getInstance().init(getApplicationContext()); JMLink API.getInstance().registerWithAnnotation();//开启注解绑定 } } //注册默认路由,当下发的jmlink key没有与任何页面绑定时,跳转到此页面 @JMLinkDefaultRouter public class DefaultRouteActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("DefaultRouteActivity"); } } //注册路由,当下发的jmlink key与此处的“jmlink_key”一致时,跳转到此页面。checkYYB状态后,应用宝可通过此方法获取参数信息 @JMLinkRouter(keys = "jmlink_key") public class SecondActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("SecondActivity"); //通过intent方式获取动态参数值 Intent intent = getIntent(); if (intent!= null) { String param = intent.getStringExtra("param"); } } }
          //开启注解绑定
public class JMLinkExampleApplication extends Application {

 @Override
 public void onCreate() {
 super.onCreate();
        JMLink API.getInstance().setDebugMode(true);
 JMLink API.getInstance().init(getApplicationContext());
 JMLink API.getInstance().registerWithAnnotation();//开启注解绑定
 }
}

//注册默认路由,当下发的jmlink key没有与任何页面绑定时,跳转到此页面
@JMLinkDefaultRouter
public class DefaultRouteActivity extends Activity {

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setTitle("DefaultRouteActivity");
 }

}

//注册路由,当下发的jmlink key与此处的“jmlink_key”一致时,跳转到此页面。checkYYB状态后,应用宝可通过此方法获取参数信息
@JMLinkRouter(keys = "jmlink_key")
public class SecondActivity extends Activity {

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setTitle("SecondActivity");

 //通过intent方式获取动态参数值
 Intent intent = getIntent();
 if (intent!= null) {
 String param = intent.getStringExtra("param");
 }
 }
}

        
This code block is shown in the floating window

Note: If yes Fragment As page you need to jump to specific Fragment, you may need: One. JMLink Add dynamic parameters type Which is the difference? Fragment 2 in it FragmentActivity Add a note inside and then by type Which is the specific jump? Fragment。

Dynamic binding through interfaces (expired)

Except... registerWithAnnotationWe also offer register( ) It's easy for developers to process extra actions before jumping, for example.LoginWait. If necessary before jumpLoginWait, you can use the ones below. register Methodology

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().registerDefault(JMLinkCallback callback)

  • Description:

  • RegistrationDefault route back. It's now. jmlink key JMLinkCallbackCall back. Developer can trigger the jump of the actual page in the back. Suggested program start page onCreate *** and must be in router() Call before interface***

  • Parameters:

  • callbackInterface echoes

  • Callback:

execute(Map<String, String> paramMap, Uri uri) + paramMap: Custom parameters for jump-and-go time zones map + uri:Actual for Jumping uri

  • JMLink API.getInstance().register(String jmlinkKey, JMLinkCallback callback)

  • Description:

  • For Assignment jmlink key RegistrationRoadway back. It's now. jmlink key and here specified jmlinkKey When matching, trigger hereJMLinkCallbackCall back. Developer can trigger the jump of the actual page in the back. Suggested program start page onCreate *** and must be in router() Call before interface***

  • Parameters:

  • jmlinkKey:jmlink Yes. key,jmlink The only sign.

  • callbackInterface echoes

  • Callback:

execute(Map<String, String> paramMap, Uri uri) + paramMap: Custom parameters for jump-and-go time zones map + uri:Actual for Jumping uri

  • JMLink API.getInstance().unregisterDefault()

  • Description:

  • CounterRegistrationDefault route, the method will be deletedRegistrationdefault route, dueRegistrationDefault route time JMLinkCallback Could contain references to the current interface, if not counteredRegistrationIf recovered, there could be a memory leak. onDestroy Implementation of this methodologyRegistration。

  • JMLink API.getInstance().unregister(String jmlinkKey)

  • Description:

  • CounterRegistrationAssign jmlinkKey.......................................................................................Registrationto specify jmlink key Registration♪ The way back ♪RegistrationTime of route JMLinkCallback Could contain references to the current interface, if not counteredRegistrationIf recovered, there could be a leak in the memory. onDestroy Implementation of this methodologyRegistration。

  • Example:

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); register (this); } private void register(Context context){ JMLink API.getInstance().registerDefault(new JMLinkCallback() { @Override public void execute(Map<String, String> paramMap, Uri uri) { JMLinkIntentBuilder.buildIntent(paramMap, context, DefaultRouteActivity.class); } }); // jmlinkKey: jmlink 的 key, jmlink的唯一标识 JMLink API.getInstance().register("您的jmlinkKey", new JMLinkCallback() { public void execute(Map<String, String> paramMap, Uri uri) { JMLinkIntentBuilder.buildIntent(paramMap, context, SecondActivity.class); } }); } private static void unregister() { JMLink API.getInstance().unregisterDefault(); JMLink API.getInstance().unregister("您的jmlinkKey") } @Override protected void onDestroy() { super.onDestroy(); unregister(); }
          
@Override
public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 register (this);
}
private void register(Context context){
 JMLink API.getInstance().registerDefault(new JMLinkCallback() {
 @Override
 public void execute(Map<String, String> paramMap, Uri uri) {
         JMLinkIntentBuilder.buildIntent(paramMap, context, DefaultRouteActivity.class);
 }
 });
    // jmlinkKey: jmlink 的 key, jmlink的唯一标识
 JMLink API.getInstance().register("您的jmlinkKey", new JMLinkCallback() {
 public void execute(Map<String, String> paramMap, Uri uri) {
         JMLinkIntentBuilder.buildIntent(paramMap, context, SecondActivity.class);
 }
 });
}

private static void unregister() {
 JMLink API.getInstance().unregisterDefault();
     JMLink API.getInstance().unregister("您的jmlinkKey")
}

@Override
protected void onDestroy() {
 super.onDestroy();
 unregister();
}

        
This code block is shown in the floating window

Or use static class. JMLinkCallback

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); register(); } private void register(){ JMLink API.getInstance().registerDefault(new DefaultCallback(getApplicationContext())); // jmlinkKey: jmlink 的 key, jmlink的唯一标识 JMLink API.getInstance().register("您的jmlinkKey", new KeyCallback(getApplicationContext())); } static class DefaultCallback implements JMLinkCallback { private Context context; public DefaultCallback(Context context) { this.context = context; } @Override public void execute(Map<String, String> paramMap, Uri uri) { JMLinkIntentBuilder.buildIntent(paramMap, context, DefaultRouteActivity.class); } } static class KeyCallback implements JMLinkCallback { private Context context; public KeyCallback(Context context) { this.context = context; } @Override public void execute(Map<String, String> paramMap, Uri uri) { JMLinkIntentBuilder.buildIntent(paramMap, context, SecondActivity.class); } }
          @Override
public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 register();
}

private void register(){
    JMLink API.getInstance().registerDefault(new DefaultCallback(getApplicationContext()));
    // jmlinkKey: jmlink 的 key, jmlink的唯一标识
    JMLink API.getInstance().register("您的jmlinkKey", new KeyCallback(getApplicationContext()));
}

static class DefaultCallback implements JMLinkCallback {
    private Context context;
    public DefaultCallback(Context context) {
        this.context = context;
    }
    @Override
    public void execute(Map<String, String> paramMap, Uri uri) {
        JMLinkIntentBuilder.buildIntent(paramMap, context, DefaultRouteActivity.class);
    }
}

static class KeyCallback implements JMLinkCallback {
    private Context context;
    public KeyCallback(Context context) {
        this.context = context;
    }

    @Override
    public void execute(Map<String, String> paramMap, Uri uri) {
        JMLinkIntentBuilder.buildIntent(paramMap, context, SecondActivity.class);
    }
}

        
This code block is shown in the floating window

These two approaches can be used to bind operations if they are simple and less dynamic JMLink keyIf business is complex, there are multiple short chains and JMLink key, recommends direct use dynamicsRegistration registerDefault in which the developers can agree on their own business design parameters registerDefault, which page does not use JMLink key

Specific page jump (expired)

This can be achieved through the following interfaces:

  • Open from a mobile browser through a short chain App Specific Pagesscheme Pull up)
  • By using the application treasure, you can open it directly from within. App Specific page. (If downloading a link is an application value, it is recommended to support the application value downloading. I'm not sure.
  • App When not installed, go to the download page by short-chain jump, and when installed, for the first time open to the previous pageDeferred Deep Linking。

I. ADOPTION scheme Dropping (expired)

Pass. scheme Pull-up applications in intent.getData It's gonna include a lift. uri Get this. uri Call router interface allows you to jump to the specified page.

Supported version

Supported since version 1.0.0

API definition

  • JMLink API.getInstance().router(Uri jMLinkUri)
  • Description:
  • Based on application startup intent data Middle. uri, jump to a specific page. *** required manifest Configured scheme Received activity. And must. jmlink key Call after binding the page. ***
  • Parameters:
  • jMLinkUri: On application startup intent data Middle. uri
  • Example:
public class WelcomeActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); JMLink API.getInstance().registerWithAnnotation(); Uri uri = getIntent().getData(); if (uri!= null) { //uri不为null,表示应用是从scheme拉起 JMLink API.getInstance().router(uri); finish(); } } }
          
public class WelcomeActivity extends Activity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
        JMLink API.getInstance().registerWithAnnotation();
 Uri uri = getIntent().getData();
 if (uri!= null) { //uri不为null,表示应用是从scheme拉起
 JMLink API.getInstance().router(uri);
 finish();
 }
 }
}

        
This code block is shown in the floating window

II.Deferred Deep Linking(expired)

Yes. intent.getData None of them. uri We need to call the information. replay Interface works.Deferred Deep LinkingGo to the specific page of the previous browsing, and the common scenes are the following:

  • Be applied or launcher Applications of other scenes
  • App When not installed, jumps through a short chain to the download page. First time open after installation App

*** Attention 1.1.0 Start Add Interface replay Make application treasures. and From installationDeferred Deep LinkingThe old app treasure. and Deferred Deep LinkingInterface deferredRouter and checkYYB replay Replace, note that only one call in a page replay(ReplayCallback replayCallback) if the earlier version used by the developer is less 1.1.0, and then called in one page deferredRouter and checkYYBThen upgrade it up and remove it. deferredRouter( ) Call will checkYYB Replace with replay It's fine.***

Supported version

Supported since version 1.1.0

API definition

  • JMLink API.getInstance().replay(ReplayCallback replayCallback)
  • Description:
  • Yes. intent.getData Nothing. uri When the information is called, check if it comes from the application treasure or installationDeferred Deep Linking, if yes, jump to the target page.*** jmlink key Call after binding with page***
  • Parameters:
  • replayCallback: Callback Interface
  • Callback:

onSuccess() Triggers when you jump to a specific page. onFail() Triggers when you jump to a specific page.

public class JMLinkExampleApplication extends Application { @Override public void onCreate() { super.onCreate(); JMLink API.getInstance().setDebugMode(true); JMLink API.getInstance().init(getApplicationContext()); JMLink API.getInstance().registerDefault(new JMLinkCallback() { @Override public void execute(Map<String, String> paramMap, Uri uri) { //执行跳转逻辑 } }); } } public class WelcomeActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Uri uri = getIntent().getData(); Log.e(TAG, "data = " + uri); if (uri!= null) { JMLink API.getInstance().router(uri); finish(); } else { JMLink API.getInstance().replay(new MyReplayCallback(this)); } } static class MyReplayCallback implements ReplayCallback { Context context; WeakReference<Activity> weakReference; MyReplayCallback(Activity activity) { context = activity.getApplicationContext(); weakReference = new WeakReference<>(activity); } @Override public void onFailed() { Log.d(TAG, "replay failed"); Intent intent = new Intent(context, DefaultRouteActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(intent); Activity activity = weakReference.get(); if (activity!= null) { activity.finish(); } } @Override public void onSuccess() { Log.d(TAG, "replay success"); Activity activity = weakReference.get(); if (activity!= null) { Log.d(TAG, "activity finish"); activity.finish(); } } } }
          public class JMLinkExampleApplication extends Application {
 @Override
 public void onCreate() {
 super.onCreate();
 JMLink API.getInstance().setDebugMode(true);
 JMLink API.getInstance().init(getApplicationContext());
 JMLink API.getInstance().registerDefault(new JMLinkCallback() {
 @Override
 public void execute(Map<String, String> paramMap, Uri uri) {
 //执行跳转逻辑
 }
 });
 }
}

public class WelcomeActivity extends Activity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Uri uri = getIntent().getData();
 Log.e(TAG, "data = " + uri);
 if (uri!= null) {
 JMLink API.getInstance().router(uri);
 finish();
 } else {
 JMLink API.getInstance().replay(new MyReplayCallback(this));
 }
 }

    static class MyReplayCallback implements ReplayCallback {
 Context context;
 WeakReference<Activity> weakReference;
 MyReplayCallback(Activity activity) {
 context = activity.getApplicationContext();
 weakReference = new WeakReference<>(activity);
 }
 @Override
 public void onFailed() {
 Log.d(TAG, "replay failed");
 Intent intent = new Intent(context, DefaultRouteActivity.class);
 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
 context.startActivity(intent);
 Activity activity = weakReference.get();
 if (activity!= null) {
 activity.finish();
 }
 }

 @Override
 public void onSuccess() {
 Log.d(TAG, "replay success");
 Activity activity = weakReference.get();
 if (activity!= null) {
 Log.d(TAG, "activity finish");
 activity.finish();
 }
 }
 }
}

        
This code block is shown in the floating window
Was this document helpful?

Copyright 2011-2026, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 Shenzhen Hexun Huagu Information Technology Co., Ltd.

Open in Docs Center