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.
Best Answer
@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.
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.
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
Best AnswerCurrently 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
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.
Best Answer
@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.
Best Answer
@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.
Fantastic! Thank uou!
Best Answer