Below are the ways you can add Instabug to your project.
Add this line to your
<dependency> <groupId>com.instabug.library</groupId> <artifactId>instabug</artifactId> <version>8+</version> </dependency>
Application class add this line to your
onCreate method. This initializes Instabug with the default invocation event, Shake.
new Instabug.Builder(this, "APP_TOKEN").build();
new Instabug.Builder(this, "APP_TOKEN") .setInvocationEvents(InstabugInvocationEvent.SHAKE, InstabugInvocationEvent.SCREENSHOT) .build();
You can find your app token by selecting SDK Integration in the Settings menu of your Instabug dashboard.
Permissions are automatically added to your
AndroidManifest.xml file. Some of them are required to be able to fetch information like network and WiFi connection. Others are used to allow your users to attach images, videos, and audio recordings. In general, permission requests don't appear unless your user attempts to use a feature requiring a permission.
The only exception is if you set the invocation event to be a Screenshot. In that case, the storage permission will be requested when your application launches. The screenshot invocation is a special case because there is no native event that tells the SDK that a screenshot has been captured. The only way to know is to monitor the screenshots directory. The SDK is invoked when a screenshot is added to the directory while your application is active.
<uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” /> <uses-permission android:name=“android.permission.WRITE_EXTERNAL_STORAGE” /> <uses-permission android:name=“android.permission.READ_EXTERNAL_STORAGE” /> <uses-permission android:name=“android.permission.ACCESS_WIFI_STATE” /> <uses-permission android:name=“android.permission.RECORD_AUDIO” /> <uses-permission android:name=“android.permission.MODIFY_AUDIO_SETTINGS” />
You can remove any of the permissions if you will not be using the feature associated with it, as in the following example.
<uses-permission android:name=“android.permission.WRITE_EXTERNAL_STORAGE” tools:node=“remove”/>