A flutter app uses, Deep links locally hosted without using firebase or any plugins, Firebase cloud notifications and logging API headers responses and Firebase notifications in debug mode only.
Release apk and debug apk will be found at: APKs link
- "/" => Splash Screen
- "/homeScreen" => Home Screen
- "/movieDetailsScreen/:movieId" => Movie Details Screen
- Screens overview:
So the best solution is to implment deep links locally on the device using ADB (Android Debug Bridge) using any local domain (http://kerollos.com).
- "http://kerollos.com/homeScreen" => Runs home screen
- "http://kerollos.com/movieDetailsScreen/:movieId" => Runs movie details screen to show the data for movie with id (:moviedId)
For sure if tryed to launch the app from any browser on the device it will not open because 'http://kerollos.com' is a local host (dummy url), so the best solution to test if deep links works or no, I will call ADB and give it the local host 'http://kerollos.com' and my app package name 'com.kerollos.appgain_task_movies' like below:
- Download and run the project using VS code (or Android Studio) and in the terminal type below line and press enter:
adb shell 'am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://kerollos.com/homeScreen' com.kerollos.appgain_task_movies
- And Home Screen will opens.
- Now lets open /movieDetailsScreen/594767 to show the details of a movie called Shazam! Fury of the Gods:
- Now let's try again to open /movieDetailsScreen/33562 which is a movie not found in data base (or if user tried to open any other screen not supported by the app) that what will be showen:
Just un comment below line in 'AndroidManifest.xml':
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
Both API headers responses and opened deep links will be logged in debug mode like below:
Implemented both in Background as well as in Foreground notifications: