我使用世博会意图启动打开电子邮件应用程序在 Android 设备(打开邮件只 / 不撰写电子邮件)
https://docs.expo.dev/versions/v43.0.0/sdk/intent-launcher/并且使用 expo-intent-launcher 版本〜 9.1.0 可以正常工作,但是将 expo-intent-launcher 升级到版本〜 10.0.3 后,它不再工作。因为参数已更改。
升级前
expo-intent-launcher 版本~9.1.0
升级后
expo-intent-launcher 版本~10.0.3
这是预定义的常量:
ActivityAction:https://github.com/expo/expo/blob/main/packages/expo-intent-launcher/src/IntentLauncher.ts
I got confused how to put this 'android.intent.action.MAIN'
to the parameter because it's not listed in the enums and it doesn't accept string.
如何修复我的代码,以便它将在较新的版本中工作?
expo-intent-launcher 版本~10.0.3
任何帮助将不胜感激,谢谢。
其实我自己找到解决方案。
我使用的是Expo SDK 43
,当升级到Expo SDK 45
时,expo-intent-launcher 也升级到版本~10.2.0
,
在该版本中,activityAction
参数现在接受字符串,而不仅仅是 Enums。
所以解决方案只是升级到Expo SDK 45
。
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(13条)