Example usage for com.facebook.react ReactInstanceManager onBackPressed

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

Introduction

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

Prototype

public void onBackPressed() 

Source Link

Document

This method will give JS the opportunity to consume the back button event.

Usage

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

License:Apache License

/**
 * {@link Activity} lifecycle method which should be called from
 * {@link Activity#onBackPressed} so we can do the required internal
 * processing.//ww  w.j  a  v  a2s .co  m
 *
 * @return {@code true} if the back-press was processed; {@code false},
 * otherwise. If {@code false}, the application should call the
 * {@code super}'s implementation.
 */
public static void onBackPressed() {
    ReactInstanceManager reactInstanceManager = ReactInstanceManagerHolder.getReactInstanceManager();

    if (reactInstanceManager != null) {
        reactInstanceManager.onBackPressed();
    }
}