You Are Here:

Community: Developer Discussion Boards

#1 Old Can I create a file on the mobile device ? - 2008-04-08, 18:18

Join Date: Apr 2008
Posts: 1
nandyiyer
Offline
Registered User
Dear Sir ,
I'm not able to create a file on my mobile device ... The application is working well on the emulator ... I'm using N95 ...
Can u pls tell me what is d prob ?

Thanks
Nanditha
Reply With Quote

#2 Old Re: Can I create a file on the mobile device ? - 2008-04-08, 18:59

Join Date: Oct 2006
Posts: 2,536
Location: Helsinki, Finland
Symbian_Neil's Avatar
Symbian_Neil
Offline
Forum Nokia Champion
Quote:
Originally Posted by nandyiyer View Post
Dear Sir ,
I'm not able to create a file on my mobile device ... The application is working well on the emulator ... I'm using N95 ...
Can u pls tell me what is d prob ?

Thanks
Nanditha

Hi Nanditha..Welcome to the Forum!!

Well actually I might be not be of help to your specific needs, but the information you have provided is too little for anybody to help. Why not check this and give more information so that somebody can provide you a specific solution :)

Good Luck!!


- Neil R.Bhasme -
Reply With Quote

#3 Old Re: Can I create a file on the mobile device ? - 2008-04-09, 11:56

Join Date: Sep 2007
Posts: 502
Location: Bangalore
bhanuchandar.k's Avatar
bhanuchandar.k
Offline
Forum Nokia Champion
Hi Nandita ,

You can create the files in your mobile phone if and only if your mobile supports jsr75 i.e FileConnection API . With that you can create the file.

For more information . Go through this post in forum

http://discussion.forum.nokia.com/fo...FileConnection


public boolean writeFile(String path, byte[] data)
{
javax.microedition.io.Connection c = null;
java.io.OutputStream os = null;
try {
c = javax.microedition.io.Connector.open("file:///" + path, javax.microedition.io.Connector.READ_WRITE);
javax.microedition.io.file.FileConnection fc =
(javax.microedition.io.file.FileConnection) c;
if (!fc.exists())
fc.create();
else
fc.truncate(0);
os = fc.openOutputStream();
os.write(data);
os.flush();
return true;
} catch (Exception e) {
return false;
} finally {
try {
if (os != null)
os.close();
if (c != null)
c.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to install the self certification sis file on Nokia E60 device manjunaths Installation, Certification and Security 22 2009-09-24 08:09
Mobile Virus Info and Solution kunalshastry General Discussion 16 2007-08-07 12:12
Create Symbian 60 Theme's .sis file from scratch (using command line) chenloong Symbian Tools & SDKs 10 2007-07-02 07:28
Bluetooth Security: What exactly is an untrusted device? rahulmcs Bluetooth Technology 1 2005-12-02 07:26
How to edit a Python file on a mobile device serie 60 ? cyke64 Python 11 2005-05-20 11:09

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia