Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Remote Services
    primarykey
    data
    text
    <p>I was looking at the commonwares example on remote android services. I keep getting this errors in logcat</p> <pre><code>10-22 19:50:33.947: E/AndroidRuntime(30624): FATAL EXCEPTION: main 10-22 19:50:33.947: E/AndroidRuntime(30624): java.lang.SecurityException: Binder invocation to an incorrect interface 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.os.Parcel.readException(Parcel.java:1322) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.os.Parcel.readException(Parcel.java:1276) 10-22 19:50:33.947: E/AndroidRuntime(30624): at com.commonsware.android.advservice.client.IScript$Stub$Proxy.executeScript(IScript.java:82) 10-22 19:50:33.947: E/AndroidRuntime(30624): at com.commonsware.android.advservice.client.RemoteClientNewActivity$2.onClick(RemoteClientNewActivity.java:59) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.view.View.performClick(View.java:2532) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.view.View$PerformClick.run(View.java:9277) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.os.Handler.handleCallback(Handler.java:587) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.os.Handler.dispatchMessage(Handler.java:92) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.os.Looper.loop(Looper.java:143) 10-22 19:50:33.947: E/AndroidRuntime(30624): at android.app.ActivityThread.main(ActivityThread.java:4196) 10-22 19:50:33.947: E/AndroidRuntime(30624): at java.lang.reflect.Method.invokeNative(Native Method) 10-22 19:50:33.947: E/AndroidRuntime(30624): at java.lang.reflect.Method.invoke(Method.java:507) 10-22 19:50:33.947: E/AndroidRuntime(30624): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) </code></pre> <p>I have been trying to resolve it for a while now.</p> <p>In the activity this is what I do</p> <pre><code>Intent i = new Intent("com.commonsware.android.advservice.IScript"); bindService(i,svcConn, Context.BIND_AUTO_CREATE); </code></pre> <p>and </p> <pre><code>public void onServiceConnected(ComponentName className,IBinder binder) { service=IScript.Stub.asInterface(binder); if(service !=null){ message = "connected"; } } </code></pre> <p>Please can anyone tell me what I am doing wrong.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload