diff options
| author | greenart7c3 <greenart7c3@proton.me> | 2023-11-29 11:22:26 -0300 |
|---|---|---|
| committer | greenart7c3 <greenart7c3@proton.me> | 2023-11-29 11:22:26 -0300 |
| commit | 70a722b5d6526bf871a06290df8833492ac77b92 (patch) | |
| tree | 6eb2cee607e19c161f1ac3bad5fc0f5f4c1372d4 /100.md | |
| parent | 86e44b75eb166b600affdc5248e0fe246a6ebe9b (diff) | |
add permissions
Diffstat (limited to '100.md')
| -rw-r--r-- | 100.md | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -43,6 +43,17 @@ intent.`package` = "com.example.signer" | |||
| 43 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:")) | 43 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:")) |
| 44 | intent.`package` = "com.example.signer" | 44 | intent.`package` = "com.example.signer" |
| 45 | intent.putExtra("type", "get_public_key") | 45 | intent.putExtra("type", "get_public_key") |
| 46 | // You can send some default permissions for the user authorize for ever | ||
| 47 | val permissions = listOf( | ||
| 48 | Permission( | ||
| 49 | "sign_event", | ||
| 50 | 22242 | ||
| 51 | ), | ||
| 52 | Permission( | ||
| 53 | "nip44_decrypt" | ||
| 54 | ) | ||
| 55 | ) | ||
| 56 | intent.putExtra("permissions", permissions.toJson()) | ||
| 46 | context.startActivity(intent) | 57 | context.startActivity(intent) |
| 47 | ``` | 58 | ``` |
| 48 | - result: | 59 | - result: |