Angular History

Angular is an open source web application framework created and maintained by Google. Angular was first released in 2010, and has since seen several major releases. Angular is often used to create single-page applications, with its use of routing and components.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Android battery keeper

Own test stand with mobile devices is awesome. Especially, if there are continuously running tests. Might endlessly looking at fire, water and mobile auto-tests (but it is not exactly).

Unfortunately, everything has a shelf life and this we can’t escape. Someone chooses cloud solutions, trying to run down from this fact. I in turn will consider the opportunity of extending the life of mobile devices from a solution with a stand. Maybe not for long, but still noticeable.

If the iOS devices show themselves from the good side in the severe conditions of the perpetual motion machine, then the devices with Android platform quickly inflate their tummies:

It is easy to guess that the devices swell after permanent charging when live on a test stand. Whether there are plastic or metal cases, usb 2.0 or type-c, a ventilator or air conditioner, doesn’t matter.

The first thing that comes to mind for saving hard-workers is to unplug them from charge. Yes, we might plug device to PC via wi-fi, but here we run into two problems:

Developing our first thought, about unplugging devices — that would be great if it is possible to unplug the device, until it itself asked for recharging. Google offers us the opportunity to emulate the disconnection of the battery on the device out of the box, via adb:

The main word here is “to emulate”.

Good news:

Bad news:

Actually, we can still implement this task, but for this we need super user privileges. I won’t be tell, how to install SuperSu on Android. There are quite a lot of discussions and step-by-step manuals about it in free access. The only thing I will say is that there is nothing terrible for testing here. This hack won’t be affect on user cases at all. Android will be the same as at past, just on the steroids. So, let’s start hexing.

We will also perform basic manipulations via adb:

The path to the file with the status of the battery can vary depending on the device model. I showed the most common value (hit about 95% on pure Android without shells).

Now I would like to sculpt from it a small service that will support the (life or level? 🤔) of battery power on our devices, when it will necessary. Rumored that the optimal battery charge for the mobile devices is about 50%. The answer to the ultimate question of Life is somewhere near:

The script has written in Ruby and claims a good mood. Putting it on our CI and running about once an hour, we can greatly reduce the load on the batteries of our test devices. Via it we request all the connected Android devices and get the current percentage of the charge. If it is less than 42 — we turn on the charge, if it is greater than 42 — we turn off the charge.

In order not to scare our auto-tests with a disabled screen, you can turn it on before starting them:

I hope that it was interesting. So long, and thanks for all the fish. See you in the following notes (:

Add a comment

Related posts:

Accenture to help develop UAE payment system

Accenture has been selected by the Central Bank of the UAE (CBUAE) to lead a consortium of companies to help execute its National Payment Systems Strategy. In collaboration with SIA, now part of Nexi…

Official Day 1 of My UXD Journey

Introduction! My name his Joseph Wood, I’m 23 years old (Until August 20th), and I’ve just started my official journey into UX Design. Classes officially begin today on June 18th 2018, and I can’t…

How one random discussion helped improve an important metric by 3x

It was a cold foggy night in Gurgaon. A bunch of us from the Wynk team were talking about the shift that entertainment consumers in India are going through. Most were moving from the traditional…