diff options
Diffstat (limited to '55.md')
| -rw-r--r-- | 55.md | 29 |
1 files changed, 29 insertions, 0 deletions
| @@ -72,6 +72,35 @@ Set the Signer package name: | |||
| 72 | intent.`package` = "com.example.signer" | 72 | intent.`package` = "com.example.signer" |
| 73 | ``` | 73 | ``` |
| 74 | 74 | ||
| 75 | If you are sending multiple intents without awaiting you can add some intent flags to sign all events without opening multiple times the signer | ||
| 76 | |||
| 77 | ```kotlin | ||
| 78 | intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
| 79 | ``` | ||
| 80 | |||
| 81 | If you are developing a signer application them you need to add this to your AndroidManifest.xml so clients can use the intent flags above | ||
| 82 | |||
| 83 | ```kotlin | ||
| 84 | android:launchMode="singleTop" | ||
| 85 | ``` | ||
| 86 | |||
| 87 | Signer MUST answer multiple permissions with an array of results | ||
| 88 | |||
| 89 | ```kotlin | ||
| 90 | |||
| 91 | val results = listOf( | ||
| 92 | Result( | ||
| 93 | package = signerPackageName, | ||
| 94 | result = eventSignture, | ||
| 95 | id = intentId | ||
| 96 | ) | ||
| 97 | ) | ||
| 98 | |||
| 99 | val json = results.toJson() | ||
| 100 | |||
| 101 | intent.putExtra("results", json) | ||
| 102 | ``` | ||
| 103 | |||
| 75 | Send the Intent: | 104 | Send the Intent: |
| 76 | 105 | ||
| 77 | ```kotlin | 106 | ```kotlin |