With the full path mentioned before it works on 4 different phones with android 5,6 and 7. so this seems to be the default folder for downloads...
i found a solution for the image problem:
put "/mnt/sdcard/Download/" & gDataWrestler["gimmickname"] & ".jpg" /*gDataWrestler["image"]*/ into field "profileimage" of group "profilewrestler"
put field "profileimage" into gprofileimage
set the filename of image "profileimage" of group "profilewrestler" to gprofileimage
<-- this works finde for me as long as the pictures a stored in the download folder of the phone.
my actual problem is now how to save or update data in the database itself. remember: i have the sqlite-file of the database inside the downloads folder of the phone. on my stack i have a button to update the database in the game from this path. it all works fine...
now i want to update for example the "gimmickname" field of the database of a specific person.
e.g.: the person Chris Park (id=1) has the "gimmickname" = Abyss. Now i want to change the gimmickname to lets say : "The Monster"
i used this code to open the database, save the text of the field name to variable gupdatename and try to update the field "gimmickname" in the database with the text of variable gupdataname:
# open the database:
put revOpenDatabase("sqlite", "/mnt/sdcard/Download/runrevemails.sqlite", , , , ) into dbID
put field "name" of group "profilewrestler" into gupdatename
# up to here everything works... it answers the text inside the field "name" now inside the variable gupdatename...
# the following was a try at first to save the text of gupdatename to person "id=1" in the database...
put "UPDATE wrestler SET gimmickname = 'gupdatename' WHERE id = '1'" into sql
revExecuteSQL dbID, sql
My problem is that livecode changes the text of field gimmickname in the database for id 1 to the text: "gupdatename" and not to the text saved inside the variable gupdatename.
PS: problem solved with this:
put "UPDATE wrestler SET gimmickname=" & "'" & (item 1 of gupdatename) & "'" & "WHERE ID = '1' " into sql
The next step would be to change this not for a special id written in the script but for the highlighted person of the datagrid.
PS: checked with this code:
put "UPDATE wrestler SET gimmickname=" & "'" & (item 1 of gupdatename) & "'" & "WHERE ID =" & "'" & (item 1 of gprofileid2) & "'" into sql