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.34'

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

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
   }
}

Then, update the following sdkVersion to your app's `build.gradle` file:

android {
    compileSdk 33
        defaultConfig {
             ...
             targetSdk 33
             ...
        }
        ...
}

Code

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

Java

ShakeBug.sharedInstance().initiateWithKey(this, "<Your Key>");

Kotlin

ShakeBug.sharedInstance().initiateWithKey(this,"<Your Key>")

Optional Settings

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

Java

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

Kotlin

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

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

Java

ShakeBug.sharedInstance().showTutorialScreenFirstTime(true); // Default value True

Kotlin

ShakeBug.sharedInstance().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.

Swift

import ShakeBug

Objective-C

#import< ShakeBug/ShakeBug.h>

Note: If you are working React Native exported project then you also need to mention this line too

#import <ShakeBug/ShakeBug-Swift.h>

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

Swift

ShakeBugSDK.sharedInstance().initiate(withKey: "Your Key")

Objective-C

[[ShakebugSDK sharedInstance] initiateWithKey: "Your Key"];

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

Note: NSPhotoLibraryUsageDescription must be added in info.plist.

Want to know more

npm

Navigate to your React Native project directory and install shakebug-react-native

npm install shakebug-react-native

Or if you prefer to use Yarn instead of npm:

yarn add shakebug-react-native
Want to know more

Native

React Native-IOS

For iOS project, developer must need to install Shakebug in xCode project using pod.

To install Shakebug SDK in xCode project. Please follow above "For iOS" guide.


React Native-Android

Add this line to your build.gradle file.

implementation ("com.softnoesis.shakebug:ShakeBug:1.2.34")

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

import com.softnoesis.shakebuglibrary.ShakeBug; // this
@Override
    protected void onCreate(Bundle savedInstanceState) {
       ...
       ShakeBug.sharedInstance().initiateWithKey(this, “”); //this
    }

    
Want to know more

Native

Native-IOS

For iOS project, developer must need to install Shakebug in xCode project using pod.

To install Shakebug SDK in xCode project. Please follow above "For iOS" guide.


Native-Android

Add this line to your build.gradle file.

implementation ("com.softnoesis.shakebug:ShakeBug:1.2.34")

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

import com.softnoesis.shakebuglibrary.ShakeBug; // this
@Override
    protected void onCreate(Bundle savedInstanceState) {
       ...
       ShakeBug.sharedInstance().initiateWithKey(this, “”); //this
    }

    
Want to know more
Website

Copy following code after the </body> 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" isAllowshake="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. To enable bug reporting using the shake gesture on an iOS mobile device, ensure that 'isAllowShake' is set to true in the above script.
False means it won’t allow shake gesture in ios mobile device.

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

Control + Alt + k

For Mac OS:

Command + Option + k

To add an events:

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

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

Start saving time now!

Sign up free

No credit card required