This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Android and the fly likes Interactive Stories on Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Interactive Stories on Android" Watch "Interactive Stories on Android" New topic
Author

Interactive Stories on Android

William H Taylor
Greenhorn

Joined: Apr 22, 2009
Posts: 16
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

Joined: Apr 22, 2009
Posts: 16
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

Joined: Apr 22, 2009
Posts: 16
Latest try still not working, the emulator says there is only 1 byte in the file and There is more than that.


Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
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

Joined: Apr 22, 2009
Posts: 16
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.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interactive Stories on Android
 
Similar Threads
Access System Folder ????
How to convert text to images
adb push problem
How to play 3gp videos stored in sdcard using flash player?
Unlocking Android: Regarding Dynamic Class Loading