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

what is problem? #29

Closed
darkofmarin opened this issue Feb 25, 2014 · 10 comments
Closed

what is problem? #29

darkofmarin opened this issue Feb 25, 2014 · 10 comments
Labels

Comments

@darkofmarin
Copy link

what is problem?

android build and run and error

if (!Social.localUser.authenticated) {
// Authenticate
Social.localUser.Authenticate((bool success) => {
Debug.Log(success ? "Successfully authenticated" : "Authentication failed.");
} );
}

02-27 22:16:11.131: I/Unity(6153): Exception: No such proxy method: UnityEngine.AndroidJavaRunnableProxy.run()
02-27 22:16:11.131: I/Unity(6153): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in :0
02-27 22:16:11.131: I/Unity(6153): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs) [0x00000] in :0
02-27 22:16:11.131: I/Unity(6153): at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs) [0x00000] in :0
02-27 22:16:11.131: I/Unity(6153):
02-27 22:16:11.131: I/Unity(6153): (Filename: Line: -1)
02-27 22:16:11.131: I/Unity(6153): Exception: No such proxy method: UnityEngine.AndroidJavaRunnableProxy.run()
02-27 22:16:11.131: I/Unity(6153): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in :0
02-27 22:16:11.131: I/Unity(6153): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs) [0x00000] in :0
02-27 22:16:11.131: I/Unity(6153): at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs) [0x00000] in :0

@Gjjansen
Copy link

Hello,

Are you using Java or C#?

If you're using Java, you have to call it this way:

function Start() {
Social.localUser.Authenticate(authUser);
}

function authUser(success : boolean) {
if(success) {
Debug.Log("Authentication succeeded!");
} else {
Debug.Log("Authentication failed!");
}
}
Kind regards,
Gjjansen

@darkofmarin
Copy link
Author

Thank you answer

but not solved

May be setting problem. I try to setting change.

I still not solve..

@jdebono
Copy link

jdebono commented Mar 19, 2014

I have the same Problem.
Looks like "activity.Call("runOnUiThread", new AndroidJavaRunnable(action));" is not running.
In my Project, the main Activity is extending UnityPlayerActivity

@btco btco added the question label Mar 19, 2014
@btco
Copy link

btco commented Mar 19, 2014

Just so we can rule out other stuff, does this happen when you build and run the Minimal sample?

@jdebono
Copy link

jdebono commented Mar 20, 2014

Minimal Sample works fine as it is. Will try to extend the Main Activity and see it the same problem occurs.

@jdebono
Copy link

jdebono commented Mar 20, 2014

I checked by adding an other plugin that extends the Main Activity in the Minimal Sample and it still worked fine.
The problem is the "activity.Call("runOnUiThread", new AndroidJavaRunnable(action));" is not running in my Project.
As a workaround I made a function in my plugin that creates and return GameHelper which is runOnUiThread from Java.

@KamiKaze425
Copy link

Do you think you can post your solution? I'm hitting this too, probably because the Facebook Unity plugin overwrites the main activity

@jdebono
Copy link

jdebono commented Mar 27, 2014

What I did I modified GameHelper.
Line 170
public GameHelper(final Activity activity, final int clientsToUse) {

    activity.runOnUiThread(new Runnable() {         
        @Override
        public void run() {
            mActivity = activity;
            mAppContext = activity.getApplicationContext();
            mRequestedClients = clientsToUse;
            mHandler = new Handler();
        }
    });
}

And in C# I stopped calling the runOnUiThread.

But I'm facing a problem with the background of the activity. When I call the sign in process I'm getting a black background.

@jhocking
Copy link

I encountered this same error and eventually figured out the solution is in this thread (more details there) #88

@claywilkinson
Copy link

closing because it is so old.

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

No branches or pull requests

7 participants