• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interactive Stories on Android

 
William H Taylor
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing an interactive story. It is a z8 file that is readable by zcode interpreters. I am trying to write a program that embeds the z8 file in an apk. The program will look into the users phone to see if it has twisty, a free zcode interpreter, and notify the user that an interpreter is needed if one is not found. It will take the z8 file and load it onto the sdcard. I need an example or a tutorial of how to load a binary file onto the android sdcard. Thank you for your help and time.
 
William H Taylor
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I halfway solved the problem. The problem is that with this code I am reading and writing one byte of the z8 file and I don''t know what to do about it. This is my code.

 
William H Taylor
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Latest try still not working, the emulator says there is only 1 byte in the file and There is more than that.


 
Tim Moores
Bartender
Posts: 3129
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a bad idea:

catch(IOException e){

}

How will you know if there are problems? At least write the error message to the logcat output.

The real problem could be that you misunderstand what the available() method does.
 
William H Taylor
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks the program does work now but it has a serious problem. The size of the file on the sdcard continuosly increases. There are no error messages.This program seems to be eating up memory.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic