BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-23-2007, 02:17 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question can we create a simple text file on BB??

Please Login to Remove!

Can we create a simple text file on the BB and then have our application access it?
Offline  
Old 02-23-2007, 04:28 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

on models with the 4.2 api yes as they have a filesystem, ie. the pearl and 8800.

do you need a txt file or just somewhere to store offline data? if you just need offline storage look into using the PersistentObject
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-23-2007, 05:38 AM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Nov 2006
Model: 8100
Carrier: Airtel
Posts: 335
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

as said by jfisher, yes and we already have a program doing it - multiPlay txtNotes
__________________
Dollars 5 Complete - Making Mobile Complete
Offline  
Old 02-23-2007, 05:49 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

try something like this:

FileConnection filecon = (FileConnection)Connector.open("file:///SDCard/" + filename);

if(!filecon.exists()) {
filecon.create();
OutputStream out = filecon.openOutputStream();
out.write("mytextString");
out.close();
filecon.close();
}

if you need this in your project send me a pm and i'll email you the source code for this app: link>> txt notes app
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.