SecUSo / privacy-friendly-qr-scanner

Privacy Friendly QR Code Scanner for Android
https://secuso.aifb.kit.edu/QR_Scanner.php
GNU General Public License v3.0
342 stars 45 forks source link

Deep-link handling #224

Open jokakilla opened 8 months ago

jokakilla commented 8 months ago

First of all thanks for the awesome app :) I have a corner-case that isn't working as expected. I want to start an app via QR code containing a deep-link with custom schema. See this regarding deep-links: https://developer.android.com/training/app-links/deep-linking https://medium.com/androiddevelopers/the-deep-links-crash-course-part-1-introduction-to-deep-links-2189e509e269

E.g. bm://test/bla

When scanning such custom QR codes the app always tries to open with a browser. The reason seems to be that the code always adds "http://" in front of the deeplink. bm://test/bla -> http://bm://test/bla

When replacing (quick and dirty for testing) this line https://github.com/SecUSo/privacy-friendly-qr-scanner/blob/f05e0eadb58ed197c2c405c6e2e2a07457c9fa77/app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/resultfragments/URLResultFragment.java#L101 by if(false) { so the app always ends up in else the deep-link handling is working fine in my usecase.

jokakilla commented 8 months ago

I've created a pull request that is working for the scenarios I've tested. But it's not unlikely I've missed something.

https://github.com/SecUSo/privacy-friendly-qr-scanner/pull/225