wewewe718 / QrAndBarcodeScanner

An Android app for scanning QR codes and barcodes
The Unlicense
685 stars 136 forks source link

Scheme to use for my Android app #162

Open sengsational opened 6 months ago

sengsational commented 6 months ago

I created a scheme in my Android app, something like this:

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:scheme="acct" />
</intent-filter>

Note that if I run a command line on the phone, it does find my app:

adb shell am start -d "acct:foobar"

I would like QrAndBarcodeScanner to find my app using the scheme defined. I can change acct to anything, but I don't want to change it to https because that requires more configuration than I need. I simply want the device to open or bring my app to the foreground if they scan an QR code that starts out acct://

What I presume is that QrAndBarcodeScanner has a list of things it "knows" to open (like https, among others).

My question is, what are the generally recognized schemes that I might use in my app instead of acct QrAndBarcodeScanner knows to try to open an app, as opposed to just put the text in the clipboard?

I found an stackoverflow question that might also be a good place to answer: https://stackoverflow.com/questions/75783410/open-my-app-for-a-uri-not-url-in-a-qr-code-on-android