Home | History | Annotate | Download | only in components

Lines Matching full:your

38 different applications to access your service for IPC and want to handle multithreading in your
40 different applications, you should create your interface by <a
43 implement your interface <a
49 <p>Before you begin designing your AIDL interface, be aware that calls to an AIDL interface are
56 this is your main UI thread, that thread continues to execute in the AIDL interface. If it is
57 another thread, that is the one that executes your code in the service. Thus, if only local
64 your own process. You must be prepared for incoming calls from unknown threads, with multiple calls
78 <p>You must define your AIDL interface in an {@code .aidl} file using the Java
94 <p>The Android SDK tools generate an interface in the Java programming language, based on your
96 {@link android.os.Binder} and implements methods from your AIDL interface. You must extend the
101 android.app.Service#onBind onBind()} to return your implementation of the {@code Stub}
106 <p class="caution"><strong>Caution:</strong> Any changes that you make to your AIDL interface after
107 your first release must remain backward compatible in order to avoid breaking other applications
108 that use your service. That is, because your {@code .aidl} file must be copied to other applications
109 in order for them to access your service's interface, you must maintain support for the original
150 they are defined in the same package as your interface.</p>
152 <p>When defining your service interface, be aware that:</p>
187 <p>Simply save your {@code .aidl} file in your project's {@code src/} directory and when you
188 build your application, the SDK tools generate the {@link android.os.IBinder} interface file in your
195 build your application&mdash;you should build your project with <code>gradle assembleDebug</code>
197 so that your code can link against the generated class.</p>
202 <p>When you build your application, the Android SDK tools generate a {@code .java} interface file
203 named after your {@code .aidl} file. The generated interface includes a subclass named {@code Stub}
237 <p>There are a few rules you should be aware of when implementing your AIDL interface: </p>
240 about multithreading from the start and properly build your service to be thread-safe.</li>
251 <p>Once you've implemented the interface for your service, you need to expose it to
253 for your service, extend {@link android.app.Service Service} and implement {@link
254 android.app.Service#onBind onBind()} to return an instance of your class that implements
332 an IPC interface, you can do that. However, you must ensure that the code for your class is
333 available to the other side of the IPC channel and your class must support the {@link
341 <li>Make your class implement the {@link android.os.Parcelable} interface.</li>
344 <li>Add a static field called <code>CREATOR</code> to your class which is an object implementing
346 <li>Finally, create an {@code .aidl} file that declares your parcelable class (as shown for the
348 <p>If you are using a custom build process, do <em>not</em> add the {@code .aidl} file to your
353 your objects.</p>
422 information about how to keep your application secure from malware.</p>
436 Context.bindService()}, passing in your {@link
438 <li>In your implementation of {@link
443 <li>Call the methods that you defined on your interface. You should always trap
449 Context.unbindService()} with the instance of your interface. </li>