Game Development Reference
In-Depth Information
This puts the device in debugging mode while it is connected to a USB port. This state
poses a potential security risk, which Android will warn you about when enabling this op-
tion. After all, it allows any computer to write to and read from the device without any se-
curity verification whatsoever.
Tip If you are concerned about the security and privacy of your device and its
data, you should consider using a separate Android device just for testing. The
option to back up your device and then reset it to factory defaults is considered
safe, too. However, it's not something you'll want to do every morning and then
restore from backup every evening. It's easier to simply turn the Developer op-
tions on/off slider at the very top (shown in Figure 13-7 ) to off when you are
done debugging. You can also remove the Developer options entry altogether,
but this requires clearing the Settings data, which means you'll lose all settings
in the Settings app.
Enabling Stay Awake
Alongside USB debugging, you should enable Stay awake mode. This prevents the device
from sleeping or going to the lock screen while connected to a USB port. Yet, even with
this mode enabled, the screen will dim and go to sleep when you unplug it from the USB
cable.
I had to enable Stay awake because transferred apps failed to launch after transfer
whenever the device was sleeping and showing the lock screen. Either the screen went
black with no response from the app or the screen just showed the lock screen. When I
swiped the lock screen, the app would just quit or shut down with an error.
Your mileage may vary, and perhaps the actions I observed were pure coincidence. So you
may want to test deployment with Stay awake mode disabled, but only do so after you
confirm that you can build and run apps on your Android device.
Caution Keeping the device in Stay awake mode for many hours poses the risk
of screen burn-ins. A burn-in is a ghost image caused by displaying the same,
static screen for very long time. LCD pixels that stay lit for a long time lose
their ability to relax to an unlit state. It's rare for this to happen, but it's a pos-
sibility.
Search WWH ::




Custom Search