Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / does not work

Author
Message
Rickyes
8
Years of Service
User Offline
Joined: 7th Sep 2015
Location:
Posted: 30th Dec 2018 07:58
After last update, agk 2018/12/12, I found problems with the use of the camera on smartphones.The programs run with the smartphone where you use these commands do not work anymore. This had happened in the past resolved with next update of agk.I wonder why and what can I do now to use the camera with this version of agk.

Dopo ultimo aggiornamento,agk 2018/12/12,ho riscontrato problemi con l'utilizzo della camera su smartphone.I programmi eseguiti con la smartphone dove si fa uso di questi comandi non funzionano piu'.Questo era gia' accaduto in passato risolto con successivo aggiornamento di agk.Mi domando il perchè e cosa posso fare adesso per utilizzare la camera con questa versione di agk.

// Capture image from camera and show it
// Introduced in build 107

// display a background
backdrop = CreateSprite ( LoadImage ( "background5.jpg" ) )
SetSpriteSize ( backdrop, 100, 100 )

// get camera image
if GetCameraExists()=1
if ShowImageCaptureScreen()=1
while IsCapturingImage()=1
Sync()
endwhile
image=GetCapturedImage()
endif
endif

// main loop
do
// show image here
if GetSpriteExists(1)=0
CreateSprite(1,image)
SetSpritePosition(1,10,10)
SetSpriteSize(1,80,-1)
endif

// update the screen
Print("Result of capture..")
Sync ( )
loop
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 30th Dec 2018 21:29
does your app have the correct permissions?
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
Rickyes
8
Years of Service
User Offline
Joined: 7th Sep 2015
Location:
Posted: 31st Dec 2018 10:54
Non è un problema di autorizzazioni.Lo stesso programma funziona correttamente con la versione di agk2 2017.09.04 versione 2018.12.12 il programma non funziona su smartphone.

It is not a problem of permissions. The same program works correctly with the version of agk2 2017.09.04 version 2018.12.12 the program does not work on smartphones.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 4th Jan 2019 11:09
I'm using the camera to scan QR codes so the code isn't too different from the code above and I can confirm that it's working as expected with the AppGameKit 2018.12.12 version on mobiles.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Jan 2019 15:18 Edited at: 4th Jan 2019 15:18
I found a bug that may explain the problem, if the camera app doesn't have permission to write to the external storage then it would fail to write the captured image for AppGameKit to pick up later. I've fixed this for the next version. However you could work around it by using the SetDeviceCameraToImage function to stream the camera to an image and then copy the image when the user presses a button. Note that due to Android changes since version 2017.09.04 you will need to ask the user's permission before using the camera commands like so

Login to post a reply

Server time is: 2024-04-23 14:25:07
Your offset time is: 2024-04-23 14:25:07