Search Unity

ForwardNativeEventsToDalvik and crash on some android devices

Discussion in 'Android' started by MajidKhosravi, Feb 11, 2014.

  1. MajidKhosravi

    MajidKhosravi

    Joined:
    Jun 21, 2013
    Posts:
    39
    As you may have noticed, in order to receive clicks on Ads such as Admob you may need to enable ForwardNativeEventsToDalvik option in the AndroidManifest.xml file, which apparently fixes that issue.

    ** BUT **

    After enabling this option in the AndroidManifest.xml:

    Code (csharp):
    1. <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    we have started to get lots of one star reviews, and after doing some research and online testing, it appears that with this option turned on, the game won't run on some Androids and it throws Application not responding error.

    You can produced this error on: Motorola Droid X (2.3.4) on appthwack online testing website.

    The project was built with Unity 4.3.4

    -------------
    ** Update
    -------------

    After further investigation, we have found out the problem was with Facebook SDK 4.x, by updating to 5.x the problem was solved.
     
    Last edited: Feb 11, 2014
  2. maxoja

    maxoja

    Joined:
    Aug 23, 2012
    Posts:
    4
    Can you please post your AndroidManifest.xml?

    I have problem in using admob plugin with facebook sdk.

    if I set ForwardNativeEventsToDalvik = true , I cannot login to facebook
    and when it's false the ads cannot be clicked, that is my problem

    Thank you very much :)