Category Archives: APP

How to create your own Android Virtual Device in order to test your app created with Android Studio?

Android Virtual Device (AVD) is meant for Android Studio, to test out the apps into a new phone so as to realize complete android virtual environment. In the upcoming series of tutorials, we will be learning about coding and other aspects. Prior to learning of Android Studio coding, t is important to learn all of these elements so that in the future when all of these are going to be implemented inside Android Studio there would be nothing difficult for you to attach and execute android apps.

There will be no confusions for you when you run apps and its related coding. In this tutorial, we will be learning about how to create our own AVD. In order to create AVD, we do need Android Studio (AS). First, click on the icon namely ‘AVD Manager’ which manages all of ours Android virtual devices at a single location.

After clicking on another window ‘Android Virtual Device Manager’ window will open. Now, in this Device manager earlier I had created two android virtual devices. One is ‘myAndroid’ which I have created from ‘Nexus 5’.

The original device manager is Nexus 5 and in order to keep the default settings intact, I have created another device from it so that even if when we simulate app on another device say here ‘myAndroid’ then, of course, the default settings of Nexus 5 will remain intact.

Now we are going to create the copy of the existing android virtual devices. Instead of editing the original one we will like to develop and create the copy of the device so that the original settings of the device remain as usual. From left side down of ‘Android Virtual Device Manager’ click on ‘Create Virtual Device’. The next window should pop up as ‘Select Hardware’ and then choose the device definition.

Here you will be given the choice of devices. Here we will choose ‘Nexus 5’. There is no compulsory to choose this device. You could choose any of these devices. Then go to the extreme right-hand side and below were written as ‘clone device’ and click on to it.

This simulator will clone the device of ‘Nexus 5’ and thus the original device configuration of ‘Nexus 5’ seems intact. Now ‘configure hardware profile’ window will open.

Here we will like to modify the RAM settings. In the original Nexus 5 device, the RAM setting is 1536 MB and we would like to reduce it so that simulator will work perfectly without taking too much load on system RAM.

In ‘Memory’ segment of ‘Configure Hardware Profile’ change the RAM into 1000 so that we could run the Nexus 5 modified device within 1000 RAM.

Then click ‘Finish’ and now inside ‘Select Hardware’ profile we have the new device named ‘Nexus 5 (Edited)1’ and then from the right-hand side and below of it click on ‘Next’.

Now, you will be reaching to another windows namely ‘System Image’ and here you will go to select Android Operating system images. If you have AMD processor then it is better to select or download ‘armeabi-v7a’ of Android 7 or Nougat. It should be there on the ‘Select a system image’ and inside ‘Other images’.

If your computer has Intel processor then you could choose from the list of recommended android system image from ‘Recommended tab’, Then click on ‘Next’ to reach to next window namely ‘verify configuration’. In the ‘Verify Configuration’ in the ‘AVD Name’ change the ‘Nexus 5(Edited)1 API 24’ to any of the names such as ‘MyEmulator’.

Verify Configuration

Here, we can find information related with which device is edited and which android system image and in this case we have installed ‘Android 7.0 armeabi-v7a’ and then the startup orientation of android device should be portrait or landscape, here we should select ‘portrait’ and make emulated performance of graphics to be set on ‘Automatic’ and it is your choice to enable or disable ‘Device frame’.

Device frame is the hardware side of viewing angle. You can expand ‘show advanced settings’ to go for advanced configuration but in most of the cases, this is not necessary. Then click ‘Finish ‘to return back to ‘Your Virtual Devices’.

Now, we reach the main windows of listings of virtual devices. Here, you will find our new android device such as ‘myEmulator’ and here you will see we have ‘Android 7.0’ arm central processing unit with 650MB RAM as we have distributed, 1000MB RAM as we would expect the system had taken 350 RAM so for the sake of other performs we have now 650 MB RAM.

In this way, we have created successfully our new android device namely ‘MyEmulator’. We can launch this AVD in emulator through the arrow button at the end of the name of the emulator. Click it and wait for sometime to the emulator to work.

Launching of emulator takes time in accordance with the speed of your computer and hardware configuration of the computer. Within some time one Android device will come up in a separate Window.

We have created a new AVD and launching of this AVD do take some time for the first run and subsequently, it does not take that much time to run from the second run onwards. While opening up android simulator two or more processes does run in the background and that can be seen from the footer of Android Studio.

After AVD runs and then gradle device runs and then the background process is waiting for the target device to come online which means the apps which we have just built within Android Studio will slowly be converted into apk files and then run within these console or android simulator.

Android files are apk files which are similar to that of dot exe files of windows computers. Sometimes running of preview do take longer time due to presence of infinite loops inside app and for this it is important to refresh the layout so that running and launching of app should come out within seconds inside of android app and it is important to run the android simulator once again without closing the window of android simulator in order to launch the entire android simulator and its functioning.

In the second series of the launching of simulator the installation of APK which is the form of the app which we have constructed, should take some time and after that you could see your app is running inside the simulator. Which means this will be the prototype of our app with android 7 which should be compatible with all the other android versions up to android 4.01.

In this simulator, we have completely new android 7 which work in the normal way, and most of the normal android works can be done and with its stacked android web browser even one can browse the internet and do other forms and this means it is a complete Android system.

In this way we can run ours android app and see how it is performing and that means in a completely wonderful way we can see and find, how ours apps are performing in an better or inferior way so that ultimately, we do not have to go to physical android device and then test side by side how ours app is running and instead we do not have to search for android 4, 5,6,7 devices as we could do this all here with this simulator and in the future we would be reading about how to create log files, and then see how the functioning of app is there with complete and clarity in finding out how the app is performing.

Greenify Wakelock

Since Android 6 application battery management known as application power saving which can save battery power by managing power sources of app efficiently so that, it consumes less battery output. It comes under auto power save mode such as always or automatic. Most of application power saving processes comes under battery optimisation process and saves battery life efficiently.

Most of older versions of the android, does not have efficient application management, thus most of the apps runs in background and stays there. Most of the rooted Android device has this facility. older Android operating systems do not imply this. Greenify is a good option, and it is a wakelock and works nicely with older Android devices.

How Greenify Works?

Greenify works with rooted android devices. You can download it from Google Play Store. It has free version and paid versions. Google in newer android versions introduces Doze mode which works like, the app running and when it stops it also stops all its important battery consuming apps.

Greenify Wakelock is a good idea to use its older version of the Android. It speeds up device which has one GB of RAM. When wakelock detector detects that Greenify employs almost 16 percentages of time to wake the device and the app itself is consuming higher amount of her battery.

There is no option inside Greenify app to disable it. Now, the question arises whether use of such app is saving battery life or eating out battery rapidly. It runs the phone is rapid manner there is no doubt as within lesser RAM devices, it stops apps and this makes phone perform maximum.

Then another question is whether, stopping apps abruptly of course without root is going to majke phone good or weaken phone further which is slowly not getting security and culminative update due to older android operating system.

It is all about identifying battery draining apps and then allowing wakelock such as Greenify without root to work it and stops that apps still the users allow it. It is simple but older operating system does not have such permissions and capacity to handle such requests.

In the long run, it might make such an the operating system vulnerable to stop when such wakelock are there for longer durations. From Android 6 and on, android has its own battery management such as Doze which recognises application consuming batteries automatically and then stops these apps when these are not in use.

Greenify vs Doze

It is definitely the most advanced methods to treat and find such processes where with Greenify you need to identify such processes and then allow these to stop with Greenify. You need to provide Device Administrator right to Greenify to work and in addition to it you need to allow various other permissions to work it.

Doze mode can appear and work with Android 6 or later. It cannot work with older android versions. Greenify works nicely with older than well as newer android versions. Greenify works nicely when the device is running. Doze works only when the device is in the state of hibernation.

Greenify works nicely, and it empowers users to hibernate app only when it is not running. It works when the phone is in the state of idle or when device automatically locks. It automatically stops these apps and hibernate it automatically.

Greenify is not for standard users. It is for geeks. You need to distribute it and allow devices to determine which app to run in the background and which app to stay in the state of hibernation. In android 4.4 it drains batteries, but it speeds up the phone. Most of android 4 devices come up with 1 GB of RAM. Greenify works nicely, and it performs high speed phone functions.

In these android devices DOZE mode is not there. With Greenify, most of functions related with app perform rapidly. Though, due to wakelock of device in order to hibernate each app this consumes battery. On the other hand app management gets nicel boost with it.

Doze does not hibernate system apps. Greenify paid versions can hibernate system apps. In this way, it is unique. With its paid version, the hibernate app can show notification. Normally, in Doze mode this is not there but with android 8 and above with doze mode hibernate app show notification though in the previous version of android such as android 6 and android 7 this facility is not there but with Greenify this is there.

1 2 3 4 5