im writing a simple app that want to connect to a specific WiFi Network on Android 10. I gave all permissions that I thought I might need in the manifest.xml.
<uses-permission-sdk-23 android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission-sdk-23 android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission-sdk-23 android:name="android.permission.INTERNET"/>
<uses-permission-sdk-23 android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission-sdk-23 android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission-sdk-23 android:name="android.permission.CONNECTIVITY_INTERNAL" />
<uses-permission-sdk-23 android:name="android.permission.MAINLINE_NETWORK_STACK" />
But when I use the fuction "connectivitymanager.requestNetwork" I get the Error:
java.lang.SecurityException: Requires one of the following permissions: android.permission.CONNECTIVITY_INTERNAL, android.permission.MAINLINE_NETWORK_STACK.
In the code where I want to request permissions this two permissions are not defined and not available for a request.
Anyone knows about this Permissions or the cause of the error?
Jürgen