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 / ShareImage bug (2.0.20 - Android - tier 2)

Author
Message
lumni
9
Years of Service
User Offline
Joined: 28th Mar 2015
Location:
Posted: 18th Jul 2016 00:36 Edited at: 19th Jul 2016 04:39
My Android game is crashing when calling ShareImage( ). The image is being created with getImage( ) and saveImage( ). The idea is to share a screenshot of the best score. I tested on Windows10 and the png is being created like expected. The call to shareImage( ) is sorrounded by if ( getFileExists ). I think it may be an AppGameKit bug. I'm positive i'm running 2.0.20 since i'm already using the musicOGG commands.
obs: run on android 6 - galaxy j5

paste of the error log from Android Studio (massive, but maybe just the beginning is related). thanks in advance for any help.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Jul 2016 13:59
Thanks, fixed for the next version. This doesn't affect the Tier 1 Google player, but does affect exporting for Amazon or Ouya, and Tier 2. If you are using Tier 2 then you can fix this by editing AGKHelper.java and pasting the following code at the end of the file (before the last close curly bracket and after the DeleteSharedVariable function)
lumni
9
Years of Service
User Offline
Joined: 28th Mar 2015
Location:
Posted: 18th Jul 2016 14:02
awesome, thanks !
lumni
9
Years of Service
User Offline
Joined: 28th Mar 2015
Location:
Posted: 19th Jul 2016 04:36 Edited at: 19th Jul 2016 04:36
Hey Paul, I'm still having trouble !
I pasted the code where you said and it is running, but its failing to create the copy of the image in the download dir. As a consequence, the shared image is a black rectangle ( 0 bytes ).
i tried with other images and it did work, so maybe it is a problem with SaveImage( ) instead ?
it does create a valid png in windows, but maybe its failing in android, idk...
here is the code im usingo to create a screenshot and save it:



i've attached the png it creates on windows, if you want to take a look at its header or something. [img]null[/img]
thank you !

Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Jul 2016 03:55
Currently GetImage is broken on Android, I've fixed it for the next version
lumni
9
Years of Service
User Offline
Joined: 28th Mar 2015
Location:
Posted: 20th Jul 2016 04:01
ok, thank you.

Login to post a reply

Server time is: 2024-11-25 03:51:31
Your offset time is: 2024-11-25 03:51:31