Why with wifi I can connect but not with my mobile data - flutter

Hello I have a problem this morning that I did not meet. with wifi I can connect with the application but not with my mobile data. Can anyone help me? Here is the content of
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:label="FACTURA"
android:name="${applicationName}"
android:icon="#mipmap/ic_launcher">
<activity

Starting with Android API 28 and iOS 9, these platforms disable insecure HTTP connections by default.
You can use this code:
Add network-policy at your meta-data in AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
....
<meta-data android:name="io.flutter.network-policy"
android:resource="#xml/network_security_config"/>
Allowing cleartext connection for debug builds:
Look at: $project_path\android\app\src\debug\AndroidManifest.xml:
<application android:usesCleartextTraffic="true"/>
You can see this documentation:
https://docs.flutter.dev/release/breaking-changes/network-policy-ios-android

Related

I am having issues uploading my app to Google playstore

I have been trying to upload my flutter app to playstore, but it got rejected, I got an email like this below
This is how my pubspec.yaml file look like
my Androidmanifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I was thinking maybe the permission_handler is the cause of the rejection,
but based on my research online, I believe it suppose to go through since I added this
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
I think you misunderstood the Google Playstore message.
They are telling you that your app shouldn't use this permission:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
So you have two options:
Either Remove this permission request from your app or
argue with the Google Playstore support about why your app really needs this permission. They list a few allowed cases (web browsing as a core functionality for example)

(Flutter) Google Play Console: Issue found: Need to use Media Store API or No Access to Files

I am trying to publish my app on the Google Play Console. They are refusing it because it seems they don't like the permissions I gave to my app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.basketball.cleanmaybe">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
I found how to ask permission to the camera app but not to the gallery. Can someone tell me how can I resolve this?
This is what I got in my mail:

java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission

After asking for runtime permission for BLUETOOTH_CONNECT, android 12 crashes , I faced this problem in Samsung Android 12 Device. In other device less then Android 12 is working fine.
I handled bluetooth permission but still my app going to crash
manifest
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
sdk -> 31
Showing this type of error after build the app.
I got the solution.
As you can see the BLUETOOTH permission is disabled in Android 12. This issue resolved if I add the maxSdkVersion for the BLUETOOTH permission.
So I update permissions in manifest file :
Old This:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
to
new this:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" android:maxSdkVersion="30" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" android:required="false" />

Flutter : google map dont show

I have flutter app using google map, I created project and api key in google cloud,and enabled for both Andriod and iOS.
I add these permisions to AndroidManifest.xml :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
also ad Api Key to AndroidManifest.xml:
<application
android:label="xxxx"
android:icon="#mipmap/launcher_icon">
<activity
.............
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
then I used getlocator package to get location in provider for showing the map :
GoogleMap(
mapType: MapType.normal,
initialCameraPosition: CameraPosition(
target: LatLng(authProvider.latitudePosition,
authProvider.longitudePosition),
zoom: 14))
nothing to show on emulator (the emulator using google play) also I get this :
updateAcquireFence: Did not find frame.

Is it possible in Google Play why an App is not compatible with a device?

Within the AndroidManifest.xml I can see the following lines:
<uses-sdk android:minSdkVersion="16" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
So I guess the compatibility issue is due to some of the followings:
minSdkVersion
accelerometer
gyroscope
Is it possible to know which one/s is the compatibility issue within Google Play. Should we check one by one "manually"?
According with the answer of Google, it seems that nowadays we have to check it manually as I have stated in the question.
The answer of Google was: "If you'd like to know why specific device is not compatible with the app, you'll need to check if all the features you requested in the APK are supported by the device. Also you'll need to check the Android version"