Caffeine gives Android development a kick
(Image Credit: Zach Inglis)
Android, as well all know, is a mobile OS which now powers the biggest percentage of smartphones in the world. Part of its rapid-growth is due to Google's embrace of open-source software and technologies, allowing the web giant to remain on the cutting-edge of the latest innovations.
Percolate is a software company which wants to give something back to the open-source community through the release of a brand-new Android utility library called “Caffeine” which helps to speed up the development of Android applications.
Caffeine is no longer just a stimulant which helps us get through the day; it also helps us to ship software faster than ever.
Caffeine achieves this by making simple (but often code-heavy) tasks accessible and bug-free through providing a rich set of code utilities which shortens the amount of code you have to write and maintain in your applications. It also helps developers to follow the recommended DRY (Don't Repeat Yourself) approach to programming through preventing code duplication.
The expert coders over at Percolate have been using this library for their internal-use for some time; which means it has been tested and shaped to perfection. Good exception handling means Android apps will be more stable and prevent crashes for a better user experience.
Eight classes are available in Caffeine as of writing; ActivityUtils, CountUtil, DialogUtils, MiscUtils, PhoneUtils, StrictModeUtils, ToastUtils, and ViewUtils.
CountUtil - contains methods to get a number formatted into a shorter representation such as "9.1k" instead of "9100".
DialogUtils - contains methods to create an alert dialog (and a listener to close it.)
MiscUtils - contains a variety of mundane but useful utilities for; dip to px conversion, getting application name from Manifest file, getting the Android version number, getting the Android version name, and a method for checking if an email address is valid.
PhoneUtils - contains methods to check the status of phone functions such as whether rotation lock is enabled, whether the device is connected to Wi-Fi, connected to a mobile network, or has either form of connectivity.
StrictModeUtils - provides a method to enable 'Strict Mode' which is used for developer builds to detect when you may be doing something by accident; such as accidental disk or network access.
ToastUtils - contains methods for two different types of "toast" messages. One for shorter messages which disappear quicker, and another for longer messages which allow users a bit longer to read the message.
Caffeine is no longer just a stimulant which helps us get through the day; it also helps us to ship software faster than ever. This is just the beginning for Caffeine, Percolate intends to shape and add to the library in the coming months, so keep an eye on their blog for updates.
Do you intend to use Caffeine for your Android development? Let us know in the comments.