in java, I can set the power manager to keep a socket connection alive like following
also with wifi
how can I achieve a similar approach in b4x?
Java:
PowerManager.WakeLock newWakeLock = ((PowerManager) getSystemService("power")).newWakeLock(1, "Socket:WakeLock");
also with wifi
Java:
WifiManager.WifiLock createWifiLock = ((WifiManager) getApplicationContext().getSystemService("wifi")).createWifiLock(3, "Socket:WifiLock");
how can I achieve a similar approach in b4x?