I tried every tutorial, it doesn’t work for me.
I get this error:
Attempt to invoke virtual method ‘android.net.NetworkInfo android.net.ConnectivityManager.getActiveNetworkInfo()’ on a null object reference
Note: You will not see another error reported for 5 seconds.
Can you show the blocks?