I am trying to set permissions to access the internet on my app but the permission manager won't let me do it. Therefore, I can't run web-view. The code below runs fine on Nougat. What is going on?
Here's is part of my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.droid_controls">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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=".WebViewActivity"
android:screenOrientation="landscape"></activity>
<activity
Here is the code to for the web-view:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
WebView browser = findViewById(R.id.webview);
browser.loadUrl("http://www.google.com");
}
and the html:
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
When I go to the app manager and try to change the permissions and tap on "Allowed" does not do anything. The strange part is the if I look at all permissions of the app, I see that matches my manifest. See the screenshots:
The permissions match the manifest.
Tapping on anything is goes no where, and web-view does not load the page. What is going on?
thank you.