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 / Failed to open file for writing /JoystickOuter.png

Author
Message
pseudohaiku
8
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 29th Jun 2016 05:14
Hey forum,

I've put up an alpha APK on the App Store and sent the link to a few friends. The game runs fine on my deice (HTC Desire 816), and on others such as Samsung Galaxy S5. I've had a friend who has tried to run the app on his Samsung Galaxy S2, but get's the error"Failed to open file for writing /JoystickOuter.png".

I've obviously got the permissions checked to "write external storage" when I export the APK - I'm just not sure why it doesn't work on this particular model of phone.

Any ideas how I can fix this, or at least disable the virtual joystick?

Cheers!
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 29th Jun 2016 06:14 Edited at: 29th Jun 2016 06:15
I don't know what happen but I know you should use lowercase for file names. (JoystickOuter.png =====>> joystickouter.png).

This may help you
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Jun 2016 09:54
I don't get the joystick images in my media folder. So I guess you must be using a command that requires it.
Have you put in a command that you don't actually use and can be deleted?

The other explanation may be that I have only checked on WIndows, and maybe Android APKs always create the joystick images.

Does he have any other security apps on his phone?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 29th Jun 2016 10:04
Create your own JoystickOuter.png and place it in the media folder. The joystick images are only created if none exist already.
pseudohaiku
8
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 29th Jun 2016 13:35
I'm not currently using any joysticks in my game, nor are there any commands referring to it. I was thinking that it could be some other app interfering with the read/write function but I'm not sure about what that could be. Mobiius - even though other people aren't having the problem on their phones (which would be utilizing newer versions of Android - I think the Galaxy S2 has been stopped at 4.1.2), would this be a potential workaround?? Do you know if there's a way I could get rid of the Joystick.h include file full stop? It's annoying, since I'm not even using it.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jun 2016 22:04
On my old phone running android 2.3 there are folders for every app made with using AppGameKit, each containing a JoystickOuter.png and various other default images, regardless if the app actually uses them.

What I've noticed, if a device is running android 2.3 then the "write external storage" needs to be checked in order for the app to work. If a newer version of android is being used then the box doesn't have to be checked - even if the app is exported from AppGameKit as android version 2.3.1

What version of android are you exporting it as? Try exporting it as android version 3.2 with the "write external storage" unchecked.

Apart from that I don't know what to suggest.
Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
pseudohaiku
8
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 30th Jun 2016 07:06
I'm always checking the "write external storage" box as I thought it was always necessary when wriitng to a file - good to know I don't have to do it for newer versions of android though.

I've always exported it at 2.3, but I might try and do it as 3.2 just to see what happens. I should get onto buying a new battery for my old S2..
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 30th Jun 2016 09:48
Quote: "would this be a potential workaround?"

Yes. In the past, it only created the files automatically when they didn't previously exist. You can just include a single pixel image with the same name and it won't be created.
pseudohaiku
8
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 30th Jun 2016 12:53
Alright, cheers. I'm hopefully going to be able to test this on my S2 soon. Will update when I take a look further into it. Thanks everyone.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 30th Jun 2016 16:24
I experienced this on some of my old Androids (Android 2.x) especially when they did not have a MicroSD card installed. You will need to keep the Android permission "Write External Storage" in the Manifest/Permissions when exporting and as I recall this will resolve the problem.

Login to post a reply

Server time is: 2024-11-17 08:55:08
Your offset time is: 2024-11-17 08:55:08