From c3cc32857e79e7ea8dac98f1960038e38bef7471 Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Mon, 11 Dec 2023 08:23:58 -0300 Subject: [PATCH] add example of multiple return when using intents --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 1cff0775..3ed756cc 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,14 @@ intent.`package` = "com.greenart7c3.nostrsigner" - If the user approved intent it will return the **signature**, **id** and **event** fields ```kotlin + // if you used the flags (Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP) when sending the intent and there's more than 1 event amber will return an array with the results + [ + {"package":null,"signature":"event_signature","id":"event_id"}, + {"package":null,"signature":"event_signature","id":"event_id"}, + {"package":null,"signature":"event_signature","id":"event_id"} + ] + + // if you sent only 1 event or did not used the flags (Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP) Amber will return the fields signature, id and event val signature = intent.data?.getStringExtra("signature") // the id you sent val id = intent.data?.getStringExtra("id")