Answer the question
In order to leave comments, you need to log in
How to keep mobile internet on when screen is off in android?
When the screen is turned off on stock Android 4.2.2 on the Jiayu G4C, the network turns off after a while, and synchronization stops working, including in mail clients, and they cannot raise connections on their own.
Answer the question
In order to leave comments, you need to log in
Vryatli there is such a possibility. Alternatively, make only the screen fade, but not turn off, and then the Internet will always be on.
It seems that it was in the network settings to turn it off when the screen went out or not, something like economical modes of operation and so on.
If we are talking about Wi-Fi, then in the advanced settings you can select the disable mode. Data transfer via the mobile network does not seem to be interrupted due to the screen turning off. If it is interrupted, then this is the crookedness of the firmware (which, in general, is not surprising for the Chinese).
If we are talking about software blocking of a shutdown, then this is done like this:
WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);
wifiLock = wm.createWifiLock(WifiManager.WIFI_MODE_FULL, "Lock_TAG");
wifiLock.setReferenceCounted(false);
wifiLock.acquire();
...
wifiLock.release();
PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
cpuLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Lock_TAG");
cpuLock.setReferenceCounted(false);
cpuLock.acquire();
...
cpuLock.release();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question