The moose likes Java Micro Edition and the fly likes how to save real time data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "how to save real time data" Watch "how to save real time data" New topic
Author

how to save real time data

rahul taiwala
Greenhorn

Joined: Feb 06, 2011
Posts: 7
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: 12513

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.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
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:

javax.microedition.rms

or

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: fileconn.dir.private.name.

You have to be careful though. I could easily see a real time storage box be filled up by a continus feed.
 
IntelliJ Java IDE
 
subject: how to save real time data
 
Threads others viewed
please critique the code
This Weeks Giveaway
JavaRanch goes mobile
how to solve the data problem when we don't have backend database support?
Real time graph
IntelliJ Java IDE