Android Hero surface
surface
Android SDK: Hero surface
Android app services should call sdk.hero() for approved product actions. The SDK composes credentials, receipt persistence, executor policy, and JNI backed Mobile Node.
Hero on Android should be exposed as Java plus Kotlin-friendly adapters. It returns receipts and operation handles, while keeping JNI and keyshare file details inside the SDK.
Java Hero API
Hero evaluates policy, routes to the JNI-backed bridge, and returns an operation handle. Transfer requires user presence, so the progress stream emits a user-presence state before the signing step. The receipt is the app recovery object; persist it before updating UI state.
java
CipherActAndroidSdk sdk = CipherActAndroidSdk.builder()
.config(DvmOpenConfig.duo("group.com.example.app"))
.mobileNode(DvmMobileNode.nativeNode(vaultDir))
.policyProvider(new MyPolicyProvider())
.build();
// Transfer with progress observation
TransferOperation transferOp = sdk.hero().transfer(
TransferRequest.builder()
.wallet(walletId)
.asset("ETH")
.recipient(recipientAddress)
.amount("0.1")
.idempotencyKey("wire-2026-0142")
.build()
);
for (OperationProgress p : transferOp.progress()) {
if (p instanceof OperationProgress.WaitingForUserPresence) {
biometricChallenge.complete();
}
}
TransferReceipt receipt = transferOp.awaitReceipt();