'Black screen in url launcher flutter
When I pressed the url_launcher action button. And then app minimize it. And then again go back to the app, page will be black screen
Solution 1:[1]
If you are using android platform then make sure you have added these below lines in AndroidManifest.xml.
<queries>
<!-- If your app opens https URLs -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<!-- If your app makes calls -->
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel" />
</intent>
<!-- If your sends SMS messages -->
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="smsto" />
</intent>
<!-- If your app sends emails -->
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>
if you are using IOS platform make sure you have added these below lines in info.plist file-
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
</array>
And At frontend side
launch(url);//Pass URL inside this method.
Note: Done forget to add required permissions in your app. Like- Internet permission...etc.
Hope it will be helpful for you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Vishal_VE |