Code Monkey home page Code Monkey logo

android-sdk's Introduction

CrashOps Android SDK

License: MIT

This library will help you monitor your Android app's crashes.

Installation

๐Ÿ”Œ & โ–ถ๏ธ

Install via gradle

Using the plain and common maven

In your app-level "build.gradle" file, put:

   dependencies {
        implementation 'com.crashops.sdk:crashops:0.3.02'
   }

Using "jitpack.io"

In your root-level "build.gradle" file, put:

    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
        }
   }

In your app-level "build.gradle" file, put:

   dependencies {
        implementation 'com.github.CrashOps:Android-SDK:0.3.02'
   }

Usage

Set Application Key

To recognize your app in CrashOps servers you need an application key, you can set it via code (programmatically) either via config file.

Set an application key via code

// Kotlin
CrashOps.getInstance().setAppKey("app's-key-received-from-CrashOps-console")
// Java (pretty much like Kotlin ๐Ÿ™‚)
CrashOps.getInstance().setAppKey("app's-key-received-from-CrashOps-console");

Set an application key via config file

Use the crashops_config.xml file and place it in the values folder.

How do I turn CrashOps off / on?

By default, CrashOps is enabled and it runs automatically as your app runs (plug n' play) but you always can control and enable / disable its behavior with two approaches: dynamically or statically.

Dynamically: Programmatically call the method disable() / enable() as demonstrated here:

// Kotlin
CrashOps.getInstance().disable()
// OR:
CrashOps.getInstance().enable()
// Java (pretty much like Kotlin ๐Ÿ™‚)
CrashOps.getInstance().disable();
// OR:
CrashOps.getInstance().enable();

Statically: Add a crashops_config.xml file to your values folder and the SDK will read it in every app launch (using this approach may still be overridden by the dynamic approach). Do you wish to set different values for debug / release ? use Android flavors.

Acknowledgments

We're using retrofit to upload our log files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.