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.
Related
I'm using this workaround, to refrain device from sleeping in App Inventor 2, but I noticed a strange behavior on device.
First of all, the under development app, is a one screen application with a ListPicker component and some timers. When the user makes a pick, the screen returns in Screen1 as it should, but with the VideoPlayer controller buttons showing up for a second, and they shouldn't be visible (is tested on a Gingerbread 2.6.3. device).
What is more, the app is refrained from sleep only when no clock timers are set on and for about 10 min period, and I need it to stay refrained for up to 3 hours in intervals.
Does anyone know a solution to this strange VideoPlayer behavior, or a better sleeping refrain approach in App Inventor 2?
Thank you all for your answers.
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
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.
i have a Phonegap and JQM app.
Problem is, if I switch to another app and then back to my app, App is completely reloaded and start again.
Is posible this disable?
Thanks for any advice.
This is happening because there is a lack of memory for the app to run. So as soon as u go to home the app dies and on opening again it reloads the app from the start. To confirm that this is indeed happening i would suggest that you close all running apps on your phone and then run your app. Im sure it would run properly even after switching to home screen and coming back.I don't think its possible to get around this behavior. Design your app so that it has a small startup time so that its usable even on phones with less ram where such problems would come.
On an android App I made, whenever the user turns the app to the side, the app turns sideways and restarts (this was on the droid). I don't want to this to happen. I want the app to not restart when the device is turned sideways.
Also I would prefer the app to be locked in the vertical position.
How would I go about this two thing?
Thanks in advance.
This has been covered numerous times Android, how to not destroy the activity when I rotate the device?