Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!

To get the NetworkInfo using the ConnectivityManager of Android

Author: h.mohri

Using ConnectivityManager with C++Builder

With C++Builder 10.2 Tokyo Android ConnectivityManager class is available.
Use the ConnectivityManager, you can get NetworkInfo.
NetworkInfo see various network information.
inside that, The getType() function is Reports the type of network.
The getType() function return is int.

int type
0x00000000 TYPE_MOBILE
0x00000001 TYPE_WIFI
0x00000006 TYPE_WIMAX
0x00000009 TYPE_ETHERNET

I tried ways to get NetworkInfo.

Declare _di_JConnectivityManager variable.

_di_JConnectivityManager is the ConnectivityManager class interface.

It creates to use ‘_di_JConnectivityManager’.

Get the _di_JNetworkInfo using the getActiveNetworkInfo() function.

You can get the status of a network interface.

Do you want to build an Android app? Try the Android App Builder Software, which will assist you in developing apps in the Delphi or C++ environments.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.