Re: [android-porting] Re: How to connect to a binder c++ service?

2011-09-12 Thread Nitin Mahajan
2010/10/22 Samuel Skånberg : > Hello Dianne, > > Thanks for you quick response! > > In another post a developer asked how one should go about to publish an > IBinder interface of a native service with the system manager. There you > said one should follow four steps > > "1. Declares a shared user I

[android-porting] Re: How to connect to a binder c++ service?

2010-11-04 Thread Samuel Skånberg
Hello again! And thanks for your help! Now I have tried different approaches and I'm stuck. What I did was creating a Java service but in the onBind method I call a native method that instantiate the C++ service and call another one that returns an IBinder interface.

Re: [android-porting] Re: How to connect to a binder c++ service?

2010-10-22 Thread Dianne Hackborn
The Java runtime has wrappers around C++ IBinder. This is what Java's Binder is. You can write a JNI function that returns a Java Binder and in its implementation instantiate a C++ IBinder interface and return it. You will need to use this magic function in libandroid_runtime to do this: ext

Re: [android-porting] Re: How to connect to a binder c++ service?

2010-10-22 Thread Samuel Skånberg
Hello Dianne, Thanks for you quick response! In another post a developer asked how one should go about to publish an IBinder interface of a native service with the system manager. There you said one should follow four steps "1. Declares a shared user ID with the system process, and that its comp

Re: [android-porting] Re: How to connect to a binder c++ service?

2010-10-21 Thread Dianne Hackborn
I would recommend keeping all of the Binder stuff in C++, and implementing your Java APIs as JNI calls on the C++ Binder interface. Until aidl can generate C++ stubs, I think it is easier than maintaining both C++ and Java interfaces. 2010/10/20 Samuel Skånberg > Well, those links were about JN

[android-porting] Re: How to connect to a binder c++ service?

2010-10-21 Thread Samuel Skånberg
Well, those links were about JNI. I don't think I should have to use JNI, do you? My service is implemented in C++, linked with binder and the client I want to connect with is a normal android app so I should be able to do ---