IT Community - Software Programming, Web Development and Technical Support

How to get the available and used memory in mobile using J2ME ?

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 ?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development > J2ME

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-18-2007, 11:01 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Question How to get the available and used memory in mobile using J2ME ?

How to get the available and used memory in mobile using J2ME ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-19-2007, 12:51 AM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Default Re: How to get the available and used memory in mobile using J2ME ?

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)
{
}
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -7. The time now is 07:00 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0