Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add starting from MIUI fingerprint shortcut #388

Open
cewbdex opened this issue Aug 31, 2023 · 10 comments
Open

Add starting from MIUI fingerprint shortcut #388

cewbdex opened this issue Aug 31, 2023 · 10 comments

Comments

@cewbdex
Copy link
Contributor

cewbdex commented Aug 31, 2023

Hello, is it be possible to implement starting the app from the MIUI? This happens, when you unlock the device with fingerprint and keep holding the finger on the screen:
Screenshot_2023-08-31-09-30-10-530_org mozilla firefox
Since I have disabled the built in Xiaomi reader, it does not work, I tried to capture the handle with interceptor and it looks like this:
Screenshot_2023-08-29-07-26-07-189_io github muntashirakon AppManager
Would it be possible to handle this somehow to open the app?

@markusfisch
Copy link
Owner

Yes, this should be possible with the corresponding intent filter in the manifest.

Binary Eye already includes a filter for com.google.zxing.client.android.SCAN, which was used in the original (and abandoned) ZXing app.

I'm just not sure if it's a good idea to add it to the official version, because then, on every Xiaomi device, the app chooser would come up (at least once) if a user starts the Xiaomi reader once Binary Eye is installed.

@cewbdex
Copy link
Contributor Author

cewbdex commented Sep 1, 2023

That's a valid concern, however I don't see a reason for installing Binary Eye, if I was fine with the integrated qr scanner, I installed it, because BE works much better and does not call home. I think it would be acceptable sacrifice that person wanting to use both would one time see an app selector.

@markusfisch
Copy link
Owner

I finally have added the intent to Version 1.61.0, which is on it's way through Google Play and should become available soon. I hope I've configured the intent correctly as I don't have a Xiaomi device to test it, unfortunately 😬

@cewbdex
Copy link
Contributor Author

cewbdex commented Oct 14, 2023

Thank you, I will test it as soon as possible, my phone is unfortunately broken now, so it will take a bit longer.

@cewbdex
Copy link
Contributor Author

cewbdex commented Nov 15, 2023

Unfortunately no one wants to fix my phone, so I assembled it (don't need SIM for this) to test your changes and it does not show BE as option (1.61 from F-Droid), the app is nor listed in Interceptor as handler. Sorry I did not copy the info before, didn't know it was possible:

URI intent://details?id=com.xiaomi.scanner#Intent;scheme=market;launchFlags=0x13000000;end

VERSION 1
ACTION android.intent.action.VIEW
DATA market://details?id=com.xiaomi.scanner
FLAGS 0x13000000

I think if you use interceptor, you can paste this to it and you can see if BE is present or not, if you don't use, I will test it later. I have asked ChatGPT for fun and his code is different than yours (most likely wrong as always), just for fun, as I don't have resources to build app myself:

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data
            android:scheme="market"
            android:host="details"
            android:pathPrefix="/id/com.xiaomi.scanner" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>

@markusfisch
Copy link
Owner

Thanks a lot for checking this out! Well appreciated!

And with this info I was able to test fire the intent via adb, so it's hopefully correct this time! Here's the commit. ChatGPT got it almost right 😉 Just the pathPrefix didn't match the query part of the URL, but this is a tricky one to get right with Intent Filters anyway.

So this will be in the next version! I'll let you know when it's released, and hopefully you can confirm it to be working this time.

@markusfisch
Copy link
Owner

Version 1.61.2 with the latest adjustments is out. I hope it's working this time!

@cewbdex
Copy link
Contributor Author

cewbdex commented Nov 26, 2023

Thank you, sadly still not working. Not showing up to choose from and nor interceptor lists this as an available activity :(

@markusfisch
Copy link
Owner

Too bad 😞 Sorry it's still not working.

Hm, unfortunately I'm also running out of ideas what to try, especially because the intent here is working, and that is matching the info from interceptor.

Can you re-fire the intent from interceptor? Does this work?

@cewbdex
Copy link
Contributor Author

cewbdex commented Nov 30, 2023

My phone is now being repaired, they have told me that they don't know if it will ever work again, if so, I will do testing. When I have opened the interceptor by the shortcut, BE was not listed as an available activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants