Flutter app doesn't have internet permission in APK file - flutter

My APK build file in flutter doesn't have internet permission.
I already did this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.Supplier_app">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

This is a very general issue faced by flutter beginners.
In android, each required permission is specified in AndroidManifest.xml file.
For native coding there is only one file inside app/src/main. For flutter, there are not one but 3 of these.
app/src/debug/AndroidManifest.xml - for debug mode
app/src/main/AndroidManifest.xml- for app distribution in release mode
app/src/profile/AndroidManifest.xml - for running app in profile mode
The internet permission is provided by default in the debug mode. So, internet works without doing anything.
All the permissions required for app distribution must be specified in app/src/main/AndroidManifest.xml. For testing purpose, the permissions are specified in other files mentioned.

Please check the mode of the app in which you have permission. It should be in main/AndroidManifest.

You are probably trying to edit the AndroidManifest.xml that is located inside the "debug" directory. The AndroidManifest.xml you are looking for is located in the app\src\main path.

Related

My flutter app contains with some API calls. After building APK, it's says null value

I have made an app that fetches some data by API.
In my emulator, the app fetches data perfectly and shows the data correctly too.
But whenever I build an APK and install it on my phone the data doesn't show up.
Why is it happening? In the emulator, it's works.
For fetching data, I used future builder
Add:
<uses-permission android:name="android.permission.INTERNET" />
your AndroidManifest.xml
As flutter docs say on reviewing the app manifest you should locate your AndroidManifest.xml file located in [project]/android/app/src/main.
Then inside manifest tag insert Android permission element as
<uses-permission android:name="android.permission.INTERNET"/>
The code above follows the syntax mentioned here.
According to flutter docs:
The standard template does not include this tag but allows Internet access during development to enable communication between Flutter tools and a running app.

Flutter login and registration not working on apk

Login and Registration aren't working on the apk that we build, but it works on the emulator, and it works when it's connected with a cable to a real phone.
Any ideas?
We haven't changed anything considering login.(controllers, service, ect.) and we are using android phones
We are also using GetX if that matters.
Is it some android permission or something?
You might forget the internet permission in Android Manifest.
in your AndroidManifest.xml file, add the below line inside <manifest></manifest>
<uses-permission android:name="android.permission.INTERNET"/>

API data no displayed in release mode but working in debug mode flutter

My API GET request gives me List of images and text which is displayed in debug mode emulator and real device too with data cable but when I build apk and install it I do not get the data. Also my app is already in play store and this is new feature I am working on. Anyone could help me with that? I am using path_provider and path packages too.
You have to provide internet permission inside android manifest file as right now you have in debug mode.
Mainfest file path : <project>/android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />

Flutter Location Package is Not Working in App Release Mode

Flutter App is working fine with Location Package in Debug Mode but it is not working in Release Mode, the app is not giving location access. i tried to use Flutter Clean Command but nothing Helped. Pls Help me
If your problem is that the flutter build (APK, bundle) isn't making API calls in a real device, this is because you need to add the Internet permission to Android Manifest before creating the release/build.
By default, "internet use" will work fine on the emulator but not on a real device.
To fix this, simply:
Open the file "android/app/src/main/AndroidManifest.xml" and add the proper user-permission
<manifest>
...
<uses-permission android:name="android.permission.INTERNET"/>
...
</manifest>
And then create your build again.
Also there is discussion on github , you can visit their and clearify your problem more effectively Github.

Flutter app working when building release-APK but not when provided via Google Play Store

We have an app connected to the internet.
Building a release APK is working and the app is connected to the internet.
Building a App Bundle, uploading it in the Google Play store and
installing it via Google Play the app is running but gets no connection to the internet.
downloading the apk via the App Bundle Explorer in the Google Play Console the app is running but gets no connection to the internet.
I also see the android.permission.INTERNET is set...
What can be the problem in my case?
<application android:label="APP_NAME" android:usesCleartextTraffic="true" //Add This>
</application>
<uses-permission android:name="android.permission.INTERNET"/> //Add This
Few Options I can think of:-
1. Build the apk from aab you uploaded on play. (test its behaviour)
2. Check that the flavor you are building, it doesn’t override settings, by having its own manifest.
3. Test on different devices.
4. See if there are any certificates installed.
5. Reverse Engineering (Last Option)
I found out the problem is not about the connection to the internet itself - the problem seems to be inside the flutter_secure_storage - but only when deployed in Google Play Store...
After updating flutter_secure_storage to the latest version the problem was gone.
10/2022
Hi guys, I faced with this error and the real problem came from flutter_secure_storage and shared_preferences. You guys need to add:
android:allowBackup="false" android:fullBackupContent="false"
to Androidmanifest.xml like this issues!
There is a manifest file in this directory
android/app/src/debug/AndroidManifest.xml
Copy the internet permission from above directory and to add the internet permission in this directory
android/app/src/main/AndroidManifest.xml