Binder has an asynchronous mode which is appropriate for server to client communications. You'll find samples of this in the media and camera service where a native process sends an asynchronous message to a Java client.
On Dec 7, 6:57 pm, Jarod LIU <[EMAIL PROTECTED]> wrote: > Thanks a lot for response, Hackborn. > > My case is that a native process have to send some messages to a java > runtime service to broadcast some notification. So it's going across > process. > > I know I can use socket, but I want to know if the Binder can be used > in > this case. In other words, can binder be used as a new full duplex IPC > mechanism or it's only suitable for a client-server mode. > > Thanks > -Jarod > > On Dec 8, 9:52 am, "Dianne Hackborn" <[EMAIL PROTECTED]> wrote: > > > If you are running in the process, it is just JNI -- you can look online for > > good references on JNI. Note that this is not expressed as "messages," but > > just a standard API for invoking methods in the Java runtime. > > > If you are going across processes, often we do this using the Binder IPC > > system, but you can use any standard Linux mechanism if that is more > > appropriate. You could, for example, define an interface in aidl that is > > implemented by Java, and write the native side of the IPC for native calls. > > Unfortunately aidl currently can't spit out a native version of the > > interfaces, so this can be a little awkward. > > > On Sun, Dec 7, 2008 at 5:35 PM, Jarod LIU <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > I'm looking for the interaction mechanism between java runtime and > > > native space. > > > > From the google IO, I got some suggestions about how java layer can > > > invoke native services. > > > > But can any friends share some knowledge about how a native service > > > can send some message to jave runtime? > > > > Thanks > > > -Jarod > > > -- > > Dianne Hackborn > > Android framework engineer > > [EMAIL PROTECTED] > > > Note: please don't send private questions to me, as I don't have time to > > provide private support. All such questions should be posted on public > > forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" 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-framework?hl=en -~----------~----~----~----~------~----~------~--~---
