GithubHelp home page GithubHelp logo

saadbilal / exceptionwear Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tajchert/exceptionwear

0.0 2.0 0.0 141 KB

A library for Android Wear projects to handle exceptions properly.

License: Apache License 2.0

Java 100.00%

exceptionwear's Introduction

ExceptionWear - library for handling Exceptions on Android Wear

Android Arsenal Maven Central

ExceptionWear (:exclamation::watch:) is very simple library to solve problem of not passing exceptions from Android Wear devices to the phone. So if you release an app for smartwatches to Google Play and it will crash (and it will) you won't get any information about it (sic!).

###How to start? To start with handling your exceptions, all you need is to add one line to Application class on Wear device. From now on all your exceptions from smartwatch will be thrown as well on the phone. Plus you can add custom handlers for them!

###Custom Handler After receiving exception on a phone you can send a email with log, save it for any crash reporting app etc. - just add own class that implements ExceptionWearHandler and set using ExceptionDataListenerService.setHandler() before receiving a crash.

###Add ExceptionWear to your project

Gradle:

    //library:
    compile 'pl.tajchert:exceptionwear:0.1.2'
    //needed dependency:
    compile 'com.google.android.gms:play-services-wearable:+'

Add it to both projects - mobile and wear.

Maven:

<dependency>
    <groupId>pl.tajchert</groupId>
    <artifactId>exceptionwear</artifactId>
    <version>0.1.2</version>
</dependency>

Maven Central Link

###Code Wear app:

public class WearableApplication extends Application {
    public void onCreate() {
        //...
        ExceptionWear.initialize(this);
    }
}

Phone (for custom handler):

public class PhoneApplication extends Application {
    public void onCreate() {
        //...
        ExceptionDataListenerService.setHandler(new CustomExceptionHandler());//need to implements ExceptionWearHandler
    }
}

Other sample handlers are already implemented in sample project. There are: Log only handler, sending email, Crashlytics handler.

###License

ExceptionWear binaries and source code can be used according to the Apache License, Version 2.0.

###Thanks

Goes to Sebastian Mauer for that gist (whole library is based on it), and also to: Aleksander Piotrowski, David Vavra.

exceptionwear's People

Contributors

tajchert avatar pelotasplus avatar matejdro avatar

Watchers

James Cloos avatar Saad Bilal avatar

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.