
android-remote-stacktrace
Remotely log unhandled exceptions in your Android applications.
Client side usage
Download the latest trace.jar file found here. Drop it into your Android project and in the properties for your project add it to "Java Build Path" -> "Libraries".
In your android manifest, you must enable internet access for your application:
<uses-permission android:name="android.permission.INTERNET" />
In the onCreate method of your activity or in your service, you must call public static boolean register(Context context)
found in the class ExceptionHandler
. Do something like this:
ExceptionHandler.register(this);
Server side installation
The default implementation will post the stack trace to http://trace.nullwire.com.
If you would like to store your stack traces on your own server, you will have to register the exception handler like this:
ExceptionHandler.register(this, "http://your.domain/path");
At http://your.domain/path
the client side implementation will expect to find this simple PHP script, which will take three POST parameters: 'package_name', 'package_version' and 'stacktrace'. The collected data is simply stored in a plain text file. You can extend the script to send you an email with the stack trace if you like - just uncomment the last line and change the email address.
Building the JAR
The JAR may be built by issuing the following command:
ant jar
This will produce a trace.jar
file.
Cleaning up is done by:
ant clean
Support
If you have problems, feel free to drop me a mail at mads.kristiansen@nullwire.com.
Additional information
How to integrate stack trace collection with Redmine: http://nullwire.com/capturing_android_exceptions_remotely.
Contributors
Thanks to these people, who contributed with code changes and/or bug reports.
Glen Humphrey, Evan Charlton, Peter Hewitt
License
The MIT License
Copyright (c) 2009 Mads Kristiansen, Nullwire ApS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Project Information
- License: MIT License
- 160 stars
- hg-based source control