MobilePickPhoto "camera"
Posted: Sat Jul 09, 2022 11:00 am
Hello everyone!
Having trouble with MobilepckPhoto "camera":
The application is working for a while and suddenly MobilepckPhoto "camera" does not return to the card it has launched of, instead returns to the first card of the stack.
Standalone settings ok , checked to android 7.1, on the device i have added permissions for camera and storage as well.
Trying to use this code on android 7,11,12
my code is:
on mouseup
set the lockloc of the templateimage to true
set the width of the templateImage to 1280
set the height of the templateImage to 760
SET THE LEFT of the templateImage to 0
SET THE TOP of the templateImage to 0
SET THE visible of the templateImage TO false
mobilePickPhoto "camera"
if the result is TEXT then
ANSWER the result
else
put FIELD "T" INTO tT
PUT FIELD "D" INTO tD
PUT RANDOM(1000) INTO tR
PUT tT &"-UZ-"& tD & "-" & tR INTO tFILENAME
set the defaultFolder to "/storage/emulated/0/Documents/AKPICTURES"
put THE last image into url("binfile:" & tFILENAME & ".jpg")
----------------------------------------------------
ANSWER "Picture saved !" & tFILENAME
CALL MOUSEUP OF BUTTON "RET"-- this code is below, fills datagrid with list of the filenames
DELETE THE LAST IMAGE OF THIS CARD
RESET THE TEMPLATEIMAGE OF THIS CARD
GO TO THE CARD "CAMERA"
end if
-------also anything i want to have here, nothing works, not even a simple answer " "
end mouseup
Anybody has an idea?
thank you
Sorry one more thing
in mouseup of button "RET" i do the following:
set the defaultFolder to "/storage/emulated/0/Documents/AKPICTURES"
## we need to create a valid URL for the file:
put "file://" & "/storage/emulated/0/Documents/AKPICTURES" & slash & tFILENAME into tURL
## URLS do not like SPACES, so we need to avoid them:
replace " " with "%20" in tURL
set the url of WIDGET "BROWSERPIC" to tURL
SET THE VISIBLE OF WIDGET "BROWSERPIC" TO TRUE
this works, but how to set the content of the browser widget when receives the picture to fit in?
i am using community edition 9.6.3
thanks
Having trouble with MobilepckPhoto "camera":
The application is working for a while and suddenly MobilepckPhoto "camera" does not return to the card it has launched of, instead returns to the first card of the stack.
Standalone settings ok , checked to android 7.1, on the device i have added permissions for camera and storage as well.
Trying to use this code on android 7,11,12
my code is:
on mouseup
set the lockloc of the templateimage to true
set the width of the templateImage to 1280
set the height of the templateImage to 760
SET THE LEFT of the templateImage to 0
SET THE TOP of the templateImage to 0
SET THE visible of the templateImage TO false
mobilePickPhoto "camera"
if the result is TEXT then
ANSWER the result
else
put FIELD "T" INTO tT
PUT FIELD "D" INTO tD
PUT RANDOM(1000) INTO tR
PUT tT &"-UZ-"& tD & "-" & tR INTO tFILENAME
set the defaultFolder to "/storage/emulated/0/Documents/AKPICTURES"
put THE last image into url("binfile:" & tFILENAME & ".jpg")
----------------------------------------------------
ANSWER "Picture saved !" & tFILENAME
CALL MOUSEUP OF BUTTON "RET"-- this code is below, fills datagrid with list of the filenames
DELETE THE LAST IMAGE OF THIS CARD
RESET THE TEMPLATEIMAGE OF THIS CARD
GO TO THE CARD "CAMERA"
end if
-------also anything i want to have here, nothing works, not even a simple answer " "
end mouseup
Anybody has an idea?
thank you
Sorry one more thing
in mouseup of button "RET" i do the following:
set the defaultFolder to "/storage/emulated/0/Documents/AKPICTURES"
## we need to create a valid URL for the file:
put "file://" & "/storage/emulated/0/Documents/AKPICTURES" & slash & tFILENAME into tURL
## URLS do not like SPACES, so we need to avoid them:
replace " " with "%20" in tURL
set the url of WIDGET "BROWSERPIC" to tURL
SET THE VISIBLE OF WIDGET "BROWSERPIC" TO TRUE
this works, but how to set the content of the browser widget when receives the picture to fit in?
i am using community edition 9.6.3
thanks