File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes how to save real time data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to save real time data" Watch "how to save real time data" New topic

how to save real time data

rahul taiwala

Joined: Feb 06, 2011
Posts: 12
We have been able to send thie ECG signal to mobile phones through Bluetooth and we have been able to plot it in real time.
now my question is How to save the data without affecting the plot on the mobile phone?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Real Time on mobile phones has its limitations, since mobile phones generally trade faster processing power in for lower energy use. And, of course "Real Time' means different things depending on what your requirements are.

However, you seem to have managed the important parts. Few J2ME devices are using hard disk drives, so the time required to store data is defined by the speed of the NVRAM that does the storage and the overhead of the database or file system being used. I would generally expect that the extra time required to capture data on the device wouldn't be all that much.

An IDE is no substitute for an Intelligent Developer.
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
I suppose this is where the Thread class and Runnable interface come in handy, to do two things at once. You'll have to test the performance on that for grabing data running in real-time though. Also, read about thread safety (synchronize, volatile ).

And, the storage options:



FileConnection API (jsr 75) -- an optional package.
If you have this, you can test for your midlet's private directory (accessed only by it, so you'll also need to access the data through your program to use it later) by requesting the System property:

You have to be careful though. I could easily see a real time storage box be filled up by a continus feed.
I agree. Here's the link:
subject: how to save real time data
jQuery in Action, 3rd edition