Ezi Comments

Ezi Comments for Android

Add Ezi Comments to a native Android app so reviewers can comment on its screens. Read the overview first for how it works and what you need in the dashboard.

Requirements

Install

The SDK is not on Maven Central yet; email damianosdev@gmail.com for the Android package. It contains two library modules:

Add both modules to your Gradle build, then depend on them by build type so your code compiles the same way in every build:

dependencies {
    debugImplementation(project(":ezi-comments"))
    releaseImplementation(project(":ezi-comments-noop"))
}

Set up

Start the SDK once in Application.onCreate:

import com.ezicode.comments.EziComments
import com.ezicode.comments.EziConfig

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        EziComments.configure(
            this,
            EziConfig(
                projectKey = "pk_your-project-key",
                endpoint = "https://comments.example.com",
                launcher = true,     // floating button
                shakeToOpen = true,  // shake to open
            ),
        )
    }
}

EziConfig throws an IllegalArgumentException if the key or the endpoint is not valid; the message says which rule failed.

Open review mode

Pick one or more ways for reviewers to open it:

EziComments.show(activity)   // capture this screen and open review mode
EziComments.hide()           // close it

To sign the reviewer out, call the suspending signOut from a coroutine:

lifecycleScope.launch { runCatching { EziComments.signOut() } }

If the server cannot be reached, the sign-in is still removed from the device and the sign-out finishes the next time the app starts.

Name your screens

Comments are grouped by screen. Give each screen a stable name so its comments stay together across builds:

// Activities and fragments: set it in onResume, so it follows the screen in front.
override fun onResume() {
    super.onResume()
    EziComments.setScreen("checkout")
}

// Compose: once per screen.
@Composable
fun ProfileScreen() {
    EziScreen("profile")
    // ...
}

Without a name, the SDK uses the Activity's class name. Names are 1 to 200 characters.

To tell developers which element a comment is about, the SDK records the element under the pin:

Protect sensitive content

Mask content that must not appear in screenshots. Masked areas are filled before the image is saved or sent:

// Views
EziComments.redact(balanceView)

// Compose
Text(balance, modifier = Modifier.eziRedacted())

For areas you cannot mark, return them from redactedRects (window pixels). To skip screenshots on whole screens, return false from shouldCapture; reviewers can still comment there, and the comment posts without a screenshot:

EziConfig(
    projectKey = "pk_your-project-key",
    endpoint = "https://comments.example.com",
    shouldCapture = { screenId -> screenId != "payment" },
)

Windows with FLAG_SECURE are never captured. The screenshot shows your Activity's window, including maps, video and camera previews drawn in a SurfaceView. It does not include other apps, dialogs or popups that open in their own window, or DRM-protected video (which shows black).

Check that it works

  1. Add your application id under Allowed apps (Android) and turn on Screenshots on the project's General page.
  2. Install a debug build on an emulator or device and open review mode.
  3. Turn on Comment, tap anywhere on the screen, type a comment and tap Post.
  4. Sign in with your email and the 6-digit code.
  5. Open the project's Threads in the dashboard: the comment is there with the screenshot and your device details.

A release build links the no-op module: no button, no review mode, no requests.

Troubleshooting

Other messages reviewers may see are explained in the overview.