I am facing a weird behavior. I have stucked for five days, at last, I am asking here. When the Internet connection is off, (or on, but no data), when I want to open my app by tapping the launcher icon, my app leads me to a screen, that shows a sleeping satellite and no connection. Thus I can't enter my app without an internet connection and data. This happened when I upgraded the API version to 33. and min 23.
Is there anything to do in the code?
My internet connection check is here:
public static boolean checkConnection(@NonNull Context context) { ConnectivityManager mConnectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); return ( mNetworkInfo != null && mNetworkInfo.isAvailable() && mNetworkInfo.isConnected()); }
