How to Become a Lazy but Productive Android Developer, Part 2
How to Become a Lazy but Productive Android Developer, Part 2
Join the DZone community and get the full member experience.Join For Free
Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.
In my previous article, we explored dependency injection and the RoboGuice library. Today I want to talk about a tool which is great for testing and development.
I have been developing android since 1.5 and I have seen days and nights of Android and its emulator speed, but yes I agree that its improved a lot over time, but it's still not as great and smooth as we developers want. I am sure most of you Android developers have also tired by starting native emulator and seeing Loading… screen and then the less responsiveness and smoothness of native Android emulator. (Yes you can load emulator from snapshot)
One more thing, as I have worked on Windows app development I have seen the speed and performance of Windows phone emulator. Unfortunately, I haven’t worked on iOS platform yet, but I have seen the performance of iOS simulator. So if we compare the performance and smoothness of iOS and Windows simulator, we can say Android emulator is running like a tortoise!
(I agree with the fact that Android OS is a separate OS required to be emulated for testing android apps but I believe that every problem has a unique solution ) So the solution to achieve performance and binary differences is to have Virtualization.
So today I want to write on the Genymotion emulator, which I have been using since its launch and I have found very much productive. I have shared this in my almost all the talks since its launch and the participants has really enjoyed. So I thought to share it with TechnoTalkative readers.
Genymotion Emulator – The Faster Android Emulator
Q: Do you want to give App demo without a real phone or tablet?
Q: Perhaps you are a developer and want a convenient way to test app?
For both the above cases, there is a simple solution: Genymotion
It’s a faster Android emulator for app testing and presentation. You can control simulated sensors like battery, GPS, accelerometer with the user-friendly interface, it includes powerful command line tools that allow you to build complex tests.
Free and open source
t was actually a Beta and now a commercial release of the previous work of the open-source AndroVM, aims at providing a “as good as possible” support to run Android in Virtual environments. So It’s free and open source, earlier it was fully free but now there are some paid services, but the Free version is pretty complete and there are some free features which are pretty interesting as well, for example: Battery widget, GPS Widget and Camera widget.
Technics and EmulationI assume you are aware about VirtualBox and you have already played it with sometimes earlier, if not then you can read more about in the given link. Genymotion emulates Android OS in your machine by using VirtualBox and that’s reason its very responsive and faster than the native emulator. You don’t need to load emulator again from the scratch if you have started and used emulator once but it starts from the previous state. It’s like “Loading from snapshot” feature of native android emulator.
FYI, earlier Genymotion providing Google Apps bundled emulator and as such user was able to download apps and play games from Google play store too but with Genymotion 2.0.0 released on 13th November, Genymotion now doesn’t include Google Apps and ARM libraries support anymore. For Google apps, they are still trying to work with Google to add them back. Read more: Genymotion Changelog.
But yes officially they have stopped giving Emulator bundled with Google apps, but here I have found a Stackoverflow answer which is on How To Add Google Apps and ARM Support to Genymotion v2.0+.
Along with speed and performance, there are some other unique features Genymotion provides:
Cross Platform availability
As its based on the VirtualBox, its available in Windows, Mac and Linux. You don’t need to do any setup but just a download from Genymotion site and a Genymotion account to download different versions emulator.
It controls simulated sensors like battery, GPS, and accelerometer with a the user-friendly interface. Let’s say for example you are developing GPS-based android app and you would want to test different locations, then you just need to drag and drop and it moves map with appropriate location and the same if you would want to move your markers from location X to location Y.
Google Play Services support
To test your app when using the Google Play services SDK, you must use either:
- A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
- The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
So here Genymotion provides some of the ROMs bundled with Google play apps and it works same like real device. I remember testing days of an app in which we have used Google Map API V2 and we had used Genymotion for the testing purpose.
Perfectly Integrates in your development environment
Genymotion provides a simple and clean UI to create a new virtual devices. Either you can use this software separately or you can install Eclipse or Android Studio/IntelliJ plugins.
- Having faster emulator doesn’t means it helps you to code fast or you don’t need to test on real device. It just helps you to develop and test app in rapid manner.
- Android 4.4 version is not available yet. For any query, you should contact the Genymotion team.
- Currently they are still developing some ROMs, testing it and fixing minor/major bugs.
Genymotion is a faster Android emulator which you can use for developing, testing and even presentation, too. It provides a control for simulating sensors like GPS, battery widget and accelerometer.
Since the beta, it has released its first commercial version with Genymotion 2.0.0, but it still has some bugs and issues to be fixed. However, I would suggest this emulator to use with your Eclipse or Android Studio/IntelliJ IDE to develop/test app or its prototype in a rapid manner.
Get ready for next!
Published at DZone with permission of Paresh Mayani . See the original article here.
Opinions expressed by DZone contributors are their own.