use of com.facebook.react.bridge.LifecycleEventListener in project maps by rnmapbox.
the class RCTMGLMapView method setLifecycleListeners.
private void setLifecycleListeners() {
final ReactContext reactContext = (ReactContext) mContext;
mLifeCycleListener = new LifecycleEventListener() {
@Override
public void onHostResume() {
onResume();
}
@Override
public void onHostPause() {
onPause();
}
@Override
public void onHostDestroy() {
dispose();
}
};
reactContext.addLifecycleEventListener(mLifeCycleListener);
}
Aggregations