ExceptionWear


Source link: https://github.com/tajchert/ExceptionWear

ExceptionWear - library for handling Exceptions on Android Wear

ExceptionWear ( ❗?⌚?) 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.

Resources

An Android TagView library. You can customize awesome TagView by using this library.

InkPageIndicator created by Nick Butcher for Plaid and back-ported for API 16+.

This plugin helps you to easily handle variant specific settings with yaml format.

Simple progress indicator helper.

HallScheme is a lightweight simple library for creating rectangle halls.

An android custom view which allows you to have an arc style-menu on your pages.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes