Execute This program on Eclipse for Android
Create .apk file using emulator and execute .apk file on Android OS
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends Activity
{
@override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView text=new TextView(this);
text.setText("\n System Information "+"\n Operating System Name :"+System.getProperty("os.name")+"\n Version "+
System.getProperty("os.version")+"\n Architecture :"+System.getProperty("os.arch")+"\n Manufacturer :"+
android.os.Build.MANUFACTURER+"\n Display type :"+android.os.Build.DISPLAY+"\n Model :"+
android.os.Build.MODEL+"\n Product:"+android.os.Build.PRODUCT+"\n User:"+android.os.Build.USER);
}
}
Create .apk file using emulator and execute .apk file on Android OS
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends Activity
{
@override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView text=new TextView(this);
text.setText("\n System Information "+"\n Operating System Name :"+System.getProperty("os.name")+"\n Version "+
System.getProperty("os.version")+"\n Architecture :"+System.getProperty("os.arch")+"\n Manufacturer :"+
android.os.Build.MANUFACTURER+"\n Display type :"+android.os.Build.DISPLAY+"\n Model :"+
android.os.Build.MODEL+"\n Product:"+android.os.Build.PRODUCT+"\n User:"+android.os.Build.USER);
}
}
No comments:
Post a Comment