Got it. That's very helpful. Thank you so much, Yi. Archer
On Apr 20, 12:56 pm, Yi Sun <beyo...@gmail.com> wrote: > Sorry, the path mentioned in the last e-mail is wrong. The correct path is > development/samples/PlatformLibrary/ > > On Mon, Apr 20, 2009 at 12:22 PM, Yi Sun <beyo...@gmail.com> wrote: > > See inline.., what I tell u is only something works but may not be the > > "good" way > > > On Apr 20, 2009, at 12:07 PM, Archer <archerstark...@gmail.com> wrote: > > >> Greetings, Dianne, Yi and others, > > >> I have a need to do something similar, that is to access a backend > >> native service from the application. > > >> Going through the messages here, there are several things that are > >> unclear to me. I'd really appreciate if you can provide more > >> information on them. > > >> (1) On the native service side (C/C++), I can create a native binder > >> service class. I can also implement a native executable to instantiate > >> the binder service and add the service to the service manager. Then > >> what is the right way to start the native service? (Run the native > >> executable in some start up scripts?) > > >> [yi] I hook it up from init.rc > > >> (2) On the application side (Java), Dianne, you mentioned "make a > >> shared library that apps request with <uses-library>", exactly what is > >> this shared library? Is it the native shared library containing the > >> interface implementation of the service? > > >> [yi] take a look at developer/samples/platform you will get it > > > Archer > > >> On Apr 1, 10:46 am, Dianne Hackborn <hack...@android.com> wrote: > > >>> On Wed, Apr 1, 2009 at 5:39 AM, iblues <iblues....@gmail.com> wrote: > > >>>> With respect to performance, which approach is more better? Because > >>>> all the other modules in Android such as Camera or Media Recorder > >>>> module all use native binding and JNI layer for java access. > > >>> It just depends how you want to structure things. Eventually you are > >>> going > >>> to hit the IPC barrier; the most important thing is probably to keep that > >>> as > >>> efficient as possible (in particular reducing the number of IPCs that > >>> occur > >>> as much as possible). > > >>> -- > >>> 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. 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 android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---