xref: /aosp_15_r20/development/samples/browseable/BasicNetworking/_index.jd (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker
2*90c8c64dSAndroid Build Coastguard Workerpage.tags="BasicNetworking"
3*90c8c64dSAndroid Build Coastguard Workersample.group=Connectivity
4*90c8c64dSAndroid Build Coastguard Worker@jd:body
5*90c8c64dSAndroid Build Coastguard Worker
6*90c8c64dSAndroid Build Coastguard Worker<p>
7*90c8c64dSAndroid Build Coastguard Worker
8*90c8c64dSAndroid Build Coastguard Worker            This sample demonstrates how to use the ConnectivityManager to determine if you have
9*90c8c64dSAndroid Build Coastguard Worker            a network connection, and if so, what type of connection it is.
10*90c8c64dSAndroid Build Coastguard Worker            \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
11*90c8c64dSAndroid Build Coastguard Worker            on the active connection, and then the connection type is printed to an on-screen console.
12*90c8c64dSAndroid Build Coastguard Worker
13*90c8c64dSAndroid Build Coastguard Worker        </p>
14