This section explains how to install Instabug SDK into your Android application.
Add this line to your build.gradle file.
<dependency> <groupId>com.instabug.library</groupId> <artifactId>instabug</artifactId> <version>4+</version> </dependency>
new Instabug.Builder(this, "APP_TOKEN").build();
You can find your app token by selecting the SDK tab from your Instabug dashboard.
Some permissions are automatically added to your
AndroidManifest.xml file. Some of them are required to be able to fetch some information like the network and wifi connection. Others are used to allow the user to attach images, videos, and audio recordings.
Generally, the permission request doesn't appear unless the user attempts to use any of the features requiring the permission. The only exception, if you set the invocation event to be Screenshot. Then, the storage permission will be requested when the application launches.
This behavior is happening with the screenshot invocation because there isn't any native event that tells the SDK that a screenshot has been captured. The only way to do it is to monitor the screenshots directory. The SDK is invoked once a screenshot is added to the directory while the 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 are not willing to use the feature associated with it as in the following example.
<uses-permission android:name=“android.permission.WRITE_EXTERNAL_STORAGE” tools:node=“remove”/>