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));
Related
My app needs to allow users to disable doze mode for my app, so for that the app needs to open android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS but I get android.content.ActivityNotFoundException when trying to open that intent on some Samsung phones like the Galaxy A5.
Is there an equivalent on those phones? What about other phones?
Thanks.
Edit: I just want to be clear, I'm trying to find what the actual setting screen is on Samsung Phones like the A5, not just how to open settings. I need to direct the users to the right location.
Edit: To clarify further, we have no found the setting on that Samsung phone to make isIgnoringBatteryOptimizations() return true. That is my main question, what setting needs to change on that phone for that to become true.
The Samsung Galaxy A5 ran on three OSs:
Android 6.0.1, Android 7.0, Android 8.0.0 (GFX Bench)
The android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS activity was added in API 23. It was not removed afterwards. For some reason, this bug was never addressed by Samsung. The only solution is to bring the user to the system settings screen. See the following solution:
https://github.com/kontalk/androidclient/commit/be78119687940545d3613ae0d4280f4068125f6a
EDIT
After misunderstanding the question and with the clarification of the OP, I've added a potential solution to address which power setting needs to be accessed.
If you haven't already, make sure you are using android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. Be sure that you add REQUEST_IGNORE_BATTERY_OPTIMIZATIONS in your manifest prior to using this activity.
Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, put them on the whitelist of apps shown by ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS). For an app to use this, it also must hold the Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission.
This should bring the user to the exact option necessary.
If you have one of these phones (maybe virtual from some online services) you can run the adb command to find the running activities, this way you can check the intent and maybe you are allowed to call it:
adb shell dumpsys activity activities
I created a brand new emulator today but it is behaving weird today. Here is my setting:
When i start it up, it loads fine. Until it gets to the lock screen. I keep on dragging/swiping from bottom to top to unlock, but it wont! This is the first time I encountered such behaviour. I tried with target Android 6.0 - API Level 23 but was able to unlock. I want to test my app on Google API 23. Please help to figure out the proper setting values.
Happened to me as well.
Another solution in addition to what #TTRansmit suggested is as below:
Close emulator.
Go to AVD manager screen, edit your Emulator and go to Advanced Settings.
Select Cold boot as Boot option located in Emulated Performance section. This way you will be able to restart your emulator and get it unlocked without loosing data.
Power off (via holding power) on the device buttons and wipe data (from Android Virtual Device Manager) worked for me. It was turning off the Device Frame from the edit/Virtual Device Configuration screen of AVD that seemed to cause the problem.
I still did not solve this problem, somewhat. To get thru, what I did was I activated the Camera emulation then relaunched the emulator. On the lock screen, I dragged the Camera icon. The camera would crash and emulator would notify you about it thru a pop up dialog. Once you exit the dialog, it will go back to your homepage UNLOCKED! I know, it was weird but it worked.
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
I do have a problem and have very little to go on. I'm about to release an App (created with Air for Android As3) on the Samsung App Store and just got a list of issues that have to be resolved after the app has been tested by samsung staff before the app could be released.
I did manage to solve almost all of the issues, but 1 very important one is beyond me. They say the screen turns/stays black, when returning after the device alarm interrupted the app. This issue practivally happend on all their devices, including a group including the phones I own (e.g. Galaxy S3).
I do have "OnDeActivate" and "OnActivate" listeners in place that are there to pause the app, disable sound etc. if it loses focus, gets minimized etc., yet I checked on my devices and I can't reproduce this error. Meaning if the app gets interrupted on my device by the alarm, I can resume it without any problems. no black screens.
So the question is: Is there any way for me to fix that at all? I do have to work within AirForAndroid AS3 so I guess possibilities are limited. Any clues where I can look? Any listeners to set, or is there a way to maybe "force" the app to reinitialize or refresh the display? Or to listen for the system alarm? Help would be much appreciated. Thanks in advance!
I am trying to overcome the same issue, I read somewhere that setting the stage quality to something else on both the activate and deactivate events might solve the issue.
So just set your stage quality to medium or whatever different in the deactivate and set it back to what it needs to be in the activate.
This should make AIR snap out of that black screen for the alarm (I hope)
An app of mine is with this fix is currently undergoing testing on the Samsung App Store.
I hope it fixes it.
Good news, the dirty fix of toggling the stage quality seems to have worked for Samsung, it has not shown up in their latest certification report of my app.
by the way, this is not for a stage3D app, that's different
It's for a GPU app
When the app loses focus on Android (goes into background) it will lose the context, which among other things mean that you lose all the created graphics, cached objects and like.
You didn't specify what kind of app it is. If you're using Stage3D, that means you'll have to recreate all your textures, and if you're on plain old displaylist, you'll have to recreate any bitmaps that were created at runtime, and redraw your screen at least once (so the vector graphics get redrawn too).
Now, if you're using Starling, for example, it can take care of recreating context for you (there's a flag for enabling that), although you'll still have to recreate dynamically created bitmaps.
I want to change the logo of my phone.
How do i change the booting logo or my android phone? For example, the samsung logo that comes up during boot.
I believe the original question pertains to the SAMSUNG (or your manufacturer's) logo that pops up first thing when booting, not the boot animation that runs afterwards. The boot animation can be changed, but the initial logo(s, as there can be two or more) seems to be somewhat evasive.
On some phones it may be found by doing a search on logo.bin ... on other phones it may be named boot.img ... on others you won't find anything.
Some devices may have a file called param.ifs - mine does not. If you find it ... this is the second splash that pops up right after the initial manufacturer's logo. This can be modified, as well as the boot animation. Know what you're doing if you want to change them.
Short answer: no.
Slightly longer answer: An application has no business changing system-wide settings like the boot logo, so even if you can, you really really shouldn't.
Even longer answer: While it is technically not possible to change the boot logo/animation in ordinary usage of the phone, it is possible to do if you have a rooted phone and don't mind installing a custom ROM. Depending on a whole lot of factors, it might be doable with just root access. For details on how to do this, visit: http://forum.xda-developers.com/showthread.php?t=1745297.
Yes you can change boot logo on samsung is on directory mmt/.lfs/logo.jpg