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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en