How to unclock Android screen when install from Eclipse - android

I'm new in Android developing (I'm a developer iOS from 3 years) and the very first thing that I notice in Android is that when I install my app from Android I need to unlock the screen manually.
This might seem like an unimportant thing but very often I'm wait in front of the screen for a few seconds and then I realize that I have to unlock the device manually.
Thanks

Well, I don't know about auto unlock but you could set "Stay Awake" in developer settings on your phone. This means the screen will not lock when you are connected to your computer. Not compatible with all phones due to some screen types.
Also, you could have a scout around the Play Store. There are numerous attempts at this but with varying results I suspect.
--Conor

Related

Cordova/Ionic2 | How to lock and unlock Screen of Android and iOS?

I just want to find a plugin that can trigger the native device screen lock button.
So for example if you click a button your device gets locked just it would do if you click your devices native lock button on the side of the phone. For example if your lock button of the device is broken you could do this within an app.
As far as I can tell the only plugin that would work is this one:
https://github.com/kitolog/cordova-plugin-screen-locker . But it seems it only works for android (And might aswell only lock the screen orientation).
window.screenLocker.unlock(successCallback, errorCallback, 10); // 10 seconds unlock timeout (third parameter is optional)
window.screenLocker.lock(successFun, errorFun); // release screen unlock
Is there any solution for iOS aswell? I really cant find anything.
There is a very good reason why the plugin is android-only, as there is no public API to lock the screen on iOS. In general, Apple is more restrictive as to what it allows its developers to do.
For a more in depth explanation, check out this answer.

ARC Welder - prevent applications from freezing / hibernating

I'm using new Google Chrome ARC Welder app to convert Android apks to Chrome applications. The problem I'm facing is that these apps freeze if they aren't used for some time.
While I understand that this is the desired bahaviour to save power on laptops and CPU time on desktops I have an application that needs to run even though I'm not clicking anything on the screen.
Can I set/run Android apps on Chrome and prevent them from sleeping/hibernating?
What you're seeing is the equivalent in Android of the device going to sleep.
If you hold a wake lock the app will not go to sleep, just like Android. This is the preferred way to signal to the runtime that you want to keep it active.
A more blunt way to do it is with special ARC metadata:
{"sleepOnBlur": false}
This will prevent your whole app from going to sleep all the time, at the expense of battery/cpu.

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.

starting Android app on multiple emulators simultaneously

As we all know, Android resolution is rather fragmented.
I (like many others) don't have all the screen resolution, or OS versions to test my app on.
Emulators give a solution to the resolution and OS problem, but it is getting rather tedious and annoying to run my app on each emulator (even if they are already running) just to see one layout.
So, my question is; is there any way to run my app on EACH emulator I have selected, not doing them individually?
For now, I am using a solution called Manymo, which allows me to launch emulators faster, but my ideal solution would be to start 1 app, and have a setting to be able to launch it simultaneously on several emulators.
I am surprised to see after many searches, that although people ask about running multiple, I can't seem to find anyone who would like to launch an app in multiple instances simultaneously.
Thanks!
Once you've got your emulators running, I believe in the Run Configurations control, you can select Launch on all compatible devices/AVD's and then select Active AVD's from the dropdown. I believe this should launch your app on all emulators you have running. Could be quite taxing on your system, though, unless you're swimming in RAM.
Im not sure if this is exactly, what you want but you dont even need to start an emulator to check how a layout will look like.
the ADT plugin in Eclipse allows you to check how a layout will look on different versions and devices without having to start each emulator every time.
Graphical Layout , allows you to select a device, the orientation and android OS version.

How to maintain Galaxy S2 screen active (Android OS)?

In Samsung Galaxy S2, where can I find the option to keep screen active? I've already searched through Menu->Configuration->Application->Development (and every other menu), but the Development option is missing in Application view (the view is a kind of application manager, not option settings).
I know that there is a lot of issues about keeping the amoled display active (i.e. pixel burn), but I'm in really need of this feature, as it is becoming very anoying to tap my device screen every time it is close to turn inactive.
Bellow is my Setting->Developer Options screen-shot:
Special Note: I've ready somewhere that the manufacturers had removed the option to keep screen active. Is this a true information?
Thanks in advance!
Try Setting the value programmatically using below code
Settings.System.putInt(getActivity().getContentResolver(),Settings.System.STAY_ON_WHILE_PLUGGED_IN,(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB));

Categories

Resources