Hi,

Btwn I'm running the service in a different process. My
AndroidManifest.xml has

    <service android:name=".MyTestService" android:process=":remote">

But If I don't run service as different process, I don't get below
issue. Not sure if the service is getting destroyed.

Can someone point me to some sample code which runs service as
independent process. I mean the entire package including the src and
Androidmanifiest.xml.

Thanks,
Manoj

On Dec 12, 5:31 pm, mnj <[email protected]> wrote:
> 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