Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView issue in Android #23

Closed
binspaul opened this issue Aug 29, 2014 · 3 comments
Closed

WebView issue in Android #23

binspaul opened this issue Aug 29, 2014 · 3 comments

Comments

@binspaul
Copy link

Hi,

I was not able to open an url using the plugiin n Android. I used the 'sample' project that was available with the source. I imported the 'unity-webview' package available in the 'dist' folder. I added a section to detect if the runtime is Android and open the url.

The url was set to: http://www.google.com

Thanks,
BP

@Esildor
Copy link

Esildor commented Sep 16, 2014

Hi I'm in the process of trying to figure this out as well. noticed that google.com defualts too HTTPS, which non of those sites work with this, so that could be causing your problems. Unless there is a fix i don't know about. Please post it if yo know it, because i think i'll need HTTPS, also, in players settings set:
Internet Access: to - Require
(i think this adds the permission to the android manifest)

@gsssrao
Copy link

gsssrao commented Jul 10, 2015

You need to add permission for internet in manifest. Add this to Plugins/Android/
Create the following manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    android:installLocation="preferExternal"
    android:versionCode="1"
    android:versionName="1.0">
    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:debuggable="true">
        <activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.unity3d.player.VideoPlayer"
                  android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
        </activity>
    </application>
</manifest>

@KojiNakamaru
Copy link
Member

Though you still need to prepare AndroidManifest.xml for performance (cf. https://github.com/gree/unity-webview/tree/770f34b6b5253bfa2e25fb651e72c62834ebe03c#android ), the latest version should work without troubles. If you need any assistance further, please reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants