I'm trying to request internet permission in my android app on my android phone using SDK 26. I've tried using the AndroidManifest.xml, I've tried using ActivityCompat.requestPermissions(this, new String[]{ Manifest.permission.INTERNET }, 1); and I've tried different request codes. I've tried this in onCreate and inside a button press event, but still no permissions show up when I go into the App Info.
I'm totally lost as I don't see any reason why this won't work. any Ideas? common problems that I don't know of yet?
andoidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.simplevents"> <uses-permission android:name="android.permission.INTERNET"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
AndroidManifest.xml?