• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

urgent help requierd in J2ME

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Respected Friends,
I want to make an application in J2ME for Sony Ericson K700i mobile phone which is connected to the serial port of the PC,this application would be running inside the cellular mobile phone,when I will run this application all the files in the "File Manager" folder of mobile with .txt extensions would be copied to the PC to some paticular folder passing through the serial port to which the mobile is connected,I am facing some problems while devloping this application,my questions are as follows:

1) Is it possible to transfer a file on the serial port,off course we can transfer interger type data to the serail port but integer is a primitive data type and while transferring files we will actually pass the object related to that file to the serial port of the PC,is this really possible?
2) Sony Ericson K700i does'nt implements JSR 75(PDA Optional Packages for the J2METM Platform,which is used to access PIM data and file systems) which means that we can not access the file system of this mobile so is it really possible to access the files stored in this mobile through my application?
3) Once the file is transferred to the serial port than will its contents of the file ramains in its original state or will be transferred to some kind of bianry data and we have to bring it in the original state.On the PC end will I need to write some other application which continiously monitores the serial port and will receive this file.

I would be waiting for your precious replies.

Thanking You,
Salman Faraz.
 
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Salman,

Got some bad news for you.

You can't send the objects because the serializable interface is not supported on J2ME MIDP1 or MIDP2 spec. The only way you could send the data is via a byte[] or some other primitive type.

Since you said the K700i doesn't support the jsr-75 file system access APIs, then you can't get to anything but your midlets datastore (RMS). MIDlets are only allowed to access their data or data that is shared from another midlet, or provided through an external library call (such as jsr-75 provides for)

So point #3 is a non-issue because you can't get to the data to send it out to the port.

This is where most people take issue with J2ME, there are a lot of rules that you are not allowed to break. Where as with J2SE you can break just about any rule give a little time and a few libraries or JNI calls.
No such luck with J2ME, it's designed to be secure, and never give permissions to do much without permission from the service provided and the user.

Wish the info was better. Can you use a different phone? I know there are some that support that feature of reading from the filesystem. But you will still need to transfer the data in a binary form and not as an object.

Regards,
-Shawn
 
reply
    Bookmark Topic Watch Topic
  • New Topic