gpt4 book ai didi

I want to open an app inside another app with android intent plus(我想在另一个应用程序中打开一个具有android intent plus的应用程序)

转载 作者:bug小助手 更新时间:2023-10-22 16:56:50 27 4
gpt4 key购买 nike



I want to open an app inside another app with android intent plus but i get error.colud you help me
please?

我想在另一个android应用程序中打开一个应用程序,但我收到错误。你能帮我吗?


this is error:

这是错误:


Unhandled Exception: PlatformException(error, No Activity found to handle Intent { act=android.intent.action.VIEW dat=package: (has extras) }, null, android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=package: (has extras) }

Future<void> openMyApp() async {
if (const LocalPlatform().isAndroid) {
const AndroidIntent intent = AndroidIntent(
action: 'action_view',
data: 'package:com.example.super_app',
arguments: {'authAccount': "[email protected]"},
);
await intent.launch();
}
}

I used the function above but I got error.

我使用了上面的函数,但出现了错误。


更多回答
优秀答案推荐

base on your error, it says that it cant find an activity to handle the intent.

基于你的错误,它说它找不到一个活动来处理意图。


its case sensitive. try updating your code to this:

它区分大小写。尝试将您的代码更新为:


also i see that you made errors on package also update that.

我还看到你在包上犯了错误,也更新了那个。


Future<void> openMyApp() async {
if (const LocalPlatform().isAndroid) {
const AndroidIntent intent = AndroidIntent(
action: 'android.intent.action.VIEW',
package: 'com.example.super_app',
arguments: {'authAccount': "[email protected]"},
);
await intent.launch();
}
}

更多回答

thanks.this codes gets no error but it doesnt open the app.it opens a bottomsheet that suggests some apps to open the destination app.I want it to get open directly.is it possible?

谢谢。这个代码没有错误,但它不会打开应用程序。它打开了一个底部表单,建议一些应用程序打开目标应用程序。我想直接打开它。有可能吗?

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com