我正在尝试让android设备上的应用程序与我的react原生应用程序共享。然而,我找不到任何可以帮助我的文档,所以我想知道是否有任何方法可以将其他应用程序的内容共享到我的应用程序中?
澄清:

我正在尝试将我的应用程序添加到此列表中
发布于 2018-02-15 06:04:10
您需要允许其他应用程序启动您的活动。reference here.
<intent-filter android:label="Share here!">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>正如你可能注意到的,这个巫术将在分享列表中显示你的应用程序。
为了处理负担,在您的组件中放置下一个代码段。任何组件。
componentDidMount() {
Linking.getInitialURL().then((url) => {
console.log('Initial url is: ' + url);
}).catch(err => console.error('An error occurred', err));
}这种魅力被称为Linking。文档已找到here
https://stackoverflow.com/questions/46734515
复制相似问题