I'm trying to take a picture from an Android phone's camera. Using the combo of
ShowImageCaptureScreen(),
IsCapturingImage(), and
GetCapturedImage() no longer seems to work.
I'm compiling with AppGameKit 2.0.20 and running on a Galaxy S7. The test code below (which I grabbed from the ShowImageCaptureScreen() page) activates the phone's camera fine, and it seems to capture the picture. But in the final loop, it just shows a red X over a black & white checkerboard.
I know that these commands used to work in the past. Is this known to be temporarily broken in 2.0.20? Or am I doing something wrong?
rem
rem AGK Application 1.08 Beta 13
rem MR
rem get image from camera by dialog
SetDisplayAspect( 4.0/3.0 )
SetVirtualResolution( 1024, 768 )
SetResolutionMode( 1 )
SetSyncRate( 60, 0 )
SetOrientationAllowed( 1,1,1,1 )
image=0
if GETCAMERAEXISTS() =1
if SHOWIMAGECAPTURESCREEN() =1
while ISCAPTURINGIMAGE() =1
sync()
endwhile
image=GETCAPTUREDIMAGE()
if image=0 then end
idsprite = CreateSprite ( image )
sx#=1024.0/getimagewidth(image)
sy#= 768.0/getimageheight(image)
SetSpriteScale( idsprite, sx#, sy# )
endif
else
message("no cam")
endif
ClearScreen()
setclearcolor(128,128,128)
ende=1
AddVirtualButton( ende,32, 32, 64 )
SetVirtualButtonText( ende, "Ende" )
SetVirtualButtonAlpha( ende, 192 )
do
if GetVirtualButtonPressed( ende ) then exit
Sync()
loop
end