• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Interactive Stories on Android

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic