plus_plugins
plus_plugins copied to clipboard
[Question]: Can not open URL with format "intent://payment..."
While I can open the URL directly from my phone's browser, I can't in the Flutter app.
Sorry because my English is not good.
My code:
const url =
'intent://payment?link_key=xxx';
final AndroidIntent intent = AndroidIntent(
action: 'action_main',
data: url,
);
await intent.launch();
Error:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=action_main dat=intent://payment/... (has extras) }
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2174)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Activity.startActivityForResult(Activity.java:5596)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Activity.startActivityForResult(Activity.java:5554)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Activity.startActivity(Activity.java:6052)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.Activity.startActivity(Activity.java:6019)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at dev.fluttercommunity.plus.androidintent.IntentSender.send(IntentSender.java:55)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at dev.fluttercommunity.plus.androidintent.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:101)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.os.Looper.loopOnce(Looper.java:226)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.os.Looper.loop(Looper.java:313)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at android.app.ActivityThread.main(ActivityThread.java:8762)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
E/MethodChannel#dev.fluttercommunity.plus/android_intent(16582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Thank you!
Checklist before submitting a question
- [X] I searched issues in this repository and couldn't find such bug/problem
- [X] I Google'd a solution and I couldn't find it
- [X] I searched on StackOverflow for a solution and I couldn't find it
- [X] I read the README.md file of the plugin
- [X] I am using the latest version of the plugin
- [X] All dependencies are up to date with
flutter pub upgrade - [X] I did a
flutter clean - [X] I tried running the example project
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days