ww w.E asy

En gi

nee

rin g

.ne t

**Note: Other Websites/Blogs Owners Please do not Copy (or) Republish this Materials, Students & Graduates if You Find the Same Materials with EasyEngineering.net Watermarks or Logo, Kindly report us to [email protected]

Visit : www.EasyEngineering.net

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

22

Dharmapuri – 636 703 For more Visit : www.EasyEngineering.net

LAB MANUAL Regulation

: 2013

Branch

: B.E. – CSE

Year & Semester

: III Year / VI Semester

ww

w.E

asy

CS6611-MOBILE APPLICATION DEVELOPMENT LAB

En

gin

eer

ing

ICAL ENG VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

ANNA UNIVERSITY: CHENNAI REGULATION – 2013 SYLLABUS

CS6611 MOBILE APPLICATION DEVELOPMENT LABORATORY OBJECTIVES: The student should be made to: Know the components and structure of mobile application development frameworks for

ww

Android and windows OS based mobiles.

w.E

Understand how to work with various mobile application development frameworks.

Learn

the basic and important design concepts and issues of development of mobile applications.

asy

Understand the capabilities and limitations of mobile devices.

LIST OF EXPERIMENTS:

En

gin

1 .Develop an application that uses GUI components, Font and Colours

eer

2. Develop an application that uses Layout Managers and event listeners. 3. Develop a native calculator application.

ing

4. Write an application that draws basic graphical primitives on the screen. 5. Develop an application that makes use of database. 6. Develop an application that makes use of RSS Feed. 7. Implement an application that implements Multi threading 8. Develop a native application that uses GPS location information.

.ne t

9. Implement an application that writes data to the SD card. 10. Implement an application that creates an alert upon receiving a message. 11. Write a mobile application that creates alarm clock

TOTAL: 45 PERIODS

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

INDEX S.NO

DATE

SIGNATURE OF THE STAFF

EXPERIMENTS

1

Develop an application that uses GUI components, Font and Colors

2

Develop an application that uses Layout Managers and event listeners.

3

Develop a native calculator application.

REMARKS

ww

Write an application that draws basic graphical primitives on the screen.

4

w.E

5

Develop an application that makes use of database.

asy

6

Develop an application that makes use of RSS Feed.

7

Implement an application that implements Multi-threading

8

Develop a native application that uses GPS location information.

9

Implement an application that writes data to the SD card.

10

Implement an application that creates an alert upon receiving a message.

11

Write a mobile application that creates alarm clock

En

VVIT

gin

eer

ing

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

Ex.No: 1 Date : Develop an application that uses GUI components, Font and Colours Simple application to change font size and color of text view 1) Open eclipse or android studio and select new android project

ww

w.E

asy

En

gin

eer

2)Give project name and select next

ing

.ne t

3) Choose the android version. Choose the lowest android version (Android 2.2) and select next

4) Enter the package name. Package name must be two word separated by comma and click finish 5) Go to package explorer in the left hand side. Select our project. 6) Go to res folder and select layout. Double click the main.xml file 7) Now you can see the Graphics layout window.

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

ww

8) Click the main.xml file and type the code below

Code:

w.E

asy


En

gin

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical" >
eer

ing

android:layout_height="wrap_content" android:layout_margin="20sp" android:gravity="center" android:text="HELLO WORLD" android:textSize="20sp" android:textStyle="bold" />
gin

android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_weight="1" android:text="-"

eer

ing

android:textSize="15pt" android:id="@+id/btnSub">
ww

android:id="@+id/tvResult" android:gravity="center_horizontal">


w.E



asy

7) Now select mainactivity.java file and type the following code. package

En

MainActivity.java coding package CALCU.CALU; import android.app.Activity; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import

gin

eer

ing

android.view.View.OnClickListener; import android.widget.Button; import

.ne t

android.widget.EditText; import android.widget.TextView; public class CALCULATORActivity extends Activity implements OnClickListener { EditText input1; EditText input2; Button addition; Button subtraction;

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

Button multiplication; Button division; TextView tvResult; String oper = "";

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);

input1 =

ww

(EditText) findViewById(R.id.etNum1);

input2

= (EditText) findViewById(R.id.etNum2);

w.E

addition = (Button) findViewById(R.id.btnAdd);

asy

subtraction = (Button) findViewById(R.id.btnSub);

En

multiplication = (Button) findViewById(R.id.btnMult); division = (Button) findViewById(R.id.btnDiv);

gin

tvResult = (TextView) findViewById(R.id.tvResult); // set a listener addition.setOnClickListener(this); subtraction.setOnClickListener(this); multiplication.setOnClickListener(this);

eer

ing

division.setOnClickListener(this); } @Override public void onClick(View v) {

float num1 = 0;

// TODO Auto-generated method stub

float num2 = 0;

float result = 0;

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

// check if the fields are empty

if

(TextUtils.isEmpty(input1.getText().toString()) || TextUtils.isEmpty(input2.getText().toString())) { return;

}

// read EditText and fill variables with numbers num1 = Float.parseFloat(input1.getText().toString()); num2 = Float.parseFloat(input2.getText().toString());

ww

// defines the button that has been clicked and performs the corresponding operation // write operation into oper, we will use it later for output

w.E

switch (v.getId()) {

oper = "+";

result

= num1 + num2; break;

case

R.id.btnSub: oper = "-";

result

= num1 - num2; break;

case

R.id.btnMult: oper = "*";

result

case R.id.btnAdd:

asy

En

gin

eer

ing

= num1 * num2; break;

case

R.id.btnDiv: oper = "/";

result

= num1 / num2; break; default: break; }

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

// form the output line tvResult.setText(num1 + " " + oper + " " + num2 + " = " + result); }

} 8) Android output is present in the android emulator as Shown in below

ww

w.E

asy

En

VVIT

gin

eer

ing

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

Ex. No : 4 Date : WRITE AN APPLICATION THAT DRAWS BASIC GRAPHICAL PRIMITIVES ON THE SCREEN IN ANDROID 1) Open eclipse or android studio and select new android project 2) Give project name and select next 3) Choose the android version. Choose the lowest android version(Android 2.2) and select next 4) Enter the package name. package name must be two word separated by comma and click

ww finish

5) Go to package explorer in the left hand side. select our project.

w.E

6) Go to res folder and select layout. Double click the main.xml file. Don’t change anything

asy

in layout. Leave as default.

7) Now select mainactivity.java file and type the following code.

package Basic.primitive; import android.app.Activity; import android.content.Context; import

En

gin

eer

ing

android.graphics.Canvas ; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.View;

VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

public class BasicprimitiveActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new myview(this)); } private class myview extends View { public myview(Context context) {

ww

super(context); }

@Override

w.E

asy

En

protected void onDraw(Canvas canvas) { super.onDraw(canvas);

Paint

paint=new Paint();

gin

paint.setTextSize(40); paint.setColor(Color.GREEN);

eer

canvas.drawText("Circle", 55, 30,

ing

paint); paint.setColor(Color.RED); canvas.drawCircle(100, 150,100, paint); paint.setColor(Color.GREEN); canvas.drawText("Rectangle", 255, 30, paint); paint.setColor(Color.YELLOW); 50,400,350, paint);

canvas.drawRect(250,

paint.setColor(Color.GREEN);

canvas.drawText("SQUARE", 55, 430, paint); paint.setColor(Color.BLUE); 450,150,550, paint);

VVIT

canvas.drawRect(50,

paint.setColor(Color.GREEN);

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

canvas.drawText("LINE", 255, 430, paint); paint.setColor(Color.CYAN); canvas.drawLine(250, 500, 350, 500, paint); } } } 8) Now go to main.xml and right click .select run as option and select run configuration 9) Android output is present in the android emulator as shown in below.

ww

w.E

asy

En

VVIT

gin

eer

ing

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

Ex.No : 5 Date : DEVELOP AN APPLICATION THAT MAKES USE OF DATABASE 1) Open eclipse or android studio and select new android project 2) Give project name and select next 3) Choose the android version. Choose the lowest android version (Android 2.2) and select next 4) Enter the package name. package name must be two word separated by comma and click finish

ww

5) Go to package explorer in the left hand side. select our project. 6) Go to res folder and select layout. Double click the main.xml file. Add the code below

w.E


asy

En

xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myLayout"

android:layout_width="fill_parent"

android:stretchColumns="0"

gin

android:layout_height="fill_parent">
eer

android:layout_x="110dp"

android:layout_y="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
ing

android:text="@string/empid" android:layout_x="30dp" android:layout_y="50dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
VVIT

Department of Computer Science and Engineering

Visit : www.EasyEngineering.net

.ne t

CS6611 MOBILE APPLICATION DEVELOPMENT LAB

android:layout_width="150dp" android:layout_height="40dp"/>
ww

android:layout_y="100dp" android:layout_width="150dp"

w.E

android:layout_height="40dp"/>
asy

android:layout_x="30dp" android:layout_y="150dp"

En

android:layout_width="wrap_content"

gin

android:layout_height="wrap_content"/>
eer

ing

android:layout_height="40dp"/>

CS6611-MOBILE-APPLICATION-DEVELOPMENT-LABORATORY- By ...

Implement an application that creates an alert upon receiving a message. 11. Write a mobile application that creates alarm clock. TOTAL: 45 PERIODS. Visit : www.EasyEngineering.net. www.EasyEngineering.net. Page 3 of 71. CS6611-MOBILE-APPLICATION-DEVELOPMENT-LABORATORY- By EasyEngineering.net.pdf.

2MB Sizes 1 Downloads 152 Views

Recommend Documents

stand by, stand by by chris ryan
Just what do you do to start checking out Stand By, Stand By By Chris Ryan ... we have informed recently, simply go to the web link that we provide here.

Engineering Hydrology by K Subramanya - BY Easyengineering.net ...
Kuala Lumpur Lisbon London Madtld f\~exlco City f\~llan Monueal. San Juan Santiago Singapore Sydney Tokyo Toronto. Visit : Civildatas.blogspot.in. Visit : Civildatas.blogspot.in. Civildatas.blogspot.in. Page 3 of 450. Engineering Hydrology by K Subra

By Concept (MYP By Concept)
meaningful approach by integrating the inquiry statement in a global context - Develops ... and eTextbooks via Dynamic Learning, our complete digital solution.

Basic Environmental Engineering by R.C.Gaur - civilenggforall- By ...
www.EasyEngineering.net. Page 3 of 220. Main menu. Displaying Basic Environmental Engineering by R.C.Gaur - civilenggforall- By EasyEngineering.net.pdf.

Engineering Hydrology by K Subramanya - BY Easyengineering.net ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

Engineering Surveying by W.Schofield - BY Civildatas.blogspot.in.pdf
Engineering Surveying by W.Schofield - BY Civildatas.blogspot.in.pdf. Engineering Surveying by W.Schofield - BY Civildatas.blogspot.in.pdf. Open. Extract.

HIGHWAY ENGINEERING by Martin Rogers - By EasyEngineering ...
Dublin Institute of Technology. Ireland. Blackwell. Science. Downloaded From : www.EasyEngineering.net. Downloaded From : www.EasyEngineering.net. www.EasyEngineering.net. Page 3 of 292. Main menu. Displaying HIGHWAY ENGINEERING by Martin Rogers - By

IRRIGATION ENGINEERING by RNReddy - By EasyEngineering.net.pdf
Page 1 of 281. Downloaded From : www.EasyEngineering.net. Downloaded From : www.EasyEngineering.net. www.EasyEngineering.net. Page 1 of 281. Page 2 of 281. IRRIGATION. ENGINEERING. Downloaded From : www.EasyEngineering.net. Downloaded From : www.Easy

pdf-1573\trinity-by-uris-by-leon-uris.pdf
pdf-1573\trinity-by-uris-by-leon-uris.pdf. pdf-1573\trinity-by-uris-by-leon-uris.pdf. Open. Extract. Open with. Sign In. Main menu.

Beginning AutoCAD 2007 by Bob McFarlane - By www ...
Prelims-H8323.qxd 9/22/06 6:35 PM Page xi. Visit : www.Easyengineering.net. Visit : www.Easyengineering.net. Page 3 of 381. Beginning AutoCAD 2007 by Bob McFarlane - By www.EasyEngineering.net.pdf. Beginning AutoCAD 2007 by Bob McFarlane - By www.Eas