0

I've been trying for several weeks now to store a json on my device that can be accessed (read or write) by multiple games, made with unity.

I couldn't do it programmatically, I had to send the json to a server, and then everytime I start a game, download the json.

I even bought an SD Card to try to store it there, but with no luck. Is it even possible, or is android really protected ? Couldn't found an answer anywhere... I can only store the json in the persistent datapath of each app separately, but no way to put it higher in the hierarchy...

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
WhyAmIHere
  • 11
  • 1
  • its for a purpose, how else would you pretend a malicious developer from copying all your chat history – zambari May 05 '22 at 19:50
  • Have you tried making a custom content provider to hold the data? https://developer.android.com/guide/topics/providers/content-provider-creating – Ted Bigham May 06 '22 at 01:11
  • @TedBigham I did not try this ! I will look for content provider integration in C# and will come back here to update my situation status. Thanks for the lead! – WhyAmIHere May 06 '22 at 10:33
  • Update : it seems that content provider can not be used programmatically : it will launch an intent to open another app, thing that is brocken in vr headsets. I don't think it is possible to share data programmatically in unity android. – WhyAmIHere May 09 '22 at 08:14
  • I didn't realize this was a VR question, or that headsets couldn't do that. Normally "launching" the intent is what you want. That doesn't necessarily mean the application starts up and is visible. It just runs the code for the intent, which in your case would read or write data to local storage. – Ted Bigham May 18 '22 at 17:37
  • I tried for so many days to launch an intent on my headset, but I can't have a provider that works and I tried so many scripts... Here are the latest things I tried : [link](https://stackoverflow.com/questions/45012523/how-to-install-android-apk-from-code-in-unity) – WhyAmIHere May 19 '22 at 09:28

0 Answers0