Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity 4.3 not forwarding events to delvik

Discussion in 'Android' started by refaelos, Nov 13, 2013.

  1. refaelos

    refaelos

    Joined:
    Nov 19, 2012
    Posts:
    7
    I have a webview on top of the main Unity Activity. Until Unity 4.2.2 the webview received touch events and everything worked fine. On unity 4.3 i can't do anything on the webview (touch events don't work)

    Note: I'm adding this to 'com.unity3d.player.UnityPlayerNativeActivity' in AndroidManifest.xml:
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

    Ideas?
     
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    524
    What does your AndroidManifest.xml look like? You may need to sync your manifest with the manifest in Unity 4.3. Try removing the proxy and the non-native activity.
     
  3. vARDAmir

    vARDAmir

    Joined:
    Jun 30, 2013
    Posts:
    38
    i have almost the same problem. ads are not clickable in unity 4.3
    here is 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="6"
    android:versionName="1.01b">
    <supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true"/>

    <application
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:debuggable="true">
    <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
    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.UnityPlayerActivity"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <meta-data android:name="android.app.lib_name" android:value="unity" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    </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>
    <activity android:name="com.google.ads.AdActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    </application>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    </manifest>

    i tried to remove non-native activity but nothing happened. and without proxy i cant launch game at all.
     
  4. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    524
    move

    Code (csharp):
    1. <intent-filter>
    2. <action android:name="android.intent.action.MAIN" />
    3. <category android:name="android.intent.category.LAUNCHER" />
    4. </intent-filter>
    To the native activity and delete the non-native activity and the proxy activity.
     
  5. crystick

    crystick

    Joined:
    Dec 20, 2013
    Posts:
    1
    Bitter your answer worked for me, but why? I would like to understand what changed and why this change was needed. What happened to the proxy activity and non-native activity?
     
  6. ArnB

    ArnB

    Joined:
    Jul 16, 2013
    Posts:
    14
    Alternatively you can add:
    <meta-data android:name="unityplayer.ForwardNativeEventsToDal vik" android:value="true" />
    to the proxy activity ;)
     
  7. Farrell

    Farrell

    Joined:
    Jun 18, 2013
    Posts:
    8
    Oh man. This was just what I needed. Thank you
     
  8. schchang1

    schchang1

    Joined:
    Sep 12, 2012
    Posts:
    8
    I have the same problem with my Burstly ad. My ad is not clickable after upgrade to Unity 4.3 (currently 4.3.4)

    The manifest update

    <meta-data android:name="unityplayer.ForwardNativeEventsToDal vik" android:value="true" />

    Fix the ad view not clickable bug but now the app is receiving the click event under the ad too.(Click through)
    Are the view focus got messed up in Unity 4.3? Is there any way I can fix the click through bug?
     
  9. Frank Nguyen

    Frank Nguyen

    Joined:
    Mar 3, 2014
    Posts:
    4
    I got the same problem. Who can help me? :(