GithubHelp home page GithubHelp logo

wearcrashreporter's Introduction

Wear Crash Reporter

Reports crashes on the watch app into the phone app's crash report system.

Works with any [third party] crash reporter installed on the Phone app.

We install a crash handler on the watch Virtual Machine, when a crash is caught, its trace and type are serialized to json, saved to the FileSystem, then sent with a service as a MessageApi Message. Upon reception by a WearableListenerService in the phone app it is deserialized and passed to the installed Phone Virtual Machine's crash reporter.

The top of the stack trace then looks like:

Thread [#] โ€” WearableListenerService

in the crash report

Setting it up:

  • Add to project build.gradle's repositories section:

maven { url = 'http://dl.bintray.com/stubhub/maven' }


Phone App:

  • Add to build.gradle:

compile "com.google.android.gms:play-services-wearable:$play_services_version"

compile 'com.stubhub.crash:wear-crash-reporter:1.0.2@aar'

  • Add the following to the manifest:

service name com.stubhub.crash.phone.WearCrashListenerService
  intent-filter
    action name com.google.android.gms.wearable.MESSAGE_RECEIVED
    data scheme="wear" host="*" pathPrefix "/wear-crash-peer"
  • Add the following item to wear.xml's android_wear_capabilities:

wear_crash_peer_capability


Watch App:

  • Add to build.gradle:

compile "com.android.support:wear:$support_version"

compile "com.google.android.support:wearable:$latest_wear_libraries_version" provided "com.google.android.wearable:wearable:$latest_wear_libraries_version"

compile "com.google.android.gms:play-services-wearable:$play_services_version"

compile 'com.stubhub.crash:wear-crash-reporter:1.0.2@aar'

  • Add the following to the manifest:

service name com.stubhub.crash.watch.WearCrashLoggingService
  • Call the following in your Application class' onCreate:

WearCrashHelper.getInstance().startAgent(getApplicationContext());

License

Copyright 2017 Ebay, Inc.

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.

wearcrashreporter's People

Contributors

josephchern avatar philippelaporte11 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.