Hi,

I'm trying to connect to a service from an Activity. I wrote an AIDL
file with functions that will be implemented in the Service. The
function onServiceConnected() is getting called.


private ServiceConnection mConnection = new ServiceConnection()
    {
               public void onServiceConnected(ComponentName className,
IBinder service) {
                        mpInterface = 
MytestInterface.Stub.asInterface((IBinder)service);
                        mpInterface.clearPlaylist(); ---> its breaks here (1)
                                                ........
               }
    }

Now when I try to step through the function clearPlayList(), it first
goes to the MytestInterface.java file which was auto-generated by
eclipse

public void clearPlaylist() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_clearPlaylist, _data, _reply, 0); ---
> Control comes here (2)
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}

Now the actual implementation of this function is in Service class.
But the breakpoint never comes to this function.
Instead the control goes back to onServiceConnected() function.

Service class
=========
private final MytestInterface.Stub mBinder = new MytestInterface.Stub
() {

public void clearPlaylist() {
                        songs.clear();
                }
}

What could be the issue. Is there any error happening in
mRemote.transact() function.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to