diff options
| -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: |