Android Question Callback Request

stu14t

Active Member
Licensed User
I'm trying to handle a callback request from the Parse login and I've followed examples as best I can.

The code I use is as follows:

B4X:
'Use the JavaObject to access the ParseUser & LoginCallback
    PL.InitializeStatic("com.parse.ParseUser")
    jo.InitializeStatic("com.parse.LogInCallback")
   
    'Run the Login Static method
    Dim callback As Object = jo.CreateEvent("com.parse.LogInCallback", "done", Null)
    Result = PL.RunMethod("logInInBackground" , Array As Object (UserName,Password,callback))
However, I get this error in the logs:
B4X:
** Activity (main) Pause, UserClosed = false **
WakeLock already held.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Error occurred on line: 83 (Main)
java.lang.IllegalArgumentException: class com.parse.LogInCallback is not an interface
    at java.lang.reflect.Proxy.getProxyClass(Proxy.java:147)
    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:232)
    at anywheresoftware.b4j.object.JavaObject.createEvent(JavaObject.java:252)
    at anywheresoftware.b4j.object.JavaObject.CreateEvent(JavaObject.java:214)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
    at android.view.View.performClick(View.java:5197)
    at android.view.View$PerformClick.run(View.java:20926)
I'm confused, as in the Parse documentation as LogInCallback is an interface SEE HERE

What am I doing wrong?
 
Top