【发布时间】:2016-09-06 14:34:03
【问题描述】:
我正在使用 intent 来启动我的 React-Native 应用程序,并且我正在尝试找出如何在 react native 代码中获取我的意图的变量。这可能来自 react-native 还是我必须编写一些 java 代码才能得到它?
我用来启动应用程序的代码:
Intent intent = new Intent(this, MainActivity.class);
Intent.putExtra("alarm",true);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
谢谢!
【问题讨论】:
-
在第二个活动中,
getIntent有什么问题? -
第二个活动是 react-native。所以我的问题是如何在 react-native 中获得 getIntent。
标签: android android-intent react-native