Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ And also, you need to call `DeployGate#install` in your Application class, Conte
For example, add to your custom application class, content provider, or else.

```java
DeployGate.install(context, /** forceApplyOnReleaseBuild */ false);
import com.deploygate.sdk.DeployGate;
import com.deploygate.sdk.DeployGateSdkConfiguration;

DeployGateSdkConfiguration config =
new DeployGateSdkConfiguration.Builder().
setEnabledOnNonDebuggableBuild(true). // Make sure you set true here.
build();
DeployGate.install(context, config);
```

## Usage
Expand Down Expand Up @@ -83,6 +90,43 @@ DeployGate.registerCallback(new DeployGateCallback() {

For the more details, pelase refer to [DeployGate Docs - Android SDK](https://docs.deploygate.com/docs/developer-tools/android-sdk/)

### Capture feature

Workspaces, which have activated the Capture feature, can storee screenshots, device states and Logcat at DeployGate. The Capture feature is enabled by default.

```java
import com.deploygate.sdk.DeployGate;
import com.deploygate.sdk.DeployGateSdkConfiguration;

DeployGateSdkConfiguration config =
new DeployGateSdkConfiguration.Builder()
.setCaptureEnabled(true) // Defaults to true
.build();
DeployGate.install(context, config);
```

Please refer to https://docs.deploygate.com/docs/developer-guide/capture/about-capture for the details.

#### Custom Attributes

You can add attributes to Captures.

```java
import com.deploygate.sdk.DeployGate;

CustomAttributes buildEnvironment = DeployGate.getBuildEnvironment();
buildEnvironment.putString("git_ref", BuildConfig.BUILD_GIT_REF);

CustomAttributes runtimeExtra = DeployGate.getRuntimeExtra();
runtimeExtra.putString("is_authorized", authorizationRepository.isAuthorized());
```

**Limitation**

- `buildEnvironment` and `runtimeExtra` allow only at most **8** attributes.
- Attribute keys must consist of `_a-z0-9` and must start with `a-z`.
- Every value must be equal or shorter than 64 length.

## Mock

Do you want to disable DeployGate SDK on production builds? If so, please use `sdk-mock` dependency for production builds instead of `sdk`. `sdk-mock` dependency has public interfaces that are same as of `sdk` but their implementations are empty, so you don't have to modify your app code for specific build variants.
Expand Down