Here’s something to ponder:
- You are a very passionate mobile app developer working on a set of trending mobile apps
- You are very cautious about your codes – proper handling of exceptions, rigorous testing, everything that you can think of to maintain the high quality of your apps, every . single . possible . area
- You are confident and publish the apps … hooray!
- But … you start to see your loyal users mentioning your app throwing errors that you thought you might have caught and witness some slight downward installation trend of your apps
- You tell yourself: Noooooo … this can’t be happening!
- Hmmm … what went wrong here?
Here is an interesting technology for you Android app developers out there. We now have a logging library for Android mobile app developers to allow better visibility of their app; particularly to address the instrumentation of crash logs. The combination of this logging library and Splunk Storm provide additional value to mobile app developers to quickly diagnose any potential runtime errors.
In other words, consider the logging library and Splunk Storm as your reliable friends in addition to your typical friends whose names are “ddms”, “logcat” and “Traceview”. In essence, this is how the logging library helps mobile app developers: any uncaught exceptions will be handled and then sent to Storm for further analysis.
Bottom-line, no more guessing what kind of errors that end users experience with your mobile apps on their Android phones. Ensure the highest quality of your apps by harnessing the realtime analytics Splunk Storm provides. These are the steps to fully integrate this logging library into your wonderful mobile apps.
[1] Get a Splunk Storm account by registering yourself here: https://www.splunkstorm.com
[2] Create a Storm project and obtain the STORM PROJECT ID and STORM ACCESS TOKEN at the STORM REST API page:
[3] Then download the logging library either from SplunkBase (http://splunk-base.splunk.com/apps/78613/mobile-analytics-with-splunk-storm-android) or from github (https://github.com/nicholaskeytholeong/splunk-storm-mobile-analytics/blob/master/android/splunkstormmobileanalytics.jar)
[4] Include splunkstormmobileanalytics.jar into your project. This is how you can simply do it: move the jar file into libs directory of your app project
[5] Allow the Internet permission between the <manifest> tags in the AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
[6] Add the import statement into the main activity of your app
import com.storm.android.Storm;
[7] Connect to Splunk Storm in the onCreate() method of the main activity
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Storm.connect("STORM_PROJECT_ID", "STORM_ACCESS_TOKEN", getApplicationContext()); /** * your other wonderful codes to develop your wonderful mobile app **/ }
[8] Congratulations! With just less than 5 lines of codes, SplunkStorm is now integrated seamlessly into your wonderful Android mobile app.
This is a sample snapshot of how the stacktrace looks like in Storm upon the triggering of any uncaught exceptions from an Android emulator
Amazing isn’t it? And you are on the quest to build more and more popular apps with much confidence.
iOS developers, you won’t be left behind, there will be a logging library for you soon
Ok … to wrap up, what should we do after reading this article about logging library for Android apps and Splunk Storm?
- Create a Splunk Storm project at https://www.splunkstorm.com
- Download the jar file either from SplunkBase (http://splunk-base.splunk.com/apps/78613/mobile-analytics-with-splunk-storm-android) or from github (https://github.com/nicholaskeytholeong/splunk-storm-mobile-analytics/blob/master/android/splunkstormmobileanalytics.jar)
Give it a try and tell us your experience integrating it into your mobile apps. Feedback and suggestions are welcomed!
Interested about forwarding the crash logs into Splunk Enterprise? Check out here http://blogs.splunk.com/2013/03/13/mobile-analytics-with-splunk/
“Enterprise, Developer, Cloud, Content” APPS-olutely