[APP][2.2+]Yet Another Auto Brightness - Android Apps and Games

Yet Another Auto Brightness (YAAB)
A small open source application designed to enhance user control over screen brightness. Initially it was developed to make the screen as dim as possible to save battery on old devices. AND to provide a simplest possible user interface without any complicated calibration procedures and so on.
It is Beta version now. It has ascetic interface and very simple in use.
Source code, issue tracker and latest APKs are available here: http://bitbucket.org/gyrussolutions/yaab/
Google Play link: https://play.google.com/store/apps/details?id=biz.gyrus.yaab
Any feedback is highly appreciated, especially from other Android developers

Tester initial impressions
A nice small download and a simple and clean interface. Started service and it immediately started dimming my brightness. A few points to begin with:
The manual slider does not seem to work as there was no change in the brightness.
It doesn't seem to alter the brightness in different lighting (unsure if it is supposed to do this or not from documentation).
It is making my screen too dim, I have a GT-I9300 and the auto brightness on it is excellent and always keeps my screen at the good readable and useable settings.
Will run for an hour or so now and update this with further thoughts then.
---------- Post added at 05:13 PM ---------- Previous post was at 05:06 PM ----------
Ok it's keeping my screen to dim to be usable so have had to uninstall for now. A few further points though:
Application Force Closes when you stop the serverce.
The manual slider does not work.
Handset - GT-I9300
ROM - Paranoid Android 2.51
OK log wouldn't upload, here's a link for it on dropbox.
https://www.dropbox.com/s/mbyfz33b7audtxz/2012-11-02-17-10-36.txt

Good report, thanks a lot.
Looks like the app incorrectly reads light sensor data on your device and thus brings brightness to minimum.
I'm working on the issue now.

andrvo said:
Good report, thanks a lot.
Looks like the app incorrectly reads light sensor data on your device and thus brings brightness to minimum.
I'm working on the issue now.
Click to expand...
Click to collapse
Let me know when you have a new version and will test again for you.

Hi!
IIIIkoolaidIIII said:
Let me know when you have a new version and will test again for you.
Click to expand...
Click to collapse
I did some research tonight and found out that many people have concerns about light sensor behaviour in your ROM.
I wrote a very simple app that shows sensor parameters on the screen and displays all subsequent updates received from the sensor.
APK is here: https://bitbucket.org/gyrussolutions/lightreader/downloads (sources are available there also)
It doesn't require changing settings and it will not attempt to change screen parameters also. Minimal discomfort
Could you please run it on your device and post here its output in a dark room and under strong light?
Thanks.

andrvo said:
Hi!
I did some research tonight and found out that many people have concerns about light sensor behaviour in your ROM.
I wrote a very simple app that shows sensor parameters on the screen and displays all subsequent updates received from the sensor.
APK is here: https://bitbucket.org/gyrussolutions/lightreader/downloads (sources are available there also)
It doesn't require changing settings and it will not attempt to change screen parameters also. Minimal discomfort
Could you please run it on your device and post here its output in a dark room and under strong light?
Thanks.
Click to expand...
Click to collapse
Details bellow, Sensor name - CM36651 Light sensor
Darkened Room:
Accuracy 3, MAX 121240, last 0.0
Bright light:
Accuracy 3, MAX 121240, last 3700.0 (fluctuating around this point)
I've not read much in relation to sensor issues on this ROM, will do some digging myself now. Hope this information is useful to you.
B
---------- Post added at 11:05 AM ---------- Previous post was at 10:48 AM ----------
I have just done some digging and found no Liight sensor issues mention in the CM10 threads or known bug list. There was a light sensor issues back in September for Paranoid Android but this was fixed back then. Where have you seen the information about peoples concerns with the light sensor?
I have attached a link to the CM10 known issues bellow.
http://teamhacksung.org/wiki/index.php/CyanogenMod10:GT-I9300:Nightly:Known_issues

I saw several mentiones of light sensor problems here on the forum, like this: http://forum.xda-developers.com/showpost.php?p=31801837&postcount=2862 or this http://forum.xda-developers.com/showpost.php?p=31801837&postcount=2862
Some other mentiones on other forums/blogs.
But anyway your readings are very good, so the sensor isn't a culprit any longer.
I just had to make sure that the app has valid input data and the problem is somewhere in the algorythms. Because in the log file you submitted yesterday contains very strange values.
Thanks again. I'm going on with my investigation.

andrvo said:
I saw several mentiones of light sensor problems here on the forum, like this: http://forum.xda-developers.com/showpost.php?p=31801837&postcount=2862 or this http://forum.xda-developers.com/showpost.php?p=31801837&postcount=2862
Some other mentiones on other forums/blogs.
But anyway your readings are very good, so the sensor isn't a culprit any longer.
I just had to make sure that the app has valid input data and the problem is somewhere in the algorythms. Because in the log file you submitted yesterday contains very strange values.
Thanks again. I'm going on with my investigation.
Click to expand...
Click to collapse
Yeah those were two months ago and the bug was fixed in a few days, there have been about 10 version updates since then as well.
Let me know when you're new version is available and will test again.
B

Maybe you should restrict app installation to devices that have a light sensor? Because Google Play allows me to install it even tho I don't have one.

HTC Wildfire S (Marvel)
Works as intended on HTC Wildfire S (Marvel) 510e.
Brightness is applied 1/2 secconds after screen is on and with correct levels acording to the external light and manual adjusment seting.
I like the simplicity (pls don't change that) and, so far, I didn't noticed any bad impact on battery life.
I'm curently on custom SENSE 2.1 rom but I switch often so will test this one on them too.
Tnx,

GermainZ said:
Maybe you should restrict app installation to devices that have a light sensor? Because Google Play allows me to install it even tho I don't have one.
Click to expand...
Click to collapse
Will be done, thanks. I don't know how could I have missed that

kobredabre said:
Works as intended on HTC Wildfire S (Marvel) 510e.
Brightness is applied 1/2 secconds after screen is on and with correct levels acording to the external light and manual adjusment seting.
I like the simplicity (pls don't change that) and, so far, I didn't noticed any bad impact on battery life.
Click to expand...
Click to collapse
Thanks for the update.
We are working on automatic/manual "night reading" mode and manual range adjustments now, but we intend to keep the main screen and the defaults in this way, so most of the users would not even need to open menus and dig deeper into the settings.

IIIIkoolaidIIII said:
Let me know when you're new version is available and will test again.
Click to expand...
Click to collapse
I've uploaded current version to the downloads section: https://bitbucket.org/gyrussolutions/yaab/downloads
Check this one please when you have time.
To be honest I still don't know why did it set brightness to minimum on your phone and didn't ever rise it again.
But your log revealed a number of thread synchronization issues that I fixed in this version. I believe there could be connection between these issues and your dark screen.
UI is a bit different, it is my current development version. But start/stop buttons still do the same.
Don't wait long, 10-15 seconds is enough, if it doesn't track ambient light changes right from the beginning - it will not start after some minutes.
Thanks.

Hi andrvo,
Yaab works on my Nexus 7. It is also very easy to use. But I have two remarks.
First the app starts in portrait and I only use me tablet in horizontal view. The app not only starts in portrait, it does also not change to horizontal. This would be nice, if the app would start with mentioning the position.
The other point is, that it only needs one more option in my case. There is automatic and manual brightness. If I can use the manual slider in the automatic mode to set a basic brightness, this would be handy. Hope you know what I mean.
Thanks for your work. Would be nice to find Yaab on Google Play to get updates automatically.

Thanks, checking it out...

benkxda said:
First the app starts in portrait and I only use me tablet in horizontal view. The app not only starts in portrait, it does also not change to horizontal. This would be nice, if the app would start with mentioning the position.
Click to expand...
Click to collapse
Yes, it is my fault. I didn't have enough time to test those layouts on tablets.
I plan creating layouts for tablets from scatch since existing were designed mostly for phones.
benkxda said:
The other point is, that it only needs one more option in my case. There is automatic and manual brightness. If I can use the manual slider in the automatic mode to set a basic brightness, this would be handy. Hope you know what I mean.
Click to expand...
Click to collapse
Well, it works almost as you describe. "Manual adjustment" actually set the base line for the automatic brightness formula.
I'm preparing new release right now, will be available today or tomorrow. New version also allows to limit top and bottom values of brightness, maybe it will fit your need
benkxda said:
Thanks for your work. Would be nice to find Yaab on Google Play to get updates automatically.
Click to expand...
Click to collapse
It is here: https://play.google.com/store/apps/details?id=biz.gyrus.yaab

Test it on Galaxy Note 2
Everything looks working. Closing the sensor with my hand causing the screen light dim.
Not sure what idea I can give though, probably you can check 'smart stay' feature at Samsung S3/Note 2. Although it's not a screen auto-brightness thing but it have same objective about saving battery from screen consumption.

andrvo said:
Yes, it is my fault. I didn't have enough time to test those layouts on tablets.
I plan creating layouts for tablets from scatch since existing were designed mostly for phones.
Well, it works almost as you describe. "Manual adjustment" actually set the base line for the automatic brightness formula.
I'm preparing new release right now, will be available today or tomorrow. New version also allows to limit top and bottom values of brightness, maybe it will fit your need
It is here: https://play.google.com/store/apps/details?id=biz.gyrus.yaab
Click to expand...
Click to collapse
That new release I get then via Play, thanks for that. Delighted me.

jimmod said:
Test it on Galaxy Note 2
Not sure what idea I can give though, probably you can check 'smart stay' feature at Samsung S3/Note 2. Although it's not a screen auto-brightness thing but it have same objective about saving battery from screen consumption.
Click to expand...
Click to collapse
Ok, I'll check it, thanks.

Version 1.6 is rolling out to the Play store.
What's new:
night mode, manual and automatic. The latter will work only on new devices with high quality sensors which are able to provide accurate values in the lower part of the range. Manual works on any device.
range controls added. Now it is possible to shrink the actual range of automatic brightness values.
bugfix (of course)
Beta testing is still going on, all testers are welcome.
Fresh APK is also available here: https://bitbucket.org/gyrussolutions/yaab/downloads

Related

[App] LifeDropper - the eyedropper tool for real life. [Now on the Android Market!]

As the title would suggest, this is LifeDropper - the eyedropper tool for real life.
LifeDropper is designed to determine the colour of objects in the real world, and then present you with what it finds.
Instructions are provided when you open the app. Please leave feedback and make feature requests! Bug reports are extremely welcome!
Important note regarding feedback: when providing feedback, please include your phone model, Android version, ROM version (if applicable), and a link to the logcat (preferably posted on www.pastebin.com). If you don't know how to provide log information, please don't ask for directions in this thread.
Another important note regarding feedback: be brutal. If you hate the icon, tell me. If you hate the layout of something, tell me. If you hate the name, tell me. If you hate the concept...don't tell me that. Also tell me good things. Lots of good things.
Without further ado,
Market Version
Happy tagging!
Great app! Very unique, I love it! Keep up the good work my man
Hey,
great idea!
Taking screens and analyizing colors seems to work for me, but upon saving and sharing, app crashes .
(replace 'xx' with 'tt', since i can't post links yet)
Log for save-crash:
hxxp://pastebin.com/9FhrUMNc
Log share-crash:
hxxp://pastebin.com/XB3U6xVE
Suggestion(s):
- change camera overlay (the bright rectangle in camera view)'s size, so that it reflects the number of pixels being analyized. (e.g. 1px analyzed: only cross, 144px -> 12*12 rectangle, 2500px = 50*50rectangle (you get the point )
- make color values selectable (text), so you can copy/paste them somewhere else.
Besides that, great concept, icon is ok aswell .
Cheers!
EDIT:
almost forgot:
phone: Samsung Galaxy S2
android: 2.3.3
rom: XWKE7
Awesome! Thanks for the feedback and the logcat! I'll look into the issues you're getting. I assume you are using a different locale than en_CA or en_US (as it appears you are from Germany), and that's where the share issue is coming from. I was considering having the size change for the overlay, I think that'll be a definite feature now.
As for the save error, I'm confused. The logs don't appear to be showing me anything. Everything seems to be going fine and then suddenly my Activity is force finished. I'll need to do some more investigating in that department.
EDIT: The share logcat confuses me as well, even though I'm sure I know what the issue is. I think the developer of your ROM has set the log level to very low.
Yep locale setting seems to be the problem. After switching it from de_DE to en_US saving and sharing are working fine.
Seems like everything from verbose upwards is being logged, i could give you a filtered log if needed?
(Fyi it's the stock rom if thats any helpful)
Sent from my GT-I9100 using XDA App
That's alright. If changing the locale solved the issue, then the locale is the problem
Would you be so kind as to post some screenshots of the app in order to entice users?
Thanks!
I'll try to get some screenshots as soon as possible, unfortunately my phone's battery exploded. I have a new one on the way and it should be here in the coming days. If anyone else would like to post some screenshots they're welcome to!
(I've tried to take some through the emulator, but they don't work because a) I'm testing a camera-oriented app on the camera-less emulator, and b) the camera uses a surface which updates while the screenshot is being taken so they end up breaking.)
screens attached
Great App ideia, will follow this one up close congrats man
this is a great app idea but fc's on my droid incredible. i would love to have this app too.
Problem parsing the package
Motorola atrix 4g on bell
Post added to the XDA front page. Hope this gets your great app some exposure.
Shoudn't you have some way to calibrate the colors with a graycard? A color is highly dependent on the light that is emitted on it. A red object in daylight will give a diferent color than the same red object in fluorescent TL light...
@dirtsky are you using the en_US or en_CA locale?
@marko! I would suggest trying to redownload, I haven't heard of this issue as of yet.
@willverduzco thanks! There have been 300 downloads since last night thanks to the article!
@michaelarnauts I'm aware, but the thing is, LifeDropper is designed to capture colours as they are seen. If you see a colour under light, LifeDropper is viewing it in the same light.
An update that fixes the saving/sharing FC (due to locale) is now in the first post.
Wow, wonderful application! Working great on stock Droid Incredible... Few force closures now and then but still very useful!
@Cellulah is there any way you could provide a logcat for the FCs you're getting?
This is really cool. I bet someday you could do live updating with histogram data in the camera view!
Sent from my Thunderbolt das BAMF remix
@rycheme glad you like the concept! Awesome idea! I'm looking into doing capturing without having to take a picture (like Barcode Scanner).
Remember, if you like the app, mash the share button!
The next update will include linking to the currently under-construction LifeDropper site for the share feature, so the link at the end will be a link to your colour.
i'm sure i'm not alone on this... I'd really appreciate it if my camera could focus on the middle portion before taking the picture....
i would also really love this if there was a way to calibrate this stuff... maybe print out
100% cyan box... 100% Magenta.....100% Yellow... and whatever other colour might be necessary...
by the way ... this is an amazing App!!!
If it comes to the market ...i'll definitely buy it...
Phone: Samsung Vibrant w/ Custom Rom

[APP] Weather Station 2.1.0.5

The Galaxy S4 and Note 3 are the only Android devices right now with ambient temperature and humidity sensors. This Weather Station app I developed (free and with no ads) utilizes these sensors and additional ones to the full delight of amateur and pro meteorologists:
Weather Station
Donate
v2.1.0.5:
-Fix for pre Android 4.4 devices' widgets not updating automatically with Update On Press enabled
v2.1.0.4:
-Fix for widget indicators always showing no change
v2.1.0.3:
-Fix for Android 4.4+ intermittent temperature issues
v2.1.0.2:
-Small bug fixes
v2.1.0.1:
-Fix for abs. humidity, dew point, mixing ratio, and heat index not updating on widgets and graphs
v2.1.0:
-General battery use improvements
-General UI improvements
-Printing support for Android 4.4+
-Bug fixes
v2.0.2:
-added Density Altitude
-bug fixes
-added Ukrainian translation
v2.0.1.1:
-bug fixes
-updated Portuguese translation
v2.0.1:
-nicer y-axis graph labels formatting
-larger default font size for lockscreen widgets
-can now specify different font size for lockscreen widgets
-added Finnish translation; completed Russian & Spanish
v2.0.0:
-Completely new code architecture (for this reason you will have to uninstall and reboot)
-Updated appearance for app and widgets
-Mixing Ratio, Heat Index, Illuminance, |Magnetic Field|, Barometric and GPS Altitude added
-Widgets can now have multiple readings, update on tap, and no indicators
-New unit choices for Mixing Ratio and Elevation/Altitude
-Ability to clear saved background readings
-Nicer y-tick intervals on graphs
-Export multiple readings simultaneously
----------
String resources from this app are attached for translation only. Do not assume you can use them in your own app without talking to me. If you want to use the strings in a revenue generating app please pm or email me beforehand for permission.
----------
Translating strings and arrays in res.zip:
All who help with translations will be acknowledged in the app. The res/values directory contains the files strings_localizable.xml and arrays_localizable.xml with the English (US) words and phrases that would need to translated. As an example here is how the translation to Brazilian Portuguese worked:
Step 1) Copy the strings_localizable.xml and arrays_localizable.xml files from res/values to another location.
Step 2) Complete the translation of the words and phrases inside the xml tags.
Example 1:
<string name="app_name">Weather Station</string>
becomes
<string name="app_name">Estação Meteorológica</string>
Example 2:
<string-array name="pref_notifications_when_entries">
<item>Rising</item>
<item>Falling</item>
</string-array>
becomes
<string-array name="pref_notifications_when_entries">
<item>Subindo</item>
<item>Caindo</item>
</string-array>
Step 3) The translated files are placed into a new directory inside the res directory called values-pt (or values-pt-rBR). I can take care of this last step I just need to know what language it is and if it is limited to a regional dialect.
Works in other devices?
Dude, read the ops first sentence...
Sent from my SGSIII
That's cool. I'm going to give it a go.
works good on i9500, loving it , gr8 work!!!
why always with the crappy "auto start" on phone boot?
cebs said:
Works in other devices?
Click to expand...
Click to collapse
The pressure will work on any device that has a barometer (e.g. Nexus 4, Galaxy S3, etc). The temp and humidity will only work on a Galaxy S4 b/c it is the only device right now with a ambient thermometer and hygrometer.
karl999999 said:
why always with the crappy "auto start" on phone boot?
Click to expand...
Click to collapse
As I explain in the Google Play listing, the auto start permission is to run a very short service to re-set the alarm so background readings can be taken. The service only runs for a split second and then kills itself. If you disable background readings the service won't run on restart.
I am very interested in knowing how accurate the temperate sensor is working on the S4. Can someone test this out with a dedicated temperature reader and tell me how accurate it is or how off it is in Fahrenheit? Thanks.
if u can add a temp warning notification , then it will be perfect...
like i am able to set it to warn if the temp goes over xx degree..
Oh thanks mate! I got these readings, first is in my home and second is from outside. That second is littlebit weird because internet shows that there is only +4 celsius.
zige said:
Oh thanks mate! I got these readings, first is in my home and second is from outside. That second is littlebit weird because internet shows that there is only +4 celsius.
Click to expand...
Click to collapse
How long were you outside for? Perhaps the phone needed to stay outside longer in order to read the temperature correctly (away from other heat sources like yourself or the sun)?? Or worst case scenario is that the S4 temp sensor is not that accurate (we would need to find some specs on the sensors that Samsung is using).
Adjust Temperature
Is there any way to calibrate the temp sensor.?
Currently most readying are way higher than actual readings
I spent half an hour trying to find out why the thank you button is not available for me but couldn't find out why.
Thank You.Vry nice app.
zige said:
Oh thanks mate! I got these readings, first is in my home and second is from outside. That second is littlebit weird because internet shows that there is only +4 celsius.
Click to expand...
Click to collapse
u need to wait a lil longer
jsstp24n5 said:
How long were you outside for? Perhaps the phone needed to stay outside longer in order to read the temperature correctly (away from other heat sources like yourself or the sun)?? Or worst case scenario is that the S4 temp sensor is not that accurate (we would need to find some specs on the sensors that Samsung is using).
Click to expand...
Click to collapse
About 10minutes. Maybe i need to try later, but usually i'm outside only 5-10minutes when i walk to train station or to grocery shop.
Rar9 said:
Is there any way to calibrate the temp sensor.?
Currently most readying are way higher than actual readings
Click to expand...
Click to collapse
This was debated by me when I was making the app and I decided not to include it (but may put it in a future release if it is greatly demanded). The logic is that the temperature sensors are supposed to be calibrated to high accuracy at the factory and should not lose accuracy over time. Thus the "actual reading" you are referring to IS the actual reading that the thermometer on the phone is reporting. If it is higher than another thermometer nearby, it is higher for a reason (probably because of your body temperature heating the sensor, or the sun, or some other reason). The question is why fudge that?
i guess your mobile must be in your pocket.. try expose it to the weather..
prodigiez said:
if u can add a temp warning notification , then it will be perfect...
like i am able to set it to warn if the temp goes over xx degree..
Click to expand...
Click to collapse
This will be in the next release.
I've noticed that the temperature on the S4 is always higher. The reason is probably that the S4 is a heat source in itself! Unless the temperature sensor is incredibly well insulated from the rest of the phone then it will always be affected. I might test this and take a reading but only after having left the phone off for some time like 30 minutes (to let it cool sufficiently) then switch it on and take the reading before too much heat has built up in the device.

[Q] Tilt sensor is off for some apps, possible fix?

Before my Asus tf700 Infinity, I owned a Samsung Galaxy Tab. I purchased some programs and games for it, and all was well until it was stolen. The problem? Now I've downloaded and used those same apps on my tf700 Infinity, and the orientation is off by ninety degrees on quite a few. It has to do with Android's API and Honeycomb, and how the default base orientation is set in the framework policy. Before tablets, the default orientation for the Android API was portrait, but tablets made landscape defaults a possible better default. Apps not written to accommodate this would have the sensors read 90 degrees skewed for landscape default devices (like my tf700), because the sensor data is being read from landscape (regardless of orientation), but interpreted as portrait by the app. Even though my Galaxy Tab was a tablet, it's default orientation was portrait, so there was no 90 degre skew. I have read enough to know that it's possible to change the Android system default value, but it has to be changed in the framework . . . No easy task, especially if the rom is ODEXed.
So . . . anyone have any advice or fix so my paid apps aren't wasted money? I don't think emailing every single developer is the key, when I could modify a single system value to fix the problem for all apps. Thanks in advance, any help is appreciated.
Doesnt ever gyro-based app/game have a recalibration setting? Have you tried that?
Send From My Samsung Galaxy S3 Using Tapatalk 2
GrayHat137 said:
So . . . anyone have any advice or fix so my paid apps aren't wasted money?
Click to expand...
Click to collapse
You could try Ultimate Rotation Control. It can have an individual setting for each application (Forced Portrait/Forced Landscape/Forced Auto).
ShadowLea said:
Doesnt ever gyro-based app/game have a recalibration setting? Have you tried that?
Send From My Samsung Galaxy S3 Using Tapatalk 2
Click to expand...
Click to collapse
The problem is that the data the app is getting is from the sensors is rotated 90 degrees. For example, if the app assumes the tilt data it is getting is from the left and right: tilt left, go left. On my tablet, it's default boot state is landscape, so if the app is asking for the sensor info the wrong way (a deprecated way - from before the Honeycomb API), it's getting the tilt axis from the top and bottom, so: tilt up, go left. I can calibrate, but I still have to tilt up to go left.
Sounds like badly programmed apps to me. Have you tried asking the devs to update based on the correct APIs?
HeartWare42 said:
You could try Ultimate Rotation Control[/URL]. It can have an individual setting for each application (Forced Portrait/Forced Landscape/Forced Auto).
Click to expand...
Click to collapse
I had hoped it would override the default framework, but apps were still polling the sensors wrong no matter which orientation they were displayed in. The sensor data was rotating the same amount as the app, but the original sensor data was still originally off by 90%.
Thanks for the tip; Ultimate Rotation Control is a good app that solved another issue I had, just not this one.
sbdags said:
Sounds like badly programmed apps to me. Have you tried asking the devs to update based on the correct APIs?
Click to expand...
Click to collapse
Yes, that's the consensus. Some I've asked, others are no longer in active development (nostalgia for holding onto these apps). I stumbled upon a web hit while googling for answers, the solution was about changing a simple setting in the android framework, but I'm a not experienced with ADB, and things like ODEXing and DeODEXing are nerve-wracking while I learn and experiment.
Also, thanks for coming sbdags. Running Xenogenesis since late April, fantastic job! :good:
GrayHat137 said:
Yes, that's the consensus. Some I've asked, others are no longer in active development (nostalgia for holding onto these apps). I stumbled upon a web hit while googling for answers, the solution was about changing a simple setting in the android framework, but I'm a not experienced with ADB, and things like ODEXing and DeODEXing are nerve-wracking while I learn and experiment.
Also, thanks for coming sbdags. Running Xenogenesis since late April, fantastic job! :good:
Click to expand...
Click to collapse
Which part of the framework do you need to change?
sbdags said:
Which part of the framework do you need to change?
Click to expand...
Click to collapse
Navigate to the androidpolicy\com\android\internal\policy\impl folder and open PhoneWindowManager.smali in your favorite text editor (Notepad++ is my favorite)
Search for the method "rotationfororientation"
(Picture of code here)
Make note of the variables (v#) for portrait and landscape (in my case portrait is v5)
Scroll to the end of the method and you should find something like:
"move v2, v5" (make sure it's the last move command before the end of the method)
Change the second variable (in this case v5) to whatever orientation you wish to be default. In my case I have set portrait as the default orientation.
Click to expand...
Click to collapse
There are other steps, but this is the only variable changed. I can't post links yet, and I didn't want to copy all of the text there, but that's it. The attached picture is the picture of the code.
Eureka!
GrayHat137 said:
There are other steps, but this is the only variable changed. I can't post links yet, and I didn't want to copy all of the text there, but that's it. The attached picture is the picture of the code.
Click to expand...
Click to collapse
Dear friends,
As I was also facing the same problem in my Ubislate 7C+(EDGE) tab by DATAWIND. While reading your post an idea struck to my mind. With the help of Root Browser app I navigated to /system/build.prop, opened it in text editor and in "ADDITIONAL_BUILD_PROPERTIES" changed the value of "ro.sf.hwrotation=270" 270 to 180 saved it and rebooted the tablet. Yes! the problem was solved but it created a new problem that the orientation of animation while boot and camera orientation has changed now but in order to rectify it I pulled bootanimation.zip to my computer and after unzipping it changed the orientation of animation files from portrait to landscape. Changed the orientation in 'desc.txt' from 480 800 to 800 400 and zipped both without any compression. Pushed it back to /system/media and changed the permission, user,group to original one with the help of root browser. Then for camera orientation with the help of root browser I navigated to /system/etc/camera.cfg opened it in RB text editor and changed camera orientation from 90 to 0, saved it and rebooted my tablet and now all the games using gsensor tilt are working fine.
Thanks,:good:
rotation gyro off
I had the same problemen, i resolved it by going to setting, location and then status (only GPS) then i started GPS tools , just waited a min or so . now everthing is oké again.
I hope thuis helps you

[GAME][4.0+] Shape Rotate

Hi guys
I am a software engineering student, eager xda reader and in my (little) free time i like to mess around with my android phone. So i developed a little game over the last half year. It's called Shape Rotate.
I wanted to do a simple but new game, not another flappy bird clone. So finally i put the first version online in the playstore yesterday, here is a short description:
In my game you always see two equal shapes, in random rotations. Your task is to rotate the outer shape so that it is equally aligned to the inner one - once they are aligned equally tap the screen anywhere to get the next one. That sounds easy, but since time is not on your side (you gain some extra time every time you get the two shapes aligned identically) it gets really tricky once the shapes are not that obvious any more. The goal is to survive as long as you can.
It would be really great if you check it out, i would really appreciate feedback (or, even better: positive reviews )
Here is the playstore link: Shape Rotate in google play
It is of course free (no in-app purchases or what-so-ever), and i plan to add a lot more different shapes in the future! I attached some screenshots of the app, and i also added a demo video in the playstore description.
Great game. Has great potential to be a time waster. There does seem to be some lag between the shape changes that can prematurely end your game. Get that timing down and you've hit a home run.
As for some suggestions to add. Maybe have levels to unlock similar to an angry birds setup. In level one hand similar shapes with minimal colors, next thing to unlock, add another shape or two with an additional color. Thus making each level progressively harder.
ph37rd said:
Great game. Has great potential to be a time waster. There does seem to be some lag between the shape changes that can prematurely end your game. Get that timing down and you've hit a home run.
As for some suggestions to add. Maybe have levels to unlock similar to an angry birds setup. In level one hand similar shapes with minimal colors, next thing to unlock, add another shape or two with an additional color. Thus making each level progressively harder.
Click to expand...
Click to collapse
Thx for your feedback! Regarding the lags, may i ask which device you are using?
I tested it on several devices from an I9000 to my Nexus 4. The only lag i found was that on older devices it takes some time to start the game, but once it displays the first shape i haven't found any lag :s
Yes i already thought about such a thing - creating different "shape packages" and unlocking them time after time. That is definitely a good suggestion for the future and i will soon start working on this. This now is just a first version where i wanted to check out how the game mechanics work and how people react to it.
Varjo said:
Thx for your feedback! Regarding the lags, may i ask which device you are using?
I tested it on several devices from an I9000 to my Nexus 4. The only lag i found was that on older devices it takes some time to start the game, but once it displays the first shape i haven't found any lag :s
Yes i already thought about such a thing - creating different "shape packages" and unlocking them time after time. That is definitely a good suggestion for the future and i will soon start working on this. This now is just a first version where i wanted to check out how the game mechanics work and how people react to it.
Click to expand...
Click to collapse
I'm running on an N4 with KK 4.4.4 and hellscore b47, most kernel settings default.
To be sure I'm understood, I solve one shape and before the transition to the next set of shapes, there is a noticeable pause.
This is a good concept. There’s a lag also when rotating the outer shapes. Though this might be because of my slow samsung galaxy tab.
Overall, this is a good gameplay.
https://docs.google.com/file/d/0B48cqoutz8n3dDFnbTJvRm1XOVU/edit?usp=docslist_api
There should be an mp4 video to illustrate the lag.
Seems there may be an issue with the timer as well.
ph37rd said:
https://docs.google.com/file/d/0B48cqoutz8n3dDFnbTJvRm1XOVU/edit?usp=docslist_api
There should be an mp4 video to illustrate the lag.
Seems there may be an issue with the timer as well.
Click to expand...
Click to collapse
hm, well it could be that what you think is a lag is actually my poor description and/or implementation?
The playing mechanics should be: you rotate the outer shape so that it is correctly aligned. IF it is so, then you tap anywhere on the screen to "submit" it. if it is correct you get the next shapes.
(The reason why it cannot "auto submit" the moment it is correctly aligned is because then it would be trivial, you would just rotate it until it snaps in - thats why you need that extra "next shape please"-tap)
The possible rotation is actually split into 12 different angles, so there are 11 different angles with which shapes can appear.
The best way to control it is to drag with a finger on the border of the screen (or use two fingers as in normal rotation gestures). you have to drag the finger a bit until the shape snaps in to the next one.
so could it be that it's because i didn't explain the intended controls enough? If so, do you have any suggestions to improve that, or how to better explain the way to play it?
really really appreciating your feedback btw :good:
Varjo said:
hm, well it could be that what you think is a lag is actually my poor description and/or implementation?
The playing mechanics should be: you rotate the outer shape so that it is correctly aligned. IF it is so, then you tap anywhere on the screen to "submit" it. if it is correct you get the next shapes.
(The reason why it cannot "auto submit" the moment it is correctly aligned is because then it would be trivial, you would just rotate it until it snaps in - thats why you need that extra "next shape please"-tap)
The possible rotation is actually split into 12 different angles, so there are 11 different angles with which shapes can appear.
The best way to control it is to drag with a finger on the border of the screen (or use two fingers as in normal rotation gestures). you have to drag the finger a bit until the shape snaps in to the next one.
so could it be that it's because i didn't explain the intended controls enough? If so, do you have any suggestions to improve that, or how to better explain the way to play it?
really really appreciating your feedback btw :good:
Click to expand...
Click to collapse
I may not have read it if you wrote it. When initially testing something like this I go for intuitive. The extra tap isn't.
What about doing the the auto next based on a touch release. You know when the shape is being rotated, the screen is being touched. Can you detect when a finger is removed? There would be no more rotation and wouldn't allow just spinning randomly to get it to snap as you describe.
EDIT:
Looking it up it's called a touch event using MotionEvent class with ACTION_DOWN and ACTION_UP
ph37rd said:
What about doing the the auto next based on a touch release. You know when the shape is being rotated, the screen is being touched.
Click to expand...
Click to collapse
That is actually a quite interesting suggestion! I tried it out, and it feels kind of nice. it also makes the game easier, maybe i have to reconsider the additional time gain... I created a debug build, would be nice if you would download and try it and tell me what you think ( you have to deinstall the appstore version first, since this one is signed with my local debug key)
It now checks the correct alignment each time you lift your finger from the screen.
Edit: i think that is a gamebreaker because it makes the game way to easy. you just have to swipe very quickly on the border, and due to the "auto" check you always get the alignment correct very quickly.
another version would be this one. here it is also checked on touchUp but if the alignment is wrong it jumps back in the initial state. that makes it even a bit harder, but also requires more focus and looking.
what do you think?
OK, going to leave this one up to you. I didn't catch a difference between the two in how they play. The first one appears to be snappier and jerky, as opposed to the second one being smoother and slower.
Either way, you nailed what I was saying. What do you think? I think this is far more intuitive. Now you just need to figure out the levels of difficulty.
The ultimate would be to have the shapes and colors auto generated with random attributes. You would not have to map anything out, the app would automagically create them.
Ok i found some issues that caused the touch input to be way to sensitive or way to unresponsive - that fixed i got some feedback that the overall control is way better now (especially on high res devices).
ph37rd said:
Either way, you nailed what I was saying. What do you think?
Click to expand...
Click to collapse
I still like the idea, but it brings some new issues that i need to figure out. Once you got the current control mechanism people don't think to much about it - so i'm not quite sure if it is really that much benefit. I will test that out over the next iterations and try gathering more feedback (about the current control and about how much people think it's good/bad).
ph37rd said:
The ultimate would be to have the shapes and colors auto generated with random attributes. You would not have to map anything out, the app would automagically create them.
Click to expand...
Click to collapse
That is the second big point on my todo list. but i don't really know how to start.
The best way that comes to my mind is to define different "base shapes" that are then just colored randomly. but that again would require alot of different base shapes to keep up a good variety?
at the moment i add hand drawn shapes with each update (around 170 now and using .gif its not that of a size problem anymore)

[APP][OPEN SOURCE][ROOT][5.0+] Night Light (KCAL)

Night light is an open-source app which uses KCAL to adjust blue light intensity of the display colors, so that viewing the screen at dark becomes pleasant for the eyes, and help you fall asleep faster (this is what science have proven so...).
Features
Easy to use user interface. Settings are easier to find.
Uses KCAL to adjust screen RGB colors, hence its efficient and changes are seen everywhere on screen.
Supports older KCAL implementations as well as newer KCAL implementation for v4.4 kernels.
Simple color controls for normal users through color temperature control.
Manual KCAL controls for advanced users.
Automation routines lets you define routines where you specify Night Light settings which you wish to apply, and they will be automatically applied for you in specified times.
Intensity fading in/out is supported as part of automation routines.
Supports sunset/sunrise timings.
Set on boot delay.
Original KCAL settings of user is backed up and applied when night light is turned off. And it can be configured as well.
Support for user profiles, which are collections of settings that user can apply with one click.
And to fulfill your all kinds of automation needs, app is supported as a Tasker plugin. You can use it with Profiles.
Option to automatically disable Night Light in lock screen, and turn it back on after the device is unlocked.
Quick Setting tile for easy toggling on/off night light anywhere.
Launcher icon shortcut for toggling Night Light on/off and toggling intensities.
Dark and Light theme.
Advantages
No overlays.
Background service is only used for lock screen option. The entire automation (including the fading) is done using neat AlarmManager tricks (which not only is battery friendly, but memory friendly as well).
Requirements
Kernel supporting KCAL.
Root access.
Download
Source - https://github.com/corphish/NightLight
Wow. Thanks for this awesome app. This is my best daily night light app.
Thanks
sounds good
let me have a try brother......
corphish said:
Night light is an open-source app which uses KCAL to adjust blue light intensity of the display colors, so that viewing the screen at dark becomes pleasant for the eyes, and help you fall asleep faster (this is what science have proven so...).
Features
Easy one touch toggles, with a single slider to tweak blue light intensity.
Quick Setting tile for easy toggling on/off night light anywhere.
Automatic switching on/off night light at user specifed timings. (Limitation - Start time must be lesser in value than ending time, that is if you choose starting time at 2300 hrs and ending time at 0600 hrs (next day) it won't work for now).
Requirements
Kernel supporting KCAL.
Root access.
Download
Source - https://github.com/corphish/NightLight
Click to expand...
Click to collapse
The automatic switch doesn't seem to be reliable. Could you add intents so it can be toggled with Tasker? I already have a profile that triggers at sunset so that would be perfect.
Sent from my Nexus 5X using XDA Labs
Great app, thanks. Have been using CF.lumen until now, but that seems unsupported (and is closed source).
Please keep improving it. Would also like to donate a beer.
Can you explain whats this KCAL thing ??? ??
thanks for this app apreciate it i got ADD and Slightly Autism and i already have an issue sleeping my brain get supercharged and i can't get to sleep but this app helps [email protected]
Loving the app so far, however, I notice it won't trigger at the time I have set unless I manually open the app. I've removed it from Android's battery optimization so I don't think that can be it. Any ideas?
rickysidhu_ said:
Loving the app so far, however, I notice it won't trigger at the time I have set unless I manually open the app. I've removed it from Android's battery optimization so I don't think that can be it. Any ideas?
Click to expand...
Click to collapse
Same here. I forgot to report it. I use Tasker to launch it at sunset & sunrise along with switching between dark / light app themes.
Sent from my Nexus 6P using XDA Labs
yochananmarqos said:
Same here. I forgot to report it. I use Tasker to launch it at sunset & sunrise along with switching between dark / light apo themes.
Click to expand...
Click to collapse
I ended up doing this as well! Now the other thing I'm hoping gets implemented is a smooth transition to the orange hue.
zaibansari20 said:
Can you explain whats this KCAL thing ??? [emoji848][emoji848]
Click to expand...
Click to collapse
Kcal is a kernel tweak that lets you customize colors at lower (kernel) level, so there won't be any filter or layer on screen, but in most stock kernels it isn't available, so you have to find a custom kernel for your phone/rom that has it.
Thanks for the app, but I've used tasker with the command "echo 180 75 35> /sys/devices/platform/kcal_ctrl.0/kcal" for a long time (echo 256 256 256 > /sys/devices/platform/kcal_ctrl.0/kcal to get the color back.)
Obviously you can change the values to whatever you want.
But the app will be much more easy for many people
Envoyé de mon ONEPLUS A5000 en utilisant Tapatalk
J0kker said:
Kcal is a kernel tweak that lets you customize colors at lower (kernel) level, so there won't be any filter or layer on screen, but in most stock kernels it isn't available, so you have to find a custom kernel for your phone/rom that has it.
Click to expand...
Click to collapse
I'm using LineageOS with a custom kernel which allows mein to change RGB values from any kernel modification app...
Sent from my LG G2 using XDA Labs
zaibansari20 said:
I'm using LineageOS with a custom kernel which allows mein to change RGB values from any kernel modification app...
Click to expand...
Click to collapse
So it should work for you, you can try with a kernel manager like kernel adiutor but the app should work.
J0kker said:
Kcal is a kernel tweak that lets you customize colors at lower (kernel) level, so there won't be any filter or layer on screen, but in most stock kernels it isn't available, so you have to find a custom kernel for your phone/rom that has it.
Thanks for the app, but I've used tasker with the command "echo 180 75 35> /sys/devices/platform/kcal_ctrl.0/kcal" for a long time (echo 256 256 256 > /sys/devices/platform/kcal_ctrl.0/kcal to get the color back.)
Obviously you can change the values to whatever you want.
But the app will be much more easy for many people
Envoyé de mon ONEPLUS A5000 en utilisant Tapatalk
Click to expand...
Click to collapse
I tried the Tasker method and it works great. I had no idea that command existed and could be used in Tasker. Thank you for sharing! :good: :highfive:
rickysidhu_ said:
Loving the app so far, however, I notice it won't trigger at the time I have set unless I manually open the app. I've removed it from Android's battery optimization so I don't think that can be it. Any ideas?
Click to expand...
Click to collapse
Does it fail to trigger if a reboot had happened sometime before the time it should have triggered?
For example, if it was to trigger at 5pm, but a device reboot happened in, say, 3pm, then does it fail to trigger at 5pm?
Anyway, set on boot is broken (again), will need to fix it, but normal timers should work fine.
corphish said:
Does it fail to trigger if a reboot had happened sometime before the time it should have triggered?
For example, if it was to trigger at 5pm, but a device reboot happened in, say, 3pm, then does it fail to trigger at 5pm?
Anyway, set on boot is broken (again), will need to fix it, but normal timers should work fine.
Click to expand...
Click to collapse
Ahh, that might be it. I think it stops working after a reboot, so I'd be going back into the app to get it going again.
Very minor issue though, great app - thank you for your hard work!!:highfive:
corphish said:
Does it fail to trigger if a reboot had happened sometime before the time it should have triggered?
For example, if it was to trigger at 5pm, but a device reboot happened in, say, 3pm, then does it fail to trigger at 5pm?
Anyway, set on boot is broken (again), will need to fix it, but normal timers should work fine.
Click to expand...
Click to collapse
Launcher shortcut (toggle on/off) switch is also seems somewhat broken, it toggle on but fails to toggle off.
@jineshpatel30 @rickysidhu_
Here is an experimental version (in the attachment of this reply), with launcher shortcut toggle and set on boot fixed.
The reason why it is experimental :
- Now written in kotlin
- Uses some of the new stuff announced in I/O 18, like ktx and the new material design style
- Uses different font called 'Acme'. (Feel free to suggest fonts)
- I decided to ditch cards because normal layouts look better in this new style.
Source - https://github.com/corphish/NightLight/tree/p
corphish said:
@[email protected]_
Here is an experimental version (in the attachment of this reply), with launcher shortcut toggle and set on boot fixed.
The reason why it is experimental :
- Now written in kotlin
- Uses some of the new stuff announced in I/O 18, like ktx and the new material design style
- Uses different font called 'Acme'. (Feel free to suggest fonts)
- I decided to ditch cards because normal layouts look better in this new style.
Source - https://github.com/corphish/NightLight/tree/p
Click to expand...
Click to collapse
It kicked in automagically at sunset tonight which reminded me to come back and comment. That was unreliable previously.
What does the save button do at the bottom? I assume it saves something, but there's no toast message to acknowledge it's been pressed.
I don't like the font, myself. Since you're going for new and fancy code and styling, why not use ProductSans? I like the new font used in the Wear OS app, I think that's it.
Could you add the numerical values for the sliders for more accurate fine tuning? I like the way the new XDA Navigation Gestures app does it. It's in the latest beta posted in the thread and should be pushed to the Play Store soon.
Since CF.lumen is EOL now, this app is going to be a great alternative especially when it eventually breaks.
Thank you!
Sent from my Nexus 6P using XDA Labs

Categories

Resources