Ad
Flutter Problem Dynamic Link Opens The App Inside Whatsapp
When the link is opened via whatsapp, an instance of the app is opened inside whatsapp, if the app is later opened by the launcher. 2 instances of the same app are open, one by whatsapp the other by the app itself.
Steps to reproduce Steps to reproduce the behavior:
1 - Generate the link and send it to whatsapp. 2 - Click the link on whatsapp
Expected behavior It is expected that after the click, the app will be opened outside of whatsapp
FirebaseDynamicLinks.instance.getInitialLink().then((value){
if (value != null){
if (value.link.queryParameters["challenge_id"] != null){
DesafioModel desafioModel = DesafioModel();
desafioModel.id = value.link.queryParameters["challenge_id"];
Get.offNamed("$CHALLENGE_DETAILS_ROUTE", arguments: desafioModel);
}
}
});
Ad
Answer
For others who need it, as Jiten Basnet noted in the comments, the solution is to add
android:launchMode="singleTask"
inside activity in AndroidManifest.xml
.
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad