diff --git a/README.md b/README.md index e028646c..b012be3a 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,32 @@ Amber is a nostr event signer for Android. It allows users to keep their nsec se Amber uses Intents and Content Resolvers to communicate between applications. -To be able to use Amber in your application you should add the following package visibility needs: +To be able to use Amber in your application you should add the following in your AndroidManifest.xml: ```xml - + + + + + ``` +Then you can use this function to check if there's an external signer installed: + +```kotlin +fun isExternalSignerInstalled(context: Context): Boolean { + val intent = + Intent().apply { + action = Intent.ACTION_VIEW + data = Uri.parse("nostrsigner:") + } + val infos = context.packageManager.queryIntentActivities(intent, 0) + return infos.size > 0 +} +``` + ## Using Intents To get the result back from Amber you should use registerForActivityResult or rememberLauncherForActivityResult in Kotlin. If you are using another framework check the documentation of your framework or a third party library to get the result.