8000 Unity3D 5.3.4 java.lang.RuntimeException · Issue #3 · mobfox/SDK-Plugins · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unity3D 5.3.4 java.lang.RuntimeException #3
Open
@rchallenger

Description

@rchallenger

Project under Unity3D 5.3.4, which includes mobfox-android-unity-plugin.jar won't initialize MobFox by calling ConnectToPlugin() method as the following exception will be thrown.

AndroidJavaException: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

It happens while executing the following lines:

using (AndroidJavaClass pluginClass = new AndroidJavaClass ( "com.mobfox.unity.plugin.MobFoxPlugin" ))
{
	if (pluginClass != null)
	{
		mobFoxPlugin = pluginClass.CallStatic<AndroidJavaObject> ( "instance" ); //this line causes exception
		mobFoxPlugin.Call ( "setContext", activityContext );
	}
}

Exception is thrown as soon as getting instance is called.

If we upgrade project to Unity3D 5.4.0 - everything will be OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0