sibbl / fitbit-qrcodes

Fitbit app to display QR codes, which can either be generated or imported from screenshots.
https://gallery.fitbit.com/details/489b1207-0bac-432a-b919-6329fa8ccf12
9 stars 3 forks source link

QR won't display if source is image and using iPhone #7

Open writteninr3d opened 2 years ago

writteninr3d commented 2 years ago

Hi there,

My wife and I each got a Versa 2 for Christmas. The app works well in my watch (thanks SO much!). However, my wife's watch will not display a QR code, which is an image. Text content will display a QR code, but not image content.

I have a feeling the reason for the discrepancy is that she uses an iPhone while I'm on Android.

If my hunch is correct I suspect this could be a setting to adjust on the device, but I'm not sure which one.

I'm happy to approach Fitbit for support but just checking - have you tested this scenario (phone = iPhone, source = image) yourself? Does it work?

Thanks in advance,

-Ben

sibbl commented 2 years ago

Hi Ben,

thanks for posting the issue!

First of all, unfortunately I don't own any Apple software, so testing it with an iPhone isn't possible for me. As far as I know, the whole Fitbit app is built on web tech (the settings panel is React code) and ideally it shouldn't behave differently. Except when Apple does some things differently in their Safari browser implementation and/or image conversion of various formats.

Some things that might be worth to check and test:

  1. Did you try to load the exactly same image into the app on both your Android and iOS devices and can confirm that the exact same image results in different behavior?
  2. You can try to resize the image to 200x200 px yourself. Then it shouldn't be cropped or resized by the Fitbit app before sending it to the device to avoid troubles in these algorithms.
  3. Trying different image formats might also help. Maybe you can try converting the image into png, gif or jpg and give them a try?

Some technical background: us developers don't have much to say in the image processing parts. The image gets loaded by the Fitbit app, it's cropped by the GUI of the Fibit app and we developers just tell it the size we need (in this app's case 200x200 px) and the Fitbit app itself resizes it, too. Then I load the image itself into the app on the phone (Image.from), which I just convert using a method provided by Fitbit in to an image the watch understands (image.export) and send it to the watch. So I doubt there's much I can do differently there.

I also don't think the last two steps are causing this as generating images from text content wouldn't work as well. In this case I just generate the QR code by manually building an Image (instead of using Image.from) from bits and bytes and use exactly the same code like image.export and sending it to the watch.

writteninr3d commented 2 years ago

Hi sibbl,

Thanks for your prompt response, the technical background was insightful :)

I was using the same images and did try a couple, but there may have been differences due to the way the image arrived on the devices. I will test more images which encompass a broader array of image formats and include the 200px square resolution, and provide you with the documented results.

I will also provide some screenshots of the settings UIs, as I believe there are some slight differences between iPhone and Android, which as you say could be to do with the different browser engines rendering the WebView component.

I'll be back home from tomorrow, so I can get the results to you maybe Thursday or Friday, I hope that's ok. And if you think it'd needs to go to Fitbit I will get them involved, as long as I can find their contact details...

-Ben

sibbl commented 2 years ago

Thanks a lot. I'm looking forward to your findings!

Regarding Fitbit contact I guess the best address would be their developer community forum, but I often also just didn't get an answer some years back and I'm afraid their priorities for older SDKs might be not that high: https://community.fitbit.com/t5/SDK-Development/bd-p/sdk

But let's see and try our best to enhance the app 😊 thanks for being part of it!

lindseyburnett commented 2 years ago

Wondering if there's been any update on this before I start scouring those SDK forums?