Results 1 to 4 of 4
  1. #1
    ImTroyMiller is offline Member
    Join Date
    Jan 2014
    Posts
    20
    Rep Power
    0

    Default Do I need permissions for SharedPrefrences?

    I have a game that I just completed and it was working fine on two different cell phones, so I uploaded it to Google Play. I wanted to add a video and I read that I would need to update my phone(Samsung Galaxy S3) to Android 4.4 to use the ADB to record the screen(my phone does not have root access). After updating my phone, I could load my game into the main menu, the instruction screens, and basically every menu and screen that didn't load from shared preferences(New Game, Load Game, and Delete Game).

    I did some searching online, and I read that I needed to actually reinstall the APK. So I first tried installing without uninstalling and I got an error that said there was a certificate problem. So, I uninstall, and then reinstall. I still have the same problem, it crashes anytime it try's anything with SharedPreferences.

    I am not asking any permissions at all in the manifest.

    The errors I'm getting in logcat are...

    Java Code:
    java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
    and...

    Java Code:
    07-14 00:14:56.273: W/ActivityManager(680): Force removing ActivityRecord{433bb790 u0 com.imtroymiller.rocksfall.android/.AndroidLauncher t36}: app died, no saved state
    07-14 00:14:56.273: W/WindowManager(680): Force-removing child win Window{433934a0 u0 SurfaceView} from container Window{4316bb60 u0 com.imtroymiller.rocksfall.android/com.imtroymiller.rocksfall.android.AndroidLauncher}
    I just installed the same APK on my other Galaxy S3 that has Android 4.1.2, and it works fine.

    What should I do?

  2. #2
    ImTroyMiller is offline Member
    Join Date
    Jan 2014
    Posts
    20
    Rep Power
    0

    Default Re: Do I need permissions for SharedPrefrences?

    Just installed the same APK on an old LG Optimus with Android 2.3.4(with root access) and it ran fine. Installed it on an LG Optimus F3 with Android 4.1.2 and it crashed on all menus that required shared preferences.

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default Re: Do I need permissions for SharedPrefrences?

    Can you post an MCVE as well as the full stack trace?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    ImTroyMiller is offline Member
    Join Date
    Jan 2014
    Posts
    20
    Rep Power
    0

    Default Re: Do I need permissions for SharedPrefrences?

    I actually fixed it.

    Basically, when I was developing my game, I had it set up so that I would load the levels from a TXT file that was stored on the SD card. I asked permission for this in the manifest. I had a second program that could edit the TXT file, that way I could load any level I wanted, for testing/debugging/best logic practices.

    When I decided it was complete, I changed it so that it would use Shard Preferences for loading/saving game data, rather than a file. I had changed everything, except for one little call to a method, and that method tried to access the file. This caused an error on the devices I had that didn't have that file at all.

    Thanks anyways.

    Rocks Fall - Java-Gaming.org

Similar Threads

  1. JAVA Permissions Applet
    By Magnos in forum New To Java
    Replies: 9
    Last Post: 10-01-2013, 11:09 AM
  2. don't have permissions
    By Petr in forum Suggestions & Feedback
    Replies: 4
    Last Post: 06-12-2011, 05:38 PM
  3. filesystem permissions
    By krater999 in forum Advanced Java
    Replies: 1
    Last Post: 01-17-2011, 06:24 AM
  4. How to set permissions for a JApplet
    By Gatts79 in forum Java Applets
    Replies: 2
    Last Post: 08-12-2009, 02:54 PM
  5. Midlet Permissions Access
    By fernando in forum CLDC and MIDP
    Replies: 1
    Last Post: 08-07-2007, 04:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •