06-04-2020 07:25
06-04-2020 07:25
Hi,
after trying dozens of different urls for my icon to be displayed in <TextImageRow /> ( it is shown in the simulator but not in the proper build on my phone) i tried the url provided in the doc from the settings API :
still it does not work : is it because of my phone? is there a way to make it work?
par avance Merci !!!
Answered! Go to the Best Answer.
06-04-2020 16:13 - edited 06-04-2020 16:16
06-04-2020 16:13 - edited 06-04-2020 16:16
@Slumberlander wrote:thank you @morningReign ,
it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!
i have already tried everyone I know...
thank you
To do local addressing, you need to import the file so it will be loaded with the app:
import sun from "./01d.png"
And use brackets to access the variable:
<TextImageRow
label="Big Label"
sublabel="Small label"
icon={sun}
/>
Load the file into the 'settings' directory; the './' points to the directory the JSX file is in.
06-04-2020 07:32 - edited 06-04-2020 07:33
06-04-2020 07:32 - edited 06-04-2020 07:33
Not sure this is the problem you're describing, but I had a similar issue,...
I recall I had to include an import statement for the image at the head of the jsx file so it would be available for use.
06-04-2020 08:45
06-04-2020 08:45
thank you @morningReign ,
it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!
i have already tried everyone I know...
thank you
06-04-2020 09:04 - edited 06-04-2020 09:05
06-04-2020 09:04 - edited 06-04-2020 09:05
Currently at my second job (the one that pays me); can dig back later, but not currently at my workstation.
However, I think it should look like
import myImage from './myImage.jpg';
Then use myImage as the url
06-04-2020 14:04
06-04-2020 14:04
Could the original problem have something to do with URL security? The sim isn't all that fussy, but the Fitbit app requires https (not http) for most addresses.
06-04-2020 16:12
06-04-2020 16:12
@Gondwana wrote:Could the original problem have something to do with URL security? The sim isn't all that fussy, but the Fitbit app requires https (not http) for most addresses.
Too true, I've run into that too with web page access. from the settings page.
06-04-2020 16:13 - edited 06-04-2020 16:16
06-04-2020 16:13 - edited 06-04-2020 16:16
@Slumberlander wrote:thank you @morningReign ,
it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!
i have already tried everyone I know...
thank you
To do local addressing, you need to import the file so it will be loaded with the app:
import sun from "./01d.png"
And use brackets to access the variable:
<TextImageRow
label="Big Label"
sublabel="Small label"
icon={sun}
/>
Load the file into the 'settings' directory; the './' points to the directory the JSX file is in.
06-04-2020 16:50
06-04-2020 16:50
Fantastic! Thank uou!
06-04-2020 17:21 - edited 06-04-2020 17:22
06-04-2020 17:21 - edited 06-04-2020 17:22
@Slumberlander wrote:Fantastic! Thank uou!
Vous êtes les bienvenus