Giter Club home page Giter Club logo

nativescript-bugsee's Introduction

Bugsee for NativeScript

This plugin adds Bugsee support to your NativeScript application. Record the last 30 seconds of your app before it crashes. Allow people to submit bugs by shaking or screenshotting your app.

Demo GIF

Installation

To install the plugin do:

tns plugin add nativescript-bugsee

Usage

iOS

Put this is your main application JS file:

// Replace this with your actual token
if (Platform.isIOS) {
  Bugsee.launchWithToken('0000000-0000-0000-0000-00000000000')
}

Android

This is a little trickier as it needs to extend the main Application class.

Create this file at app/application.android.js:

(Replace yourApplicationName with your app name, and the token with your Android token)

/* global android com */
const superProto = android.app.Application.prototype
const Bugsee = com.bugsee.library.Bugsee

// the first parameter of the `extend` call defines the package and the name for the native *.JAVA file generated.
android.app.Application.extend('org.yourApplicationName.Application', {
  onCreate: function () {
    superProto.onCreate.call(this)
    // At this point modules have already been initialized
    Bugsee.launch(this, '0000000-0000-0000-0000-00000000000')
  },
  attachBaseContext: function (base) {
    superProto.attachBaseContext.call(this, base)
  }
})

In app/App_Resources/Android/src/AndroidManifest change from this:

<application android:name="com.tns.NativeScriptApplication"

to this - to match the application name above:

<application android:name="org.yourApplicationName.Application"

License

Apache License Version 2.0, January 2004

nativescript-bugsee's People

Contributors

mrrio avatar

Stargazers

netop://ウエハ avatar Pat Buchanan avatar cfirmo33 avatar Josh Sommer avatar Sam Zhao avatar Osei Fortune avatar Brad Martin avatar Ben avatar

Watchers

 avatar Andy Fitch avatar James Cloos avatar Jamie Sefton avatar  avatar

nativescript-bugsee's Issues

Doesn't seems to work in android

When calling com.bugsee.library.Bugsee.launch(this, 'TOKEN');
I got the following error:

JS: Error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/OkHttpClient;
JS:     java.lang.reflect.Executable.getParameterTypesInternal(Native Method)
JS:     java.lang.reflect.Method.getParameterTypes(Method.java:186)
JS:     java.lang.Class.getDeclaredMethods(Class.java:1881)
JS:     com.tns.MethodResolver$MethodFinder.<init>(MethodResolver.java:483)
JS:     com.tns.MethodResolver.resolveMethodOverload(MethodResolver.java:111)
JS:     com.tns.Runtime.resolveMethodOverload(Runtime.java:1070)
JS:     com.tns.Runtime.callJSMethodNative(Native Method)
JS:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
JS:     com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:983)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:967)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:959)
JS:     kiwi.allgoods.Application.onCreate(Application.java:27)
JS:     android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
JS:     android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
JS:     android.app.ActivityThread.access$1100(ActivityThread.java:199)
JS:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
JS:     android.os.Handler.dispatchMessage(Handler.java:106)
JS:     android.os.Looper.loop(Looper.java:193)
JS:     android.app.ActivityThread.main(ActivityThread.java:6669)
JS:     java.lang.reflect.Method.invoke(Native Method)
JS:     com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
JS:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

If I catch this error, the bugsee seems does not init at all (no shake/notification report available)

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.