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 / Can AGK2 apps see each other's files and directories?

Author
Message
JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Mar 2015 06:03
Can two AGK2 apps running on the same Android system get to each other's files and directories?
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th Mar 2015 12:59
No, they can't.

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 27th Mar 2015 18:31
If you have a server, you could create a shared folder for your apps to dip into.

V2 T1 (Mostly)
Uzmadesign
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Mar 2015 22:13 Edited at: 27th Mar 2015 22:14
hm, maybe u can compile both in one together and switch to 1 or 2
after start.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 27th Mar 2015 22:22 Edited at: 27th Mar 2015 22:23
Thanks guys! Both good ideas. One thing you learn from programming is that there are almost always work arounds to situations you encounter.
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 28th Mar 2015 16:11
Perhaps have them communicate through a data file (text)?

Regards Sph!nx
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 28th Mar 2015 19:33
There are many ways I can think of to allow AppGameKit apps to share data, but that's not what the question was?

The problem of accessing files outside the sandboxed area allowed to your app is not a limitation of AppGameKit, it's how Android works.

JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 28th Mar 2015 20:00 Edited at: 28th Mar 2015 20:02
Quote: "The problem of accessing files outside the sandboxed area allowed to your app is not a limitation of AppGameKit, it's how Android works"


I know that Android was designed, much like iOS using a "sandbox" model for security reasons. But then how do so many of the other apps on Android allow me to edit my photos, text files, etc.?

I have a lot of apps on my phone that allow me to browse the file structure on Android. Granted, it does not allow me full access, i.e. other files executables and graphics, but I can see a lot of what other apps put on my phone, tablet, etc.

Some graphics editors even show me the graphics for my AGK2 apps and allow me full access to delete and edit them.

This was an attempt to somewhat do a work around for the limitation of the "sandbox". What I really wanted to do was grab files like photos taken with my phone/tablet and work on them. But I thought that just maybe, since the file structure on my Windows system shows that all of the AGK2 app directories are in a common AGK2 directory that at least I could share files between two AGK2 apps, like a simple .txt file. I did some testing and I now don't think that's even it's possible.
JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 28th Mar 2015 20:19 Edited at: 28th Mar 2015 20:41
I ran this code to no avail:



And I put a graphic in the "media" directory to see if I could find it and I did, in the first section. Then when I used setfolder("") it jumped to another directory with AppGameKit assets in it.
but I could not go further toward the root directory.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th Mar 2015 16:24 Edited at: 31st Mar 2015 16:39
If your goal is to play with images in your gallery, it might be worth looking at:
* ShowChooseImageScreen
* IsChoosingImage
* GetChosenImage



V2 T1 (Mostly)
Uzmadesign
JRNTexas
13
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 1st Apr 2015 01:34
@CJB - I did not see those! Thanks!
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 7th Apr 2015 14:12
Since we can make an image from a memblock, and make a memblock from an image...

Two different apps could have access to the same image file perhaps?

A kludgy work-around, I know, but it might be a way to pass data.

Login to post a reply

Server time is: 2024-11-25 20:27:29
Your offset time is: 2024-11-25 20:27:29