Sherlock reports any crash that occurs in your application

Overview

Sherlock

Maintenance Build Status HitCount Open Source Love Maven Central API Twitter Follow

Sherlock reports any crash that occurres in your application as a notification. You just need to initialize Sherlock at the start of your application and it will take care of the rest.

Motivation

The motivation behind creating Sherlock is to make the life of Developer and tester easier. Whenever a tester is testing the app and he/she encounters a crash, most of the time they don't have enough details in their hand to enable developer to start fixing the crash immediately. Now with the help of Sherlock, any tester will have enough info to report the crash.

Alt text

Demo

Installation

debugCompile('com.github.ajitsing:sherlock:1.0.4@aar') {
    transitive = true
}
releaseCompile('com.github.ajitsing:sherlock-no-op:1.0.4@aar')

Usage

To start using Sherlock just add the below line in the onCreate() method of Application class.

public class MyApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
    Sherlock.init(this); //Initializing Sherlock
  }
}

Once you add Sherlock.init(this) Sherlock will take care of reporting all the crashes to you.

See All Crashes

You can view all the crashes by starting the CrashListActivity.

Get All Crashes Captured By Sherlock

Sherlock also provides you a way to get all the crashes which are reported by Sherlock in form of java object. You can get them using below line of code.

Sherlock.getInstance().getAllCrashes()

Before accessing getInstance() make sure that you have initialized Sherlock, otherwise it will throw SherlockNotInitializedException.

App Info

By default Sherlock only captures the version of your application and shows that as part of crash details. If you want to provide some extra details regarding app, you can do so by providing an AppInfoProvider to the Sherlock.

Sherlock.setAppInfoProvider(new AppInfoProvider() {
  @Override
  public AppInfo getAppInfo() {
    return new AppInfo.Builder()
               .with("Version", "2.21") //You can get the actual version using "AppInfoUtil.getAppVersion(context)"
               .with("BuildNumber", "221B")
               .build();
  }
});

Contributing

You can contribute to Sherlock by forking the repo and creating pull requests. You can also contribute by reporting bugs/issues. If you want to see a new feature in Sherlock, just add that as an issue with enough details.

LICENSE

Copyright (C) 2017 Ajit Singh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • CrashListActivity not opening on Android O

    CrashListActivity not opening on Android O

    So I updated the SDK to 26 in my launcher app and a crash accurs telling me the activity does not exist and if I implemented it in my Manifest. So I thought about it and made a new activity that extends CrashListActivity and it opens but nothing shows. Notifications do not appear either to indicate crash. whats happening...

    opened by rgocal 6
  • Sherlock.getInstance().getAllCrashes() issue

    Sherlock.getInstance().getAllCrashes() issue

    crash.getId() return 1, then always 2 so every next crash after 2nd will open not proper report!

    and reports from notification opens not proper crash details, too.

    issue

    NOTE: issue can be reproduced only if crash happened in Application onCreate() or near it, i mean on app start

    opened by af-kabramov 6
  • CrashListActivity does not exist when use sherlock-no-op on release

    CrashListActivity does not exist when use sherlock-no-op on release

    com.singhajit.sherlock.crashes.activity does not exist import com.singhajit.sherlock.crashes.activity.CrashListActivity; ^ 1 error

    does not exists when use releaseCompile('com.github.ajitsing:sherlock-no-op:1.0.2@aar')

    maybe you can provide method Sherlock.openCrashListActivity(context); ?

    opened by af-kabramov 4
  • Add no-op dependency for release build type

    Add no-op dependency for release build type

    Hello,

    It's a usual practice for libraries like this (that only exist for debug builds) to release a no-op version of the library that is completely empty, so that users of the library can use it in their app without worrying that the library is going to increase their release APK size, or cause any side effects in production. For an example see here: https://github.com/square/leakcanary

    This can be fixed on the developers side by using an interface (for example see https://github.com/athkalia/Just-Another-Android-App/blob/8a5c677b2b0d0f2dcc123d40b770307a13786b64/app/src/main/java/com/example/tools/stetho/StethoTool.java in my project for introducing stetho only for debug builds), but it's much more convenient when fixed by the library

    opened by athkalia 3
  • Too many dependencies

    Too many dependencies

    Hello,

    this is an interesting library, thanks for sharing! Unfortunately including Realm will be prohibitive for quite a few devs cause of its size. Also, enabling databinding just for the sake of including this library in a commercial project would be very difficult to justify.

    Libraries should minimize dependencies like that to make it easier for developers to integrate them into projects. I would suggest rewriting it without these 2 components.

    Cheers, Sakis

    opened by athkalia 3
  • NoClassDefFoundError on SherlockDatabaseHelper

    NoClassDefFoundError on SherlockDatabaseHelper

    After adding Sherlock.init(this) in Application, it shows fatal exception NoClassDefFoundError on com.singhajit.sherlock.core.database.SherlockDatabaseHelper

    opened by musashi076 1
  • Crashing

    Crashing

    Hi Ajit,

    I tried implementing this lib in build.gradle in my app(as a dependency).

    1. debugCompile('com.github.ajitsing:sherlock:1.0.4@aar') { transitive = true } releaseCompile('com.github.ajitsing:sherlock-no-op:1.0.4@aar')

    2. Sherlock.init(this); in my application.

    And also triggered Exception manually. As expected it created Notification. But on click of notification the Sherlock CrashActivity is not launching and it is crashing due Null pointer Exception. Can you please help on this at earliest?

    Regards, Vijay

    opened by veejay-ks 0
  • Add support for deleting crashes in database.

    Add support for deleting crashes in database.

    This allows the application to clear all previous crashes (useful when updating the application, not to get previous crashes cluttering the database too).

    opened by X-Ryl669 8
  • Is posible to show Dialog Crash Error

    Is posible to show Dialog Crash Error

    When detect error crash, is posible show a dialog with buttons (close,detaile, report) without notification? Detaile -> open crash report report -> open email for send a developer

    opened by webserveis 2
Releases(1.0.4)
A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in Flutter.

Red Screen Of Death What A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in

Ahmad Melegy 178 Dec 9, 2022
Bugsnag crash monitoring and reporting tool for Android apps

Bugsnag error monitoring & exception reporter for Android Get comprehensive Android crash reports to quickly debug errors. Bugsnag's Android crash rep

Bugsnag 1.1k Dec 26, 2022
Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer.

AppErrorsTracking 应用异常跟踪 Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer. 为原生 FC

狐狸派 83 Jan 8, 2023
Android Tableau library supports variety of graphs which developers simply integrate visualization reports on Android application.

Android Tableau Library Android Tableau library supports variety of graphs which developers simply integrate visualization reports on Android applicat

Sung Hyun 54 Jan 1, 2023
Gradle plugin that creates FindBugs reports for android projects

findbugs-android A Gradle plugin that creates FindBugs tasks for each variant of android application or library project Project site: https://findbugs

Chaitanya Pramod 131 Dec 29, 2022
A custom instrumentation test runner for Android that generates XML reports for integration with other tools.

Android JUnit Report Test Runner Introduction The Android JUnit report test runner is a custom instrumentation test runner for Android that creates XM

Jason Sankey 148 Nov 25, 2022
Process jacoco reports and print the code coverage to the Azure DevOps

PrintCoverage PrintCoverage plugin allows you easily integrate coverage badge into your Azure DevOps pull requests! How to use In the module build.gra

Intermedia Cloud Communications 4 Oct 15, 2021
A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified 😍 HTML page

Compose Compiler Reports to HTML Generator A CLI utility to convert Jetpack Compose compiler metrics and reports to beautified ?? HTML page. Made with

Shreyas Patil 145 Jan 3, 2023
A CLI tool to convert multi-module Jetpack Compose compiler metrics into beautiful HTML reports

A CLI tool to convert multi-module Jetpack Compose compiler metrics into beautiful HTML reports 1. What are Jetpack Compose compiler metrics? The Comp

Jaya Surya Thotapalli 116 Jan 3, 2023
Com.hhvvg.anytext - An application provides features to modify any TextView in any other applications

AnyText What's this This application provides features to modify any TextView in

null 6 Dec 2, 2022
BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

null 4.3k Jan 2, 2023
DevTools for Android Chrome — works on any website, on any Chromium browser.

DevTools for Android Chrome — works on any website, on any Chromium browser.

Leo Ho 135 Dec 7, 2022
Automatically generates UI demos which allow users to call any function with any parameters

Automatically generates UI demos which allow users to call any function (including composable ones) with any parameters. Useful for building demo screens in playground apps of various design systems.

Anton Popov 3 Jul 28, 2022
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

Android-Iconics ... allows to include any icon font with all its vector icons in your project. No limits. Scale with no limit, use any color at any ti

Mike Penz 5k Jan 5, 2023
☁️🌤🌧☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️🌤🌧☀

☁️????☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️????☀

Nisa Efendioğlu 4 Apr 6, 2022
AndroidFilePicker - android library which will help you to pick any type of media file in your application

AndroidFilePicker is android library which will help you to pick any type of media file in your application. No need to manage any kind of extra permission or result method override. Just create library class instance and use it or also modify ui as your requirement.

null 4 Sep 12, 2022
HyperUPnP is Android Application that lets you to Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device.

Hyper UPnP Android UPnP/DLNA client Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device. Int

Var Bhat 8 Jul 17, 2022
Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Aria Shirazi 93 Oct 23, 2022