Network manager on Android

893 views
Skip to first unread message

Vittal

unread,
Jun 14, 2009, 7:48:23 AM6/14/09
to android-ndk
I am currently porting a Linux code on to Android. The Linux code
interacts with the Network Manager service. Is there a similar service
available on Android native or any other libraries which provides
information on the status of network devices?

Regards,
Vittal

Jack Palevich

unread,
Jun 14, 2009, 4:05:03 PM6/14/09
to andro...@googlegroups.com
I don't know what the "Network Manager" service is, but I do know that
there is no public API in Android for network status.

There is a Java level API, called the ConnectivityManager. See

http://developer.android.com/reference/android/net/ConnectivityManager.html

Perhaps you can have your Java code use the ConnectivityManager, and
then call into your C code as necessary.

Vittal

unread,
Jun 16, 2009, 12:47:34 PM6/16/09
to android-ndk
Has anyone traced back from java code to find the native libraries it
is using?

On Jun 15, 1:05 am, Jack Palevich <jack...@google.com> wrote:
> I don't know what the "Network Manager" service is, but I do know that
> there is no public API in Android for network status.
>
> There is a Java level API, called the ConnectivityManager. See
>
> http://developer.android.com/reference/android/net/ConnectivityManage...
>
> Perhaps you can have your Java code use the ConnectivityManager, and
> then call into your C code as necessary.
>

Jack Palevich

unread,
Jun 16, 2009, 1:01:57 PM6/16/09
to andro...@googlegroups.com
The native APIs are not publicly supported. If you called the native
APIs your code could break in the next release of Android.

Chris Rutherford

unread,
Jun 16, 2009, 3:43:37 PM6/16/09
to andro...@googlegroups.com
/proc/net/

Jack Palevich

unread,
Jun 16, 2009, 3:52:19 PM6/16/09
to andro...@googlegroups.com
Good luck with that.... There are many Android devices, with many
different ways of getting to the network.
Reply all
Reply to author
Forward
0 new messages