You are on page 1of 36

17.12.

2012

Simple Android
Project
(SAP)
Developed By……

Swapan Aritra Priyank


a

Under guidance of Dr. Siuli Roy


Lets Start With our Objective…

Our project was “Study the


Programming Environment
of Android Based Smart
Phone and Build A Test
Application.”

But We thought of
Real life application..
So, We created…

 Click Counter Application


 Stop Watch Application
 Camera Application
 Email Application
 Album Viewer
WHY ANDROID?
» Mobility

» Power of computer in mobile

» Most popular Mobile OS from 2011

» Touch Screen Interface

» Multitasking
Software Requirement Specification
Software Requirement and Specification

Purpose
Explains the functional features, design constraints and related
considerations such as performance characteristics.

Scope
This application can run anonymously in any Android based
Smartphones.

Permission
• SET_WALLPAPER permission
• INTERNET permission
Now, Let’s Have A Look At…

System Features
Start Up
Functional Requirements

 Android operating system on the


Smartphone.
 The target device should be sound
enabled
Menu
Functional Requirements

 Android operating system on the


Smartphone.
Click Counter
Functional Requirements

 Android operating system on the


Smartphone.
Stop Watch
Functional Requirements

 Android operating system on the


Smartphone.
Camera
Functional Requirements

 Android operating system on the


Smartphone.
 User should use Android default
camera.
 User should have permission to
SET_WALLPAPER of system tools
permission set.
Email
Functional Requirements

 Android operating system on the


Smartphone.
 User must provide a valid e-mail Id.
 It should take permission to use
internet.
Album Viewer
Functional Requirements

 Android operating system on the


Smartphone.
External Interface Requirements

UI Tested on:

 Android emulator version 2.2


 MB525 Motorola Defy
Hardware Requirement:

 A Camera
 600 MHz Processor
 256 Mb+ RAM

Software Requirement:

 Android 2.2(Foryo) or Higher


 Setting  Application 
Unknown Sources - Checked
Design

How We Planned The Application


User Modules… Bottom-Up Composition
Level-0 DFD
Level-1 DFD
The Basics of Android and The
Building Blocks of It’s Code

It’s all about Coding!


Building Blocks of Android Code
Coding @ SAP

It’s time to examine Simple Android Project

Code by Code
Start Up! Thread

Thread timer=new Thread(){


Public void run(){
try{
sleep(5000);
}
catch(InterruptedException e){
e.printStackTrace();
}
finally{
Intent startingPoint=new
Intent("com.example.asp.Menu");
startActivity(startingPoint);
}
}
};
Start Up! Media Player
MediaPlayer MediaPlayermySong.
@Override
Protected void onCreate(Bundle
savedInstanceState) {

mySong=MediaPlayer.create(StartUp.this,
R.raw.music);
mySong.start();

}

@Override
Protected void onPause() {
// TODO Auto-generated
method stub
super.onPause();
mySong.release();
finish();
}
The Start-Up
Camera Initialization
ImageButton ib;
Button b;

ib=(ImageButton)findViewById(R.id.ibTakePic);
b=(Button)findViewById(R.id.bSetWall);

b.setOnClickListener(this);
ib.setOnClickListener(this);
Camera OnClick() Method
Public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.bSetWall:
WallpaperManager
myWallpaperManager=WallpaperManager.getInstance(ge
tApplicationContext());
try {
myWallpaperManager.setBitmap(bmp);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
break;
case R.id.ibTakePic:
i=new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAP
TURE);
startActivityForResult(i,cameraData);
break;
}
}
Camera Setting Picture on ImageView
Protected void onActivityResult(int requestCode,
int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode,
resultCode, data);
if(resultCode == RESULT_OK){
Bundle extras =
data.getExtras();
bmp=(Bitmap)extras.get("data");
iv.setImageBitmap(bmp);
}
}
Camera App
Testing

The quality of SAP


Case Name: Sending an e-mail without a recipients

Description: Input the values of all fields except e-mail address

Action: E-mail address=””

Actual Result: e-mail can’t be sent

Expected Result: Without an recipients we can’t send the e-mail

Message: Please enter an e-mail Id

Case Name: Sending an e-mail with faulty e-mail id

Description: Input invalid values(putting @ at the last) in email address

Action: E-mail address=”iamswapangmail.com@”

Actual Result: Mail has not been sent

Expected Result: Mail will not be sent

Message: Please enter a valid e-mail Id

Black Box Testing


Case Name: Sending an e-mail with faulty e-mail id

Description: Input invalid values (without @ )in email address

E-mail address=”iamswapangmail.com”…………… and click on


Action:
send e-mail button

Actual Result: Mail has not been sent

Expected Result: Mail will not be sent

Message: Please enter a valid e-mail Id

Case Name: Sending an e-mail with faulty e-mail id

Description: Input invalid values( there is no . after @) in email address

E-mail address=”iamswapan@gmailcom”…………… and click on


Action:
send e-mail button

Actual Result: Mail has not been sent

Expected Result: Mail will not be sent

Message: Please enter a valid e-mail Id

Black Box Testing


White Box Testing

public void onClick(View v) { mChronometer.setBase(SystemClock.elapsedRealti


// TODO Auto-generated method stub me() - stoppedMilliseconds);
switch(v.getId()){
case R.id.bStart: mChronometer.start();
int stoppedMilliseconds = 0; break;
String chronoText = case R.id.bStop:
mChronometer.getText().toString();
String array[] = mChronometer.stop();
chronoText.split(":"); break;
if (array.length == 2) { case R.id.bReset:
stoppedMilliseconds =
Integer.parseInt(array[0]) * 60 * 1000 mChronometer.setBase(SystemClock.ela
+ Integer.parseInt(array[1]) * psedRealtime());
1000;
} else if (array.length == 3) { mChronometer.setEnabled(false);
stoppedMilliseconds = }
Integer.parseInt(array[0]) * 60 * 60 * 1000 }
+ Integer.parseInt(array[1]) * 60 * 1000 }
+ Integer.parseInt(array[2]) * 1000;
}
Thank You!

You might also like