Skip to content

Commit

Permalink
Merge branch 'ADP-2218-Observer-mode-after-330' into develop
Browse files Browse the repository at this point in the history
* ADP-2218-Observer-mode-after-330:
  Snippets for current Android
  • Loading branch information
Lutik-sun committed Feb 7, 2025
2 parents 3d9f936 + 7d9cc2e commit a0fc994
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion versioned_docs/version-3.0/report-transactions-observer-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ If you don't call `.restorePurchases()`, Adapty won't recognize the transaction,
If you use Adapty paywalls, link your transaction to the paywall that led to the purchase using the `setVariationId` method. This ensures the purchase is correctly attributed to the triggering paywall for accurate analytics. This step is only necessary if you're using Adapty paywalls.

```kotlin showLineNumbers
Adapty.restorePurchases { result ->
if (result is AdaptyResult.Success) {
// success
}
}

Adapty.setVariationId(transactionId, variationId) { error ->
if (error == null) {
// success
Expand Down Expand Up @@ -85,6 +91,12 @@ If you don't call `.restorePurchases()`, Adapty won't recognize the transaction,
If you use Adapty paywalls, link your transaction to the paywall that led to the purchase using the `setVariationId` method. This ensures the purchase is correctly attributed to the triggering paywall for accurate analytics. This step is only necessary if you're using Adapty paywalls.

```java showLineNumbers
Adapty.restorePurchases(result -> {
if (result instanceof AdaptyResult.Success) {
// success
}
});

Adapty.setVariationId(transactionId, variationId, error -> {
if (error == null) {
// success
Expand Down Expand Up @@ -207,7 +219,7 @@ After the preliminary configuration is done, you need to associate the transacti

### Reporting transactions

Use `.restorePurchases()` to report a transaction to Adapty in Observer Mode, as explained on the [Restore Purchases in Mobile Code](estore-purchase) page.
For Android and Android-based crossplatforms, use `.restorePurchases()` to report a transaction to Adapty in Observer Mode, as explained on the [Restore Purchases in Mobile Code](restore-purchase) page. iOS Adapty SDK listens

:::warning

Expand Down

0 comments on commit a0fc994

Please sign in to comment.