Hi,

Thanks. I realised my mistake. I understood the concept when I run my
service in a new process.

Regards,
Raji.

On Jul 16, 1:05 pm, Dianne Hackborn <hack...@android.com> wrote:
> All of that code is used for IPC marshalling and unmarshalling.  If you are
> never going to use the interface across processes, there is little reason to
> use aidl in the first place.
>
>
>
>
>
> On Wed, Jul 15, 2009 at 11:10 PM, krr_android <k.rajire...@gmail.com> wrote:
>
> > Hi
>
> > This is my aidl file.
> > ----------------------------IRemoteCounterServiceCallback.aidl
> > ----------------------------
> > package com.training;
>
> > import com.training.IRemoteCounterServiceCallback;
> > import com.training.myCounter;
>
> > interface IRemoteCounterService {
> >  // Remote service interfaces
> >  int StartCounters(in myCounter counter);
>
> >  void registerCallback(IRemoteCounterServiceCallback cb);
> >  void unregisterCallback(IRemoteCounterServiceCallback cb);
> > }
>
> > ---------------------------------------------------------------------------­----------------
>
> > The aidl generates
>
> > public static abstract class Stub extends android.os.Binder implements
> > com.training.IRemoteCounterService
> > {
>
> > }
>
> > containing an inner class
>
> > public static abstract class Stub extends android.os.Binder implements
> > com.training.IRemoteCounterService
> > {
>
> > }
>
> > here the abstract class Stub contains:
> > 1. Impl for public boolean onTransact(int code, android.os.Parcel
> > data, android.os.Parcel reply, int flags) throws
> > android.os.RemoteException
> > (this is never invoked)
>
> > 2. an inner class, private static class Proxy implements
> > com.training.IRemoteCounterService, which implemeted the following the
> > methods which are never invoked whent the program is run:
> >              a. public int StartCounters(com.training.myCounter
> > counter) throws android.os.RemoteException
>
> >              b. public void registerCallback
> > (com.training.IRemoteCounterServiceCallback cb) throws
> > android.os.RemoteException
> >              c. public void unregisterCallback
> > (com.training.IRemoteCounterServiceCallback cb) throws
> > android.os.RemoteException
>
> > My Application runs fine even if I remove the above mentioned unused
> > code from Stub class.
>
> > Now the Stub has just 3 methods,
>
> > public abstract class Stub extends android.os.Binder implements
> > IRemoteCounterService
> > {
> >        public Stub()
> >        {
> >                this.attachInterface(this, DESCRIPTOR);
> >        }
> >        public static IRemoteCounterService asInterface(android.os.IBinder
> > obj)
> >        {
> >                if ((obj==null)) {
> >                        return null;
> >                }
> >                android.os.IInterface iin = (android.os.IInterface)
> > obj.queryLocalInterface(DESCRIPTOR);
> >                if (((iin!=null)&&(iin instanceof
> > com.training.IRemoteCounterService))) {
> >                        return ((com.training.IRemoteCounterService)iin);
> >                }
> >                return null;
> >        }
> >        public android.os.IBinder asBinder()
> >        {
> >                return this;
> >        }
> > }
>
> > Why does the aidl generate code for
>
> > 1. onTransact() inside Stub class??
> > 2. inner class Proxy ??
>
> > Pls clarify. Thansk in advance.
>
> > Regards,
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to