Introduction




Name of Experiment: Display System Hardware Properties of NOKIA ASHA 501

Exp No: 4

Background: Student should have a basic knowledge of Java Programming.

Summary: After going through this experiment, student should be able to display System Hardware Properties on Nokia Asha 501 device.

Learning Objective: Here, Student should learn the procedure to display system hardware properties on nokia Asha Device . After, doing this experiment user himself will be able to make an app to display system hardware properties of nokia Asha Device.

Target

Target Platform:This experiment is tested on Nokia Asha Device 501.

Procedure

SourceCode

Source Code:

package hardware;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class Hardware extends MIDlet {
Form hard;
String pro,conf,loca,plat;
public Hardware() {// TODO Auto-generated constructor stub
hard=new Form("HARDWARE PROPERTIES");
hard.append("PROFILE:");
pro=System.getProperty("microedition.profiles");
hard.append(pro);
hard.append("CONFIGURATION:");
conf=System.getProperty("microedition.configuration");
hard.append(conf);
hard.append("LOCALE:");
loca=System.getProperty("microedition.locale");
hard.append(loca);
hard.append("PLATFORM:");
plat=System.getProperty("microedition.platform");
hard.append(plat);
hard.append("By:Nicy Kaur Taneja");
hard.append("Vandana Kumari");}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub}
protected void pauseApp() {// TODO Auto-generated method stub}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Display.getDisplay(this).setCurrent(hard);}}

Snapshots



This is how the output appears on the emulator of NOKIA Asha SDK 1.0 on successful compilation of source code.

Observation

Observation: Students have successfully displayed hardware properties of NOKIA Asha 501 device.

Video Link

Download