mobilepick photo android
Posted: Fri Mar 18, 2022 12:55 pm
Hi everyone!
Need some advice of my code. I have a stack with several cards, no substacks at all, so it is seems to be simple.?!
On card there are two buttons on card "base" : Camera and Save.
The code of the Camera Button:
on mouseUp pMouseButton
SET THE NAME OF THE TEMPLATEIMAGE TO "THE_IMAGE"
set the width of the templateImage to 640
set the height of the templateImage to 360
SET THE visible of the templateImage TO false
mobilePickPhoto "camera"
if the result is text then
put the result into field "Result"
else
set the text of image "pic" to the text of the image "THE_IMAGE" of this card
set the width of image "pic" of this card to 640
set the height of image "pic" of this card to 360
SET THE VISIBLE OF IMAGE "pic" TO TRUE
RESET THE TEMPLATEIMAGE OF THIS CARD
end if
end mouseUp
The code of the "save button:
on mouseUp pMouseButton
CALL CHECKDBCONN OF CARD "SPLASHCARD"
INSERTPIC
CALL CLOSEDBCONN OF CARD "SPLASHCARD"
PUT EMPTY INTO IMAGE "pic"
SET THE VISIBLE OF IMAGE "pic" TO FALSE
DELETE IMAGE "THE_IMAGE" OF CARD "CAMERA"
DELETE THE LAST IMAGE OF THIS CARD
end mouseUp
I did not copy the insertpic handler, because i'm able to take picture, then able to save it. But trying my second chance to hit Camera button, also able to take picture, but when hit the "ok" button on android camera, i never get back to the card base. Instead it takes me to the first card of the stack, the wery first one what the ide created when started the new project.
Is anybody has a clue what is happenning? Spend 3 days so far but no result...
Thanks
Need some advice of my code. I have a stack with several cards, no substacks at all, so it is seems to be simple.?!
On card there are two buttons on card "base" : Camera and Save.
The code of the Camera Button:
on mouseUp pMouseButton
SET THE NAME OF THE TEMPLATEIMAGE TO "THE_IMAGE"
set the width of the templateImage to 640
set the height of the templateImage to 360
SET THE visible of the templateImage TO false
mobilePickPhoto "camera"
if the result is text then
put the result into field "Result"
else
set the text of image "pic" to the text of the image "THE_IMAGE" of this card
set the width of image "pic" of this card to 640
set the height of image "pic" of this card to 360
SET THE VISIBLE OF IMAGE "pic" TO TRUE
RESET THE TEMPLATEIMAGE OF THIS CARD
end if
end mouseUp
The code of the "save button:
on mouseUp pMouseButton
CALL CHECKDBCONN OF CARD "SPLASHCARD"
INSERTPIC
CALL CLOSEDBCONN OF CARD "SPLASHCARD"
PUT EMPTY INTO IMAGE "pic"
SET THE VISIBLE OF IMAGE "pic" TO FALSE
DELETE IMAGE "THE_IMAGE" OF CARD "CAMERA"
DELETE THE LAST IMAGE OF THIS CARD
end mouseUp
I did not copy the insertpic handler, because i'm able to take picture, then able to save it. But trying my second chance to hit Camera button, also able to take picture, but when hit the "ok" button on android camera, i never get back to the card base. Instead it takes me to the first card of the stack, the wery first one what the ide created when started the new project.
Is anybody has a clue what is happenning? Spend 3 days so far but no result...
Thanks