Write to OUYA Disc?

Hey!

I would like to be able to store a file somewhere on the OUYA system to save encrypted data to store information if a user have bought a game or not (for offline purposes) but I am unsure how to write (or create for that matter) to a file on the Ouya system.  Is this even possible?

Been looking around the forums and seems people say this is possible but no sample code is given.  I've tried myself with the following:

File file = new File(Environment.getRootDirectory() + File.separator + "someDir", "someFile");

But get an error: "open failed:  ENOENT (No such file or directory)"

Any ideas?

Comments

  • KonajuGamesKonajuGames Posts: 560Member
    A simple web search brought up this Android documentation as the first result.
  • AcnePlayAcnePlay Posts: 12Member
    A simple web search brought up this Android documentation as the first result.
    That is all well and good but the question remains.  Is it possible to even store a file on the OUYA system and where can we save the files?  How is the architecture even built up?
  • AcnePlayAcnePlay Posts: 12Member
    Ah problem solved with the following:

    File file = new File(m_Context.getFilesDir(), "myFile");

    Instead of the:

    File(Environment.getRootDirectory() + File.separator + "someDir", "someFile");
Sign In or Register to comment.