简体   繁体   中英

Flutter app using url_launcher…do I need to add the INTERNET permission for Android?

I have created a Flutter app that contains some simple links to emails (mailto:) and external web sites using the url_launcher package.

Do I need to include the android.permission.INTERNET permission for this to work on Android devices?

I have tested on emulators with no issue without the permission but not sure if this would apply to real devices.

Debug mode usually doesn't require any permissions to be added explicitly. But if you will browse through your project files you will be able to see that there are seperate android manifests for debug and release mode of your app. In release mode, you have to add every permission you will be needing explicitly. So yes you have to add Internet permission for packages like url_launcher, google_fonts etc to run in release mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM