alpha-wallet-android icon indicating copy to clipboard operation
alpha-wallet-android copied to clipboard

Scan WalletConnect QR codes (`wc:`) in cameras outside of AlphaWallet should open AlphaWallet and prompt for connection

Open hboon opened this issue 3 years ago • 10 comments

Tried with built-in scanner on my Huawei

hboon avatar Oct 13 '21 04:10 hboon

Previously this worked - I suspect Android team have added some more hoops we need to jump through to get it working.

JamesSmartCell avatar Oct 17 '21 23:10 JamesSmartCell

@hboon @JamesSmartCell can you attach some sample qr codes to test?

mpaschenko avatar Oct 18 '21 10:10 mpaschenko

This one should trigger a WalletConnect open:

image

(or just go to https://example.walletconnect.org/)

This one should trigger an EIP681 open:

eip681

These links start with wc: and ethereum: respectively. If you check the Manifest you can see I added the "wc" intent. This works if I call the wc: from a browser, but it should also work from scanning from the camera. Might have to register an intent for it to work with the camera.

JamesSmartCell avatar Oct 18 '21 10:10 JamesSmartCell

You can see it working if you open https://example.walletconnect.org/ in a phone browser app like Brave etc, then click 'mobile' instead of QR code and it should give you AlphaWallet as an option to open it.

JamesSmartCell avatar Oct 18 '21 10:10 JamesSmartCell

@JamesSmartCell @hboon seems like embedded camera qr code scanner just ignores custom schemas, tried to send view action through adb - it works well, and tried with 3rd party qr code scanner like this one https://play.google.com/store/apps/details?id=com.gamma.scan the same it can handle such URLs pretty well... and seems there is no way to register that...

mpaschenko avatar Oct 18 '21 13:10 mpaschenko

@mpaschenko James might have a clearer answer, but it’s not a problem with the camera in the app. But we would like cameras outside the app, specifically the system camera app and 3rd party camera apps (if it’s possible) to launch AlphaWallet when it scans such QR codes.

hboon avatar Oct 18 '21 13:10 hboon

@mpaschenko James might have a clearer answer, but it’s not a problem with the camera in the app. But we would like cameras outside the app, specifically the system camera app and 3rd party camera apps (if it’s possible) to launch AlphaWallet when it scans such QR codes.

Yes, it seems like there should be a way to register intents for the system camera.

I checked the NSW covid safe app eg:

https://tundeworld.com/sites/default/files/inline-images/NSW_QR_code_0.JPG

You can see in their barcode they place the URL at the front, and intercept the URL when it's launched like with our https://aw.app/ system (so it goes directly to the app if it's installed). Then, it may not be possible as neither "wc:" or "ethereum:" are recognised by the system camera.

I have installed most crypto wallet apps, and none of them can intercept a wc: or ethereum: directly. Maybe ask the team at Google Android what the policy is in the newsgroup, they're pretty good at answering these queries.

Don't spend too much time on it! If the link is sent from a website, then simply adding the "ethereum:" intent should be enough.

JamesSmartCell avatar Oct 18 '21 23:10 JamesSmartCell

@JamesSmartCell, @seabornlee or @justindg would you help re-assign among yourself and close this?

hboon avatar May 30 '22 02:05 hboon

(if it's technically possible)

hboon avatar May 30 '22 02:05 hboon

Looking into this

justindg avatar Jun 20 '22 03:06 justindg

I failed to update this thread, but this is not possible at the moment due to the custom URI provided by WalletConnect.

justindg avatar Mar 10 '23 05:03 justindg