eraeco / pay

Checkard is a peer-to-peer check payment system for ERA PAY.
MIT License
4 stars 0 forks source link

Native mobile mailto #14

Open jazzyjackson opened 1 month ago

jazzyjackson commented 1 month ago

I actually don't know what you mean by this, can you elaborate

amark commented 4 weeks ago

on android, clicking the gmail button... opened mobile browser gmail and FAILED to compose an email with the mailto template. However, if I clicked our other email button, then it opened the gmail APP and correctly composed the mailto template.

I think similar with iOS... so I think on mobile we should hide the "choose email provider" options and immediately trigger the mailto link. Desktop needed the "choose" option because the OS native mailto often is completely useless, and the gmail one triggers correctly.

(maybe can extend/incldue in this issue... adding buttons for other common providers, hopefully they have similar compose/template links)

amark commented 3 weeks ago

To fix add a module that checks if mobile and switches the "send" button to be the mailto code and cleans up the provider options to not display.

Let's assume mobile if screen height > width, aka portrait assumes mobile, unless have equally easier and better option detect mobile OS.

jazzyjackson commented 2 weeks ago

we can either regex the navigator.userAgent for \android|ipad|iphone\ etc or check screen.orientation for portrait && check if navigator.maxTouchPoints > 0 so we're on a vertical touchscreen

Will still go straight to native mailto on touchscreen laptops with skinny windows, but, likely a small proportion of false positives there.