Jay | 13 May 00:02 2011
Picon

[newbie] Compiling a native C++ app using Binder for Android

Hi,

I downloaded a sample native app using Binders from
https://github.com/mcr/Android-HelloWorldService. I then downloaded
both Android SDK and NDK (latest versions). However I notice the above
app refers to some header files (some examples eg. IInterface.h,
IServiceManager.h) that I dont see anywhere either in the SDK or NDK.

I checked the Froyo 2.2 for Android-x86 sources but again not there.
Just to dbl-check if I was missing I placed the app sources under
external

I realize the above sample app is old so could it be that whatever
headers it is referring to dont exist any more?

tia
jay

--

-- 
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Jay | 13 May 00:42 2011
Picon

Re: Compiling a native C++ app using Binder for Android

Minor correction in second para below - hit send hastily..

> I checked the Froyo 2.2 for Android-x86 sources but again not there.
> Just to dbl-check if I was missing I placed the app sources under
> external and tried compiling the iso_img but got errors complaining the headers not found.

related q: Is there any latest version of any sample native code
demonstrating use of Binder?

On May 12, 3:02 pm, Jay <Jayant_s... <at> hotmail.com> wrote:
> Hi,
>
> I downloaded a sample native app using Binders
fromhttps://github.com/mcr/Android-HelloWorldService. I then downloaded
> both Android SDK and NDK (latest versions). However I notice the above
> app refers to some header files (some examples eg. IInterface.h,
> IServiceManager.h) that I dont see anywhere either in the SDK or NDK.
>
> I checked the Froyo 2.2 for Android-x86 sources but again not there.
> Just to dbl-check if I was missing I placed the app sources under
> external
>
> I realize the above sample app is old so could it be that whatever
> headers it is referring to dont exist any more?
>
> tia
> jay

--

-- 
You received this message because you are subscribed to the Google Groups "android-ndk" group.
(Continue reading)

Chris Stratton | 13 May 04:39 2011
Picon

Re: [newbie] Compiling a native C++ app using Binder for Android

On Thursday, May 12, 2011 6:02:35 PM UTC-4, Jay wrote:

I downloaded a sample native app using Binders from
https://github.com/mcr/Android-HelloWorldService. I then downloaded
both Android SDK and NDK (latest versions). However I notice the above
app refers to some header files (some examples eg. IInterface.h,
IServiceManager.h) that I dont see anywhere either in the SDK or NDK.

I don't think that project is within the "bounds" of what the NDK and SDK are intended to enable - it seems to require pulling in private (ie, unstable) interfaces from the platform sources, and having an engineering or rooted device to deploy to.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Jay | 13 May 17:08 2011
Picon

Re: Compiling a native C++ app using Binder for Android


Are you implying it is not possible or recommended to develop a native
app(s) to use Binder? OR it is possible but it should be done
differently? I am constrained to use native code and not Java or JNI
etc.

Can someone from the Android platform team comment on this?

thx
Jay

On May 12, 7:39 pm, Chris Stratton <cs07... <at> gmail.com> wrote:
> On Thursday, May 12, 2011 6:02:35 PM UTC-4, Jay wrote:
>
> > I downloaded a sample native app using Binders from
> >https://github.com/mcr/Android-HelloWorldService. I then downloaded
> > both Android SDK and NDK (latest versions). However I notice the above
> > app refers to some header files (some examples eg. IInterface.h,
> > IServiceManager.h) that I dont see anywhere either in the SDK or NDK.
>
> I don't think that project is within the "bounds" of what the NDK and SDK
> are intended to enable - it seems to require pulling in private (ie,
> unstable) interfaces from the platform sources, and having an engineering or
> rooted device to deploy to.

--

-- 
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

David Turner | 13 May 18:02 2011

Re: Compiling a native C++ app using Binder for Android



On Fri, May 13, 2011 at 5:08 PM, Jay <Jayant_sane <at> hotmail.com> wrote:

Are you implying it is not possible or recommended to develop a native
app(s) to use Binder? OR it is possible but it should be done
differently? I am constrained to use native code and not Java or JNI
etc.

Can someone from the Android platform team comment on this?


Yes, the Binder is not exposed by the NDK, neither its interface or implementation, which means that applications built with the NDK should never depend on it, or they risk crashing / stop working in a future system update, or on specific OEM devices that have otherwise been accepted as compatible.

 
thx
Jay

On May 12, 7:39 pm, Chris Stratton <cs07... <at> gmail.com> wrote:
> On Thursday, May 12, 2011 6:02:35 PM UTC-4, Jay wrote:
>
> > I downloaded a sample native app using Binders from
> >https://github.com/mcr/Android-HelloWorldService. I then downloaded
> > both Android SDK and NDK (latest versions). However I notice the above
> > app refers to some header files (some examples eg. IInterface.h,
> > IServiceManager.h) that I dont see anywhere either in the SDK or NDK.
>
> I don't think that project is within the "bounds" of what the NDK and SDK
> are intended to enable - it seems to require pulling in private (ie,
> unstable) interfaces from the platform sources, and having an engineering or
> rooted device to deploy to.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Alexandre Bodi | 17 Apr 00:52 2013
Picon

Re: Compiling a native C++ app using Binder for Android

Hi David,


If the Binder mechanism is not available for native code, how come I can find it under android/frameworks/native/include/binder/? Has it become available at some late release?

Or, even though it's there, you discourage its use since it can become deprecated at an upcoming release?

Thanks and regards,
Alexandre Bodi

On Friday, May 13, 2011 1:02:59 PM UTC-3, David Turner wrote:


On Fri, May 13, 2011 at 5:08 PM, Jay <Jayan... <at> hotmail.com> wrote:

Are you implying it is not possible or recommended to develop a native
app(s) to use Binder? OR it is possible but it should be done
differently? I am constrained to use native code and not Java or JNI
etc.

Can someone from the Android platform team comment on this?


Yes, the Binder is not exposed by the NDK, neither its interface or implementation, which means that applications built with the NDK should never depend on it, or they risk crashing / stop working in a future system update, or on specific OEM devices that have otherwise been accepted as compatible.

 
thx
Jay

On May 12, 7:39 pm, Chris Stratton <cs07... <at> gmail.com> wrote:
> On Thursday, May 12, 2011 6:02:35 PM UTC-4, Jay wrote:
>
> > I downloaded a sample native app using Binders from
> >https://github.com/mcr/Android-HelloWorldService. I then downloaded
> > both Android SDK and NDK (latest versions). However I notice the above
> > app refers to some header files (some examples eg. IInterface.h,
> > IServiceManager.h) that I dont see anywhere either in the SDK or NDK.
>
> I don't think that project is within the "bounds" of what the NDK and SDK
> are intended to enable - it seems to require pulling in private (ie,
> unstable) interfaces from the platform sources, and having an engineering or
> rooted device to deploy to.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro... <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk... <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe <at> googlegroups.com.
To post to this group, send email to android-ndk <at> googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
David Turner | 17 Apr 09:48 2013

Re: Compiling a native C++ app using Binder for Android


On Wed, Apr 17, 2013 at 12:52 AM, Alexandre Bodi <alexandrebodi <at> gmail.com> wrote:
Hi David,

If the Binder mechanism is not available for native code, how come I can find it under android/frameworks/native/include/binder/?

You're referring to code that is part of the platform itself, and not available to applications. This means these declarations are not stable, not guaranteed to be available or even working on any compatible device.

The official NDK headers are under android/development/ndk/platforms/
 
Has it become available at some late release?

No, I don't think so.
 
Or, even though it's there, you discourage its use since it can become deprecated at an upcoming release?

As usual, usage is discouraged because these APIs/ABIs could be removed or changed by any OEM, or any new platform release. There is no guarantee that using them will work.

Generally speaking, it takes several iterations for a system API to be considered stable / good enough to be exposed to application developers. The team tries really hard exposing stuff that isn't ready yet for consumption.

In the case of native code APIs, things are even more restrictive due to various technical considerations. Consider using JNI to call through platform APIs instead whenever possible.

 
Thanks and regards,
Alexandre Bodi

On Friday, May 13, 2011 1:02:59 PM UTC-3, David Turner wrote:


On Fri, May 13, 2011 at 5:08 PM, Jay <Jayan... <at> hotmail.com> wrote:

Are you implying it is not possible or recommended to develop a native
app(s) to use Binder? OR it is possible but it should be done
differently? I am constrained to use native code and not Java or JNI
etc.

Can someone from the Android platform team comment on this?


Yes, the Binder is not exposed by the NDK, neither its interface or implementation, which means that applications built with the NDK should never depend on it, or they risk crashing / stop working in a future system update, or on specific OEM devices that have otherwise been accepted as compatible.

 
thx
Jay

On May 12, 7:39 pm, Chris Stratton <cs07... <at> gmail.com> wrote:
> On Thursday, May 12, 2011 6:02:35 PM UTC-4, Jay wrote:
>
> > I downloaded a sample native app using Binders from
> >https://github.com/mcr/Android-HelloWorldService. I then downloaded
> > both Android SDK and NDK (latest versions). However I notice the above
> > app refers to some header files (some examples eg. IInterface.h,
> > IServiceManager.h) that I dont see anywhere either in the SDK or NDK.
>
> I don't think that project is within the "bounds" of what the NDK and SDK
> are intended to enable - it seems to require pulling in private (ie,
> unstable) interfaces from the platform sources, and having an engineering or
> rooted device to deploy to.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro... <at> googlegroups.com.
To unsubscribe from this group, send email to android-ndk... <at> googlegroups.com.

For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.



--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe <at> googlegroups.com.
To post to this group, send email to android-ndk <at> googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmane