Most of the android challenges are related to the coding process: inconsistencies in the API, hidden functions, limitations, a special style of programming for the platform. There are also stones that lie a little further away: testing, and automatic optimization, creating clip art and icons, receiving automatic crash reports.
Android coding challenges
In this article, we’ll explore the challenges of Android development in the context of utilities and tools. If you still have questions or want to order an individual development, follow the link Android development services by Dataxdev.
1. Slow emulator
To test the raw app for functionality, the Android SDK includes an emulator. For a long time, it was reproached for its slowness, but with the release of Android Studio 2.0, the situation has improved a lot. The X86 version of the emulator has received hardware acceleration, so now it works faster than real devices. In addition, it has a user-friendly graphical interface with which you can simulate calls, SMS, change GPS data, and network failures, that is, everything that previously had to use command-line tools. You can find even more ideas on this topic on Dataxdev.
2. Debugging on a real device
The second stage is testing on a physical smartphone. In this case, the device must be kept connected to the PC with a cable. Android Studio (or rather, the ADB utility that it uses to communicate with the device) supports networking. But this function needs to be activated.
3. Libraries
At the stage of developing the interface and widgets, you will need external libraries that implement various interface concepts, programming patterns, and communication with external services. The most complete library catalog is Android Arsenal. A convenient search and sorting by rating are available, for each library there is an instruction on how to connect it to your project, including using the standard Android Gradle build system: just add the repository to the project’s build.gradle file and specify the library in the list of dependencies.
4. Icons and clipart
The icon can be generated. There is a wonderful web service Android Asset Studio, with the help of which in just a couple of minutes you will get a beautiful icon in all possible resolutions. As a basis, you can take a prepared picture, just write a text or, what is best, choose from the clipart provided by the service. You can also set the icon style (round, square, iOS style …), color, adjust shadows, and other parameters. The same service allows you to create icons for the ActionBar and the status bar.
5. Crash reports
To test a product on different devices of different people, you need a crash reporting system. There are a huge number of such, and they all implement the same principle of operation:
- A small library is connected to the application, which at the time of the fall records the stack trace and other data about the fall;
- The application sends them to the server;
- A special web interface generates beautiful and visual reports on their basis.
One of the most popular such systems is Fabric, but we recommend Splunk MINT: it’s free, simple and easy to integrate into your application (just add one line of code).
6. Testing
The best-automated testing service is Xamarin. It allows you to run the application on two thousand virtual devices, perform user interaction operations (taps, gestures, swiping, pressing physical buttons), change the position of the smartphone, turn on the camera, and much more. In response to each action, you get a screenshot, as well as statistics on the consumption of memory, processor, and other things.
The only problem with Xamarin is that you will have to write the tests yourself using the Calabash framework, that is, in fact, write another application (in Ruby or C #) to test the first one. The service itself is, of course, paid. The trial period is 30 days, after which you will have to pay from $ 100 per month. On the other hand, Calabash is an open-source project, so everything can be configured on a local machine.