ReactInstanceManager.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:RNLearn_Project1 作者:
/**
 * This method will give JS the opportunity to receive intents via Linking.
 */
public void onNewIntent(Intent intent) {
  if (mCurrentReactContext == null) {
    FLog.w(ReactConstants.TAG, "Instance detached from instance manager");
  } else {
    String action = intent.getAction();
    Uri uri = intent.getData();

    if (Intent.ACTION_VIEW.equals(action) && uri != null) {
      DeviceEventManagerModule deviceEventManagerModule =
              Assertions.assertNotNull(mCurrentReactContext).getNativeModule(DeviceEventManagerModule.class);
      deviceEventManagerModule.emitNewIntentReceived(uri);
    }

    mCurrentReactContext.onNewIntent(mCurrentActivity, intent);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号