March 2016
Intermediate to advanced
428 pages
9h 2m
English
This is a simple recipe, but one that is very common and will probably be included in every Internet application you build: checking online status. While checking online status, we can also check the connection type: WIFI or MOBILE.
Create a new project in Android Studio and call it isOnline. Use the default Phone & Tablet option and select Empty Activity when prompted for Activity Type.
First, we need to add the necessary permissions to access the network. Then, we'll create a simple layout with a Button and TextView. To get started, open the Android Manifest and follow these steps:
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission ...
Read now
Unlock full access