Example usage for com.facebook.react ReactInstanceManager onHostResume

List of usage examples for com.facebook.react ReactInstanceManager onHostResume

Introduction

In this page you can find the example usage for com.facebook.react ReactInstanceManager onHostResume.

Prototype

@ThreadConfined(UI)
public void onHostResume(Activity activity, DefaultHardwareBackBtnHandler defaultBackButtonImpl) 

Source Link

Document

Use this method when the activity resumes to enable invoking the back button directly from JS.

Usage

From source file:org.jitsi.meet.sdk.JitsiMeetActivityDelegate.java

License:Apache License

/**
 * {@link Activity} lifecycle method which should be called from
 * {@code Activity#onResume} so we can do the required internal processing.
 *
 * @param activity {@code Activity} being resumed.
 *//*from   ww  w .ja  v  a  2s .c  o m*/
public static void onHostResume(Activity activity) {
    ReactInstanceManager reactInstanceManager = ReactInstanceManagerHolder.getReactInstanceManager();

    if (reactInstanceManager != null) {
        reactInstanceManager.onHostResume(activity, new DefaultHardwareBackBtnHandlerImpl(activity));
    }

    if (permissionsCallback != null) {
        permissionsCallback.invoke();
        permissionsCallback = null;
    }
}