Automatically turn off screen when my app is running in debug? - android

Hi, I'm new to Android development (please excuse me for this elementary question) and am currently developing a simple app. However, when I run the app, the screen stays on unless I exit the app.
When running most other apps, the phone screen will automatically turn off after several minutes. How can I set it so that the screen automatically turns off after running my app after idling for some time?
Thanks

Uncheck the Stay awake in Settings->Developer Settings.

Related

Android app wont reopen

I am making a game for android and after running my app on a connected device, I would press the home button to exit out of the app. But when I press on the app again, it would just be a black screen. I was wondering if I had to program the app to close? or if this is another problem? thanks!
May be your phone is running out of memory .. Try running it using a device with higher ram or in an emulator with high config ..

AS3 Application fades out while running

I'm developing a game in AS3 for Android. For some reason when I'm testing it on an Android device, after, lets say, 3 or 4 seconds, the screens starts to fade out till it's completely black while app is still running.
I have the "Stay Active/Awake" on "Android Developers Option".
I'm hoping you can help me with this problem.
Thank you!
As I'm using only Accelerometer it doesn't count as a feature to stay awake. We have to force Android to stay awake by code. Basically when app is running it triggers stayAwake mode else it triggers normal mode.

Phone screen always on when using Eclipse

Do you know any way to keep the phone screen on when i run application on it from Eclipse?
I'm using my phone to test Android app and it is very annoying to turn on the screen every time i run the application.
Do you have a solution?
Use the option Keep screen on under the developer options of your phone/emulator.

Android: Make app not closeable (kiosk) under certain circumstances

I have a problem that I don't really know how to solve and also the threads here at SO haven't fully helped me.
Here's the issue: I want to have an android app that I can start whenever I want, and then, when I click on a button, I want the app to be somewhat "locked". By that I mean: after this button was pressed, the user is not able to close(see edit below) the app. Also, the app should immediately start after rebooting the device.
This lock can then be revoked by, say, entering a passcode, which makes the app run normally again.
So far I understand how to build kiosk applications. However, a kiosk application needs a particular manifest which will make it always a kiosk app, and not "on demand".
I'd greatly appreciate any hints and tips on this topic. Thank you so much!
EDIT: by "close" I really only mean completely turning the app off, not only going back to your home screen. Such that the app is always running in the background
You can programmatically lock and unlock the App in Android 5.0 http://developer.android.com/about/versions/android-5.0.html#ScreenPinning

Android app auto reset on minimize

We have designed an hybrid app which is a bit heavy (9 MB). Problem is that at times, minimizing this app (home button) makes the app reset in background i.e. its app cache is lost and app reloads from splash screen. After minimizing we worked with other apps in tablet (Galaxy 800).
We saw this problem only if we tried to launch app from the icon in launcher. This problem did not happen when we tried to launch it from the minimized list(recent apps button).
This problem is not specific to the tab. It also happened in Galaxy 3 and Droid Razr also.
Any guidance?
Problem is that at times, minimizing this app (home button) makes the app reset in background i.e. its app cache is lost and app reloads from splash screen.
This is perfectly normal.
Computers, phones, and tablets do not have infinite RAM. Android's approach to this problem is to keep your process around for a while after the user has left it, but eventually Android will terminate your process to free up RAM for other applications and their processes. You can read more about the Android process model in the documentation.
It can be possible that ‘deep clean' option is enabled by mistake on your phone. What deep clean does is, whenever you minimize an app , it releases all the memory associated with that app, and hence when you again open that app, it will start as if it is new. To check the 'deep clean' option,
go to the
Developer options -> 'Don't keep activities' -> disable it
If it is not disable please disable it.

Categories

Resources