you have just to add the permission
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
and it will work perfect.
More Related Contents:
- how to create Socket connection in Android?
- How to send file using bluetooth on android programatically?
- android webview with client certificate
- Raw Sockets on Android
- How to keep the android client connected to the server even on activity changes and send data to server?
- Which solution i can use for guaranteed notifications (it is not about push notification)? [closed]
- Launch custom android application from android browser
- Android 11 Scoped storage permissions
- ADB Shell Input Events
- Integrate MuPDF Reader in an app
- How to get the ActionBar height?
- Android: keeping a background service alive (preventing process death)
- Android Database Transaction
- How do I create a ListView with rounded corners in Android?
- Android Paint: .measureText() vs .getTextBounds()
- SQLiteOpenHelper problem with fully qualified DB path name
- Screen orientation lock
- How to split comma-separated value in SQLite?
- Location needs to be enabled for Bluetooth Low Energy Scanning on Android 6.0
- activeNetworkInfo.type is deprecated in API level 28
- Android SAF (Storage Access FrameWork): Get particular file Uri from TreeUri
- Google Cloud Messaging – messages sometimes not received until network state changed
- using notifyItemRemoved or notifyDataSetChanged with RecyclerView in Android
- run-as Package ‘a.b.c’ is unknown – Galaxy S4 Jellybean or Android 4.3
- Android Cursor with ORMLite to use in CursorAdapter
- Rotating an android VideoView
- Adding custom Font to Theme in Android
- How to stack Firebase Cloud Messaging notifications when the application is not running?
- SDK Location not found in android studio
- Android Custom URL to open App like in iOS