We use cookies to ensure you get the best user experience on our website.Find Out More

Gradle Android

Add this line to your build.gradle file:

implementation 'com.softnoesis.shakebug:ShakeBug:1.2.4'

You may also need to add the following to your project/build.gradle file:

buildscript {
    repositories {
        mavenCentral()
   }
}

Code

1. In your Application class or Launching activity add this line to your onCreate method. This initializes Shake Bug with the default invocation event, Shake.

ShakeBug.initialize(this, "<Your Key>");
ShakeBug.initialize(this,"<Your Key>")
Optional Settings

1. If you want add event to any screen or activity use following methods.

ShakeBug.getInstance().addEventKey(this,"<Key>","<Key Value>"); //pass any key or value
ShakeBug.getInstance().addEventKey(this,"<Key>","<Key Value>") // pass any key or value

2. Add the following for enabling/disabling first time tutorial screen.

ShakeBug.getInstance().showTutorialScreenFirstTime(true); // Default value True
ShakeBug.getInstance().showTutorialScreenFirstTime(true) // Default value True
Want to know more
CocoaPods IOS

To integrate ShakeBug into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'ShakeBug'

Then, run the following command:

$ pod install
Code

1. Import the ShakeBug framework header into your app delegate.

import ShakeBug
#import< ShakeBug/ShakeBug.h>
import ShakeBug
#import< ShakeBug/ShakeBug.h>

2. Add the following to your app delegate's application:didFinishLaunchingWithOptions: method.

ShakeBug.sharedInstance().initiate(withKey: "Your Key")
[[ShakeBug sharedInstance] initiateWithKey: "Your Key"];

Be sure to replace with your application key which given by ShakeBug website.

Want to know more
React Native-Android

Add this line to your build.gradle file.

implementation 'com.softnoesis.shakebug:ShakeBug:1.2.4'

Open package having MainActivity.java file and create ShakeBugModule.java

import com.softnoesis.shakebuglibrary.ShakeBugInitialize;
class ShakeBugModule extends ReactContextBaseJavaModule implements ActivityEventListener {

    public ShakeBugModule(ReactApplicationContext reactContext) {
       super(reactContext);
       reactContext.addActivityEventListener(this);
       shakeBugInit();
    }

    @Override
    public String getName() {
       return "ShakeBugAndroid";
    }

     @ReactMethod
       public void shakeBugInit() {
             final Activity activity = getCurrentActivity();
             if (activity != null) {
                   new ShakeBugInitialize(activity,"");
             }
       }
       @Override
       public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {

       }
       @Override
       public void onNewIntent(Intent intent) {

       }
}


Now create ShakeBugPackage.java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

class ShakeBugPackage implements ReactPackage {

       @Override
       public List createNativeModules(ReactApplicationContext reactContext) {
             List modules = new ArrayList<>();
             modules.add(new ShakeBugModule(reactContext));

             return modules;
       }

       @Override
       public List createViewManagers(ReactApplicationContext reactContext) {
             return Collections.emptyList();
       }
}

now open android/app/src/main/java/[...]/MainApplication.java You should find the getPackages() method looks like the below snippet. You just need to add shakeBugPackage to List <ReactPackage>

@Override
             protected List<ReactPackage> getPackages() {
                   @SuppressWarnings("UnnecessaryLocalVariable")
                   List <ReactPackage> packages = new PackageList(this).getPackages();
                   // Packages that cannot be autolinked yet can be added manually here, for example:
                   packages.add(new ShakeBugPackage());
                   return packages;
             }

After this you just have call ShakeBugInit update App.js as shown in below image

import React, {useEffect} from 'react';
import {NativeModules} from 'react-native';

const App = () => {

       useEffect(() => {
              NativeModules.ShakeBugAndroid.shakeBugInit()
       }, []);

       return (
       ...
       )
}
export default App;
Want to know more
Website

Copy following code into the <head> section of your HTML.

Code
<!-- Shakebug.com - shakebug.js -->
<script type="text/javascript" src="https://www.shakebug.com/assets/js/shakebug-min-1.0.js" id="apikey" isReportingIconVisible="false" apikey="replace your key">
</script>

Use cases:

1. Make sure this script must be load in each and every page of your website.

2. Here value of apikey must be from Shakebug after login panel.

3. isReportingIconVisible = true means it will show bug reporting icon in left-bottom corner of your website.
False means it won’t show icon there.

4. Shortcut key for bug reporting in Desktop website:
For Windows and Ubuntu OS:

Control + Alt + k

For Mac OS:

Command + Alt + k

To add an events:

Prior to add event to any webpage you must need to add following script anywhere below above script.

<!-- Shakebug.com - Add events to any webpage. -->
<script> addShakebugEvent("key","value"); </script>
Compatible Browesers:
Browser Desktop iOS Android
Google Chrome
Mozilla Firefox
Microsoft Edge
Safari

** We are working to support all the possible browsers.

Start saving time now!

Sign up free

No credit card required