• Stars
    star
    103
  • Rank 331,805 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sherlock reports any crash that occurs in your application

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.

More Repositories

1

ExpenseManager

Android app to manage expenses
Java
83
star
2

AlarmManagerAndReceiver

Alarm Manager to set an alarm which calls a receiver, and receiver generates a notification
Java
37
star
3

sidekiq_queue_metrics

Records stats of each sidekiq queue and exposes APIs to retrieve them
Ruby
31
star
4

apkToJava

View android apk as java code in gui
Ruby
30
star
5

pairing_matrix

Pairing Matrix For Agile Teams
Ruby
28
star
6

AndroidUISessions

Android UI Design And Styling
Java
17
star
7

AndroidOfflineModeNotifications

A project to show notifications when network status of device changes
Java
12
star
8

design_patterns

Design Patterns
Java
10
star
9

fancy_audio

A gem to add album cover to audio
Ruby
9
star
10

gocd

Gem to fetch gocd information easily
Ruby
6
star
11

rails_distributed_tracing

Distributed tracing for rails microservices
Ruby
5
star
12

amusing_git

Brings fun to the git workflow
Ruby
4
star
13

RubyGemsAndroidApp

RubyGemsAndroidApp
Java
3
star
14

MediaMagic

A gem to convert media file to encoded string and vice-versa
Ruby
2
star
15

JavaCustomAnnotations

Understanding usage of java custom annotation by creating custom test runner.
Java
2
star
16

LocationAwareApp

This app uses google's awareness api to send a notification when you reach a particular location
Java
2
star
17

data_verifier

Ruby gem to verify data
Ruby
1
star
18

AndroidDatabaseDemo

AndroidDatabaseDemo - How to use database in android in right way.
Java
1
star
19

MyRetail

MyRetail
Java
1
star
20

game_of_life

Conway's Game of Life in JS and Html
JavaScript
1
star
21

AndroidUIPlayground

Android UI Spikes
Java
1
star
22

gocd_pre_push

Check GOCD pipelines status before pushing your code
Ruby
1
star
23

Wifi_Hot_Spot

Use mobile internet in PC via tethering with just one click!
Java
1
star
24

soft

A customised programming language ( just a start, still long way to go.. :) )
Ruby
1
star