1Download the zip file of the SDK and extract it to get the AndroidSDK folder

2Import it as Android project (in Eclipse file->Import->Android->Existing android code into workspace)

3Select the app project, press File->properties->Android->Add(under Library)

4Make sure that you've added the following permissions to your manifest file :


								<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
							    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
							    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
							    <uses-permission android:name="android.permission.INTERNET" /> 
							    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
							    <uses-permission android:name="android.permission.READ_LOGS" />
							

5Add these components to your manifest file:


								<activity 
						            android:name="com.instabug.android.InstabugScreenshotActivity" 
						            android:theme="@android:style/Theme.Translucent.NoTitleBar"> 
						        </activity> 
						        <activity 
						            android:name="com.instabug.android.InstabugFeedbackActivity" 
						            android:theme="@android:style/Theme.Translucent.NoTitleBar" 
						            android:windowSoftInputMode="stateVisible|adjustResize" > 
						        </activity> 
 
						        <service 
						            android:name="com.instabug.android.InstabugService" 
						            android:enabled="true" > 
						        </service> 
 
						        <receiver android:name="com.instabug.android.InstabugReceiver" > 
						            <intent-filter> 
						                <action android:name="android.net.wifi.WIFI_STATE_CHANGED" /> 
						                <action android:name="android.net.wifi.STATE_CHANGE" /> 
						            </intent-filter> 
						        </receiver>

					

6Import the sdk package

import com.instabug.android.Instabug;

7Call the SDK by adding this line into the launcher’s activity onCreate() metho

Instabug.kickOff(getApplicationContext(), "YOUR-APP-TOKEN-HERE", InstabugCaptureSource.UIKit, InstabugFeedbackEvent.Shake);
  • Token: The app's unique 32 characters identifier.
  • CaptureSource: InstabugCaptureSourceUIKit or InstabugCaptureSourceOpenGL.
  • FeedbackEvent: InstabugFeedbackEventShake, InstabugFeedbackEventScreenshot, InstabugFeedbackEventThreeFingersSwipe, or InstabugFeedbackEventNone.

8in each activity call at onResume() :

Instabug.start(View rootView);

and in onPause():

Instabug.stop();

1Download the zip file of the SDK and extract it to get the .framework and .bundle files

2Drag and Drop the .framework and .bundle files to your project, and check the add to target checkbox

3Download the zip file of the SDK and extract it to get the .framework and .bundle files

    • CoreGraphics
    • CoreFoundation
    • Foundation
    • OpenGLES
    • GLKit
    • UIKit
    • QuartzCore
    • SystemConfiguration
    • AVFoundation
    • AudioToolbox
    • CoreTelephony
    • CoreLocation

4Import the framework into the appDelegate.m

#import <Instabug/Instabug.h>

5Call the SDK by including this line into the "application:didFinishLaunchingWithOptions:"

[Instabug KickOffWithToken:@"YOUR-APP-TOKEN-HERE" CaptureSource:InstabugCaptureSourceUIKit FeedbackEvent:InstabugFeedbackEventShake IsTrackingLocation:YES];
  • Token: The app's unique 32 characters identifier.
  • CaptureSource: InstabugCaptureSourceUIKit or InstabugCaptureSourceOpenGL.
  • FeedbackEvent: InstabugFeedbackEventShake, InstabugFeedbackEventThreeFingersSwipe, InstabugFeedbackEventScreenshot, InstabugFeedbackEventFloatingButton, or InstabugFeedbackEventNone*.
    *If None was selected as FeedbackEvent, you'll need to write your own recogniser for firing the feedback form, and call [Instabug ShowFeedbackFrom]
  • IsTrackingLocation: Enable/Disable tracking the user location while sending feedback.

Send Feedback Form (optional)

1You can add this method call to the "application:didFinishLaunchingWithOptions:" to instantly show the feedback form without respect to the feedback event selected.
You'll need to call this method if you selected InstabugFeedbackEventNone for the feedback event.

[Instabug ShowFeedbackForm];

2You can add this method call to the "application:didFinishLaunchingWithOptions:" to instantly show the feedback form without respect to the feedback event selected.
You'll need to call this method if you selected InstabugFeedbackEventNone for the feedback event.

[Instabug ShowFeedbackFormWithScreenshot:(BOOL)withScreenshot];

withScreenshot: Specifies whether to show the screenshot to the user to annotate or not.

3You can use this method to disable all the functions of the SDK.

[Instabug disableSDK];

4You can use this method to re-enable all the functions of the SDK.

[Instabug enableSDK];

Set SDK Parameters (optional)

1Sets a string that identifies your user, whether it's an email, user id...etc. This field will be shown to you with each feedback received.

[Instabug setUserDataString:(NSString*) userDataString];

userDataString: a string that identifies the current user, sent with each feedback. Maximum size is 1000 character.

2Sets whether to show a screenshot to the user to annotate each time the feedback form is shown.

[Instabug setShowScreenshot:(BOOL) showScreenshot];

showScreenshot: Show/Hide a screenshot with the feedback form.

3Sets whether to ask the user to optionally enter his/her email address or not.

[Instabug setShowEmail:(BOOL) showEmail];

showEmail: Show/Hide the email field.

4Sets the default value of the email field.

[Instabug setEmail:(NSString*) email];

email: The default value of the email field.

5Sets the threshold value of the shake gesture on iPhone/iPod Touch. The default value is 2.5.

[Instabug setiPhoneShakingThreshold:(double) iPhoneShakingThreshold];

iPhoneShakingThreshold: The threshold value of the shake gesture on iPhone/iPod Touch.

6Sets the threshold value of the shake gesture on iPad. The default value is 0.6.

[Instabug setiPadShakingThreshold:(double) iPadShakingThreshold];

iPadShakingThreshold: The threshold value of the shake gesture on iPad.

Set Alerts Parameters (optional)

1Sets whether the email is a required field or not.

[Instabug setEmailIsRequired:(BOOL) emailIsRequired];

emailIsRequired: Decides whether the email field is required or not.

2Sets the email invalid alert text, shown if an invalid email is entered.

[Instabug setEmailInvalidText:(NSString*) emailInvalidText];

emailInvalidText: The text of the alert shown when the user enteres an invalid email address.

3Sets whether the comment is a required field or not.

[Instabug setCommentIsRequired:(BOOL) commentIsRequired];

emailIsRequired: Decides whether the comment field is required or not.

4Sets the comment invalid alert text, shown if no comment was entered.

[Instabug setCommentInvalidText:(NSString*) commentInvalidText];

emailInvalidText: The text of the alert shown when the user enteres no comment.

5Sets whether to show an alert at the first time the user launches the app, telling them how to send a feedback. For custom alert text, check 6.

[Instabug setShowStartAlert:(BOOL) showStartAlert];

showStartAlert: Show/Hide the alert shown the first time the user launches the app.

6Sets the text of the alert shown at the first time the user launches the app. The alert won't be shown if the method in 5 was set to NO.

[Instabug setStartAlertText:(NSString*) startAlertText];

showScreenshot: Show/Hide a screenshot with the feedback form.

7Sets whether to show an alert each time the user sends a feedback. For custom alert text, check 8.

[Instabug setShowThankYouAlert:(BOOL) showThankYouAlert];

showThankYouAlert: Show/Hide the alert each time the user sends a feedback.

8Sets the text of the alert shown each time the user sends a feedback. The alert won't be shown if the method in 7 was set to NO.

[Instabug setThankYouAlertText:(NSString*) thankYouAlertText];

thankYouAlertText: The text of the alert shown each time the user sends a feedback.

9Sets the title of all future alerts.

[Instabug setAlertsTitle:(NSString*) alertsTitle];

alertsTitle: The title of all future alerts.

Set Design Parameters (optional)

1Sets the whole design theme, you can override any of the specific values later. Check the methods below.

[Instabug setColorTheme:(InstabugColorTheme) colorTheme];

colorTheme: The design's color theme, you can select from black, grey, orange, red, navy, green, cyan, blue.

2Sets the header background color.

[Instabug setHeaderColor:(UIColor*) color];

color: the header background color.

3Sets the header font color.

[Instabug setHeaderFontColor:(UIColor*) color];

color: the header font color.

4Sets the buttons background color.

[Instabug setButtonsColor:(UIColor*) color];

color: the buttons background color.

5Sets the buttons font color.

[Instabug setButtonsFontColor:(UIColor*) color];

color: the buttons font color.

6Sets the text area background color.

[Instabug setTextBackgroundColor:(UIColor*) color];

color: the text area background color.

7Sets the text area font color.

[Instabug setTextFontColor:(UIColor*) color];

color: the text area font color.

8Sets the fore color of the floating button, if the floating button is selected.

[Instabug setFloatingButtonForeColor:(UIColor*) color];

color: the fore color of the floating button.

9Sets the back color of the floating button, if the floating button is selected.

[Instabug setFloatingButtonBackColor:(UIColor*) color];

color: the back color of the floating button.

Instabug from Instabug on Vimeo.

×