Dear Olivier, Thanks for the answer but I'm not using the NDK . Instead, I'm developing using the entire source code ( AOSP) , so it should be possible. Any indications in how I can implement this feature? I would be very appreciated. I also understand very clearly the risky of not using the NDK.
Cheers, Carlos. On 14 Dez, 16:27, Olivier Guilyardi <[email protected]> wrote: > On 12/14/2009 03:29 PM, Banderas wrote: > > > I'm developing a C++ application for the android that needs to talk > > with a server whenever there is an internet connection available. If > > the internet connection is cut-off the application needs to "sleep" in > > order to reduce the battery consumption. If the internet connection is > > back the application should "awake". > > I'm searching for any kind of event notification available for C++. I > > don't want to use pooling. > > I know that in java we receive these notifications from the > > connectivity service.Can we trap them natively? > > You can't do a such thing natively. The android ndk only exposes very few > public > APIs (see android-ndk/docs/STABLE-APIS.TXT). > > If you want to be notified from a such event then do it in Java and call the > relevant native routines through JNI. > > -- > Olivier -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en

