Acces PlayerPref externally

Hi, I am building an educational game for a museum. We use a light sensort + arduino as input to receive out a “true, false” singal (light is connecting, light is disturbed).

I have made a working system that bases all of it’s booleans on a PlayerPref that will be either 1 or 0 (I have a script that converts this to a boolean).

My question is, can another piece of software, for example code from arduino, acces the PlayerPref of an application on an Android device (given the script knows the path to the file) and change this value. So that with this workaround, my application on its own can read that pref back in? Is this even theoretically possible?

Yes if you can grant it root privileges.

It is stored in Shared preferences and should be located somewhere over there:

/data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PREFS_NAME.xml

Though if you want to support non-rooted devices then you should consider writing it to some file instead.

I would suggest asking to Arduino Forum too, no idea personally cause i just started with game editing. Good luck!

Forum link: http://forum.arduino.cc/