Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Image Picker

ANSWERED

I'm using the ImagePicker functionality based on the example in the Fitbit blog sdk-photo-picker-master... I have used the code from the blog and incorporated it into my clockface, when I run the clockface in the simulator it immediately starts the settings page to choose a background image, which is good, however, I can't seam to get my arms around how exactly this is initiated... More specifically I'd like to have a small icon on my clockface that, when clicked, can launch the photo picker as opposed to having it launch everytime the clockface is loaded, which I would assume would be only once in real world scenario. Can someone point me to a good example or guide to assign a click event to an icon on a clockface in order to launch the image picker? I can get an icon to handle a click event with code in app/index.js but I think I am not understanding how it all works together with the settings / companion. Thanks in advance for any / all your time and assistance.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

So long as you don't overwrite the image file on the watch, it will still be there. Just change the href of the image element back to the original filename (as it was in the .gui).

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

I suspect that what you want isn't possible. The watch app can cause the companion app to wake up and start running code, but neither of them can cause the settings screen to appear on the companion. That's something that the user has to initiate.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Ok thanks a bunch... makes sense.

Best Answer
0 Votes

I actually have an additional related question... if I wanted to include a background with a clockface I just set the background in the .gui file but if I use the image picker, obviously the original image will be replaced. How can I ensure that the original background can be chosen sometime subsequent to a user choosing a new background after app installation? In other words, the background installed with the app will be changed but is it recoverable somehow? I’m sure it wouldn’t  automatically be downloaded to the users phone, is this possible?

 

Thanks again in advance.

 

Sincerely,

Rich

Best Answer
0 Votes

So long as you don't overwrite the image file on the watch, it will still be there. Just change the href of the image element back to the original filename (as it was in the .gui).

Peter McLennan
Gondwana Software
Best Answer
0 Votes