kpwhri / heartsteps

Heart Steps 2.0 Application
8 stars 1 forks source link

If Fitbit API is authorized in the fitbit.com, the last screen doesn't close by itself. #217

Open jup014 opened 3 years ago

jup014 commented 3 years ago

There is a message to close it, but it is in a small font, and hard to read.

jup014 commented 3 years ago

If I click "Done" after the screen, the "Connect to Fitbit" screen stays. I have to press the "Next" button.

nickdotreid commented 3 years ago

This is the result of the browser API we were using in iOS getting deprecated by iOS.

I didn't try to fix this issue when updating the code, but I know @klasnja doesn't like this functionality.

One that HTML page running javascript to close the browser window won't work. We could spend the time to make that page look pretty, but it's an API page and IMHO shouldn't be styled.

We hide this page when authorizing fitbit in the website by redirecting the person's browser to a different page that checks that authorization worked correctly.

There are two ways to fix this issue: (1) Send a silent notification from the server to the app, that only the fitbit authorize page listens for -- which causes the browser to close (2) Add app URLs for both iOS and Android (iOS has some weird registration process) -- then redirect from the in-app browser back to the app it's self.... hopefully causing some event that can close the in app browser.

klasnja commented 3 years ago

The third option is to just make the text on that page bigger, so a user can read it. I don’t mind closing the window manually. It’s not a brilliant user experience, but it’s not terrible either. What I mind is that there is clearly text there, but it’s impossible to read. If we just make that text a header 1 or something like that, it may not need any other styling. It just needs to be legible, not necessarily beautiful.

On Jul 1, 2021 at 8:41:12 PM, Nick Reid @.***> wrote:

This is the result of the browser API we were using in iOS getting deprecated by iOS.

I didn't try to fix this issue when updating the code, but I know @klasnja https://github.com/klasnja doesn't like this functionality.

One that HTML page running javascript to close the browser window won't work. We could spend the time to make that page look pretty, but it's an API page and IMHO shouldn't be styled.

We hide this page when authorizing fitbit in the website by redirecting the person's browser to a different page that checks that authorization worked correctly.

There are two ways to fix this issue: (1) Send a silent notification from the server to the app, that only the fitbit authorize page listens for -- which causes the browser to close (2) Add app URLs for both iOS and Android (iOS has some weird registration process) -- then redirect from the in-app browser back to the app it's self.... hopefully causing some event that can close the in app browser.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kpwhri/heartsteps/issues/217#issuecomment-872634078, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTZF7N5ZXIH4KS2DEXIFOTTVUDKRANCNFSM47ICSMVQ .