This is a discussion on How to get the available and used memory in mobile using J2ME ? within the J2ME forums, part of the Mobile Software Development category; How to get the available and used memory in mobile using J2ME ?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| How to get the available and used memory in mobile using J2ME ? Ans : You can get the available and used memory in mobile with the help of the java program. You have create MemoryTest midlet and use the below code in that midlet. /*-------------------------------------------------- * ShowProperties.java * * Example from the book: Core J2ME Technology * Copyright John W. Muchow http://www.CoreJ2ME.com * You may use/modify for any non-commercial purpose *-------------------------------------------------*/ import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class MemoryTest extends MIDlet { private Display display; public void startApp() throws MIDletStateChangeException { display = Display.getDisplay(this); Form form = new Form("Memory Test"); form.append("Hello Welcome"); form.append("Vendor: " + getAppProperty("MIDlet-Vendor")); form.append("Description: " + getAppProperty("MIDlet-Description")); form.append("JadFile Version: " + getAppProperty("JadFile-Version")); form.append("MIDlet-Data-Size: " + getAppProperty("MIDlet-Data-Size")); Runtime rtime = Runtime.getRuntime(); form.append("Total memory: " + rtime.totalMemory()); form.append("Free memory: " + rtime.freeMemory()); display.setCurrent(form); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/j2me/2179-how-get-available-used-memory-mobile-using-j2me.html | |||
| Posted By | For | Type | Date |
| J2ME: Blogs, Photos, Videos and more on Technorati | This thread | Refback | 07-19-2007 03:59 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How u do Bluetooth Communication between PC and mobile in J2ME | itbarota | J2ME | 9 | 09-11-2008 02:08 AM |
| Developing J2ME CDC apps for windows Mobile | itbarota | J2ME | 1 | 07-23-2007 07:08 AM |
| Is there possible of getting battery level of mobile using j2me? | mobilegeek | J2ME | 1 | 07-23-2007 12:14 AM |
| New T-Mobile phone runs Windows Mobile 6 | vadivelanvaidyanathan | The Lounge | 0 | 05-22-2007 08:19 AM |
| Memory Sticks?? | WiccanSpirit | The Lounge | 10 | 03-15-2007 08:59 PM |