Skip to content

Instantly share code, notes, and snippets.

@SeanZoR
Created November 16, 2017 15:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SeanZoR/f34a0893388438d823e40a068a2a6370 to your computer and use it in GitHub Desktop.
Instabug initialize
/***
* Wrapper for instabug implementation
* API docs are (mostly) here: https://instabug.com/public/android-api-reference/com/instabug/library/Instabug.html
*/
public class InstabugUtil {
public static void init(Application context) {
// Builder should run first
Instabug.Builder builder = new Instabug.Builder(context, context.getString(R.string.instabug_key));
if (BuildConfig.DEBUG) {
builder.setInvocationEvent(InstabugInvocationEvent.SCREENSHOT_GESTURE);
}
builder.build();
// Other configs
Instabug.setEmailFieldVisibility(false);
Instabug.setIntroMessageEnabled(false);
Instabug.setPromptOptionsEnabled(false, true, false); // chat, bug, feedback
Instabug.setDebugEnabled(true);
//Instabug.addTags(BuildConfig.);?
}
public static void setUser(String email, String driverId){
Instabug.identifyUser(email, driverId);
}
public static void logoutUser(){
Instabug.logoutUser();
}
public static void invokeInstabugMenu() {
// Only Report a Problem option is available
Instabug.invoke(InstabugInvocationMode.NEW_BUG);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment