Quand je télécharge une image je ne peux pas la lire sur certains téléphones (When I download an image I can't read it on certain phones)

bonjour, quand je teste mon application j'ai un problème avec les images.
Sur mon téléphone , je télécharge une image , je la reçois sur googlesheet et j'arrive à la lire. Mais quand j'utilise un autre téléphone je n'arrive pas à la lire ! et pareil si je fais le contraire, c'est à dire je télécharge l'image sur l'autre téléphone, je la reçois sur la googlesheet et j'arrive à la lire, et quand je veux la lire sur mon téléphone je n'ai aucune image .
Est ce que quelqu'un a une solution ? les téléphones ne sont pas des iphone.

show your relevant blocks.

what about revealing the Android device and Android version of both devices?
and

Taifun

voilà les blocs pour sélectionner l'image

bloc du bouton pour lire
Capture2

bloc du Web
Capture4

mon téléphone est un vivo version 13, et l'autre téléphone est Oppo A94 android 11

you are already asking questions here for a while, but you still do not follow the guidelines...which is in your case before taking a screenshot, switch the language to English and provide screenshots in good quality, see again How to ask a question (open new topic)

also what about debugging your project? we already talked about that in detail... if something is not working, as in this case an image is not displayed, display the path of that image in a label to debug... just by looking at the blocks noone is able to find out, what is going on... so what is the value of these blocks you marked with a blue arrow?

Unbenannt

Taifun

Désolé pour la mauvaise qualité.
Pourquoi voulez vous que je débogue puisque tout fonctionne sur mon téléphone ?
Je recommence : avec mon téléphone je télécharge une image , je la stocke sur google sheet, j'arrive a la lire sur l'application, tout ça avec mon téléphone (jusqu'ici tout va bien), mais quand j'utilise un autre téléphone je n'arrive pas a lire l'image. Je voudrais savoir pourquoi, est ce un problème de format par rapport au différents téléphones ?

If it works on device 1, then it should theoretically also work om device 2... now the question is, why does it not work on device 2? To find out, why it does not work, the first step would be to look at that path of the image, which does not get displayed...

Taifun

oui je trouve ça bizarre !
voilà ce que j'obtient avec l'appareil 2, celui dont l'image ne s'affiche pas. C'est le même texte que dans la sheet ! c'est comme s'il n'avait rien de particulier.
Capture1

Que voulez vous dire en parlant de "la valeur" des blocs ?

Now you can check, if that image really is in the ASD of your device

Taifun

Just to clarify a topic...what you are saving in GoogleSheet is not the image...but the path where you have the image on your phone...so when you download that path on another device and try to obtain the image from that other path, logically, the image is not there.

1 Like

oui c'est exact, dans la sheet j'obtient le code (voir dans "do it") mais pas l'image, et donc pas d'image sur l'autre appareil !

qu'est ce que l'ASD de l'appareil ?

ASD = application specific storage

/storage/emulated/0/Android/data/YOURPACKAGENAME/files

This is where you think, the image is stored, but is it really there?

Taifun

I think, I now understand your issue...
On the first device you picked an image and stored the path to the image in your Googlesheet
Then on the other device you read the path to the image and expect to see the image there

The issue is you did not upload and download the image, but only the path to the image, so on device 1 you can see it, because you picked it there, but on all other devices you can't see it, because it does not exist there

Taifun

yes....

oui c'est ça, avez vous une idée de pourquoi ça fait ça !

non l'image est vide, je ne lis rien

You can't save images like that...what you save is what you have previously seen on the label. You can convert the image to base64 and save the generated string to googleSheet (if it is not larger than 50K characters) and decode it when you download it.

avez vous des exemple pour convertir les images en base64 .

If you want to store on google sheets, you "may" have to do this:

but do read the link in the update at the end.

1 Like