avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
563 stars 303 forks source link

Use uni_links for opening other pages in the same app #137

Open yasaman93 opened 3 years ago

yasaman93 commented 3 years ago

We have some webview pages in our application which contains some links. We want to move user to another pages from our application from clicking on those links. I'm using uni_links for this purpose, but unfortunately our app crashes when I click on the links and I've got this error:

E/flutter ( 6441): [ERROR:flutter/fml/platform/android/jni_util.cc(182)] java.lang.IllegalStateException: The overlay surface (id:0) doesn't exist

E/flutter ( 6441): at io.flutter.plugin.platform.PlatformViewsController.onDisplayOverlaySurface(PlatformViewsController.java:821)

E/flutter ( 6441): at io.flutter.embedding.engine.FlutterJNI.onDisplayOverlaySurface(FlutterJNI.java:1010)

E/flutter ( 6441): at android.os.MessageQueue.nativePollOnce(Native Method)

E/flutter ( 6441): at android.os.MessageQueue.next(MessageQueue.java:325)

E/flutter ( 6441): at android.os.Looper.loop(Looper.java:142)

E/flutter ( 6441): at android.app.ActivityThread.main(ActivityThread.java:6541)

E/flutter ( 6441): at java.lang.reflect.Method.invoke(Native Method)

E/flutter ( 6441): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)

E/flutter ( 6441): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

I try to call those links from the other applications and there was no problem. But when I want to open another page of our application from a webview in our application, the app crashes.

egeysn commented 3 years ago

Check this solved my issue . https://github.com/avioli/uni_links/issues/119