skip to Main Content

This is proving very difficult for me to debug. On Android, a FlutterFire deep link opens the App, but there are no URL data in the link. On iOS it is fine.

Debugging this isn’t easy. I can run the App on the Emulator from VSCode, but to debug from terminated states I need to swipe the App up, but as soon as I do this I lose the debug connection.

Is it possible to reattach the debugger to the Android App after termination using VSCode?

And secondly,

Are there any command-line arguments that would pass the deep link on the initial run in the same way that it would get it from a terminated state?

I tried -d, but that doesn’t work at all.
I’ve hunted high and low for examples but come up with nothing.

Any pointers would be hugely appreciated.

2

Answers


  1. Run the app in release mode so you can also run it when it is in closed state. use this command: flutter run –release

    Login or Signup to reply.
  2. If I understand your question correctly, you just need some command to start app with deeplink.

    If you are using Android for testing you can use adb shell command to launch the deep-link in your app.

    adb shell am start -d your-deep-link

    So if you deeplink is "app://profile" then you can use

    adb shell am start -d app://profile

    For iOS you can try this command:

    xcrun simctl openurl booted app://profile

    Additionally you can try to open the same url in browser. This sometime opens up the page if the browser’s web url area don’t work as search bar. Like if you type the url in chrome it will open google instead of opening the url.
    But if your deeplink starts with http or https this might also work using browser.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search