simple android project (sap)... a test application
DESCRIPTION
Simple Android Project is a test application, trying to play with the Android framework and UI. Its a collection of few basic applications, coupled in a Menu.TRANSCRIPT
![Page 1: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/1.jpg)
Simple Android Project(SAP)
17.12.2012
![Page 2: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/2.jpg)
Developed By……
Under guidance of Dr. Siuli Roy
SSwapan
AAritra
PPriyanka
![Page 3: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/3.jpg)
Our project was “Study the Programming Environment of Android Based Smart Phone and Build A Test Application.”
But We thought ofReal life application..
Lets Start With our Objective…
![Page 4: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/4.jpg)
So, We created…
Click Counter Application Stop Watch Application Camera Application Email Application Album Viewer
![Page 5: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/5.jpg)
» Mobility
» Power of computer in mobile
» Most popular Mobile OS from 2011
» Touch Screen Interface
» Multitasking
WHY ANDROID?
![Page 6: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/6.jpg)
Software Requirement Specification
1 SRS
![Page 7: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/7.jpg)
Explains the functional features, design constraints and related considerations such as performance characteristics.
This application can run anonymously in any Android based Smartphones.
Software Requirement and Specification
Scope
Purpose
Permission• SET_WALLPAPER permission • INTERNET permission
![Page 8: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/8.jpg)
Now, Let’s Have A Look At…
System Features
![Page 9: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/9.jpg)
Functional Requirements
Android operating system on the Smartphone.
The target device should be sound enabled
Start Up
![Page 10: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/10.jpg)
MenuFunctional Requirements
Android operating system on the Smartphone.
![Page 11: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/11.jpg)
Functional Requirements
Android operating system on the Smartphone.
Click Counter
![Page 12: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/12.jpg)
Stop WatchFunctional Requirements
Android operating system on the Smartphone.
![Page 13: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/13.jpg)
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.
Camera
![Page 14: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/14.jpg)
EmailFunctional Requirements
Android operating system on the Smartphone.
User must provide a valid e-mail Id. It should take permission to use
internet.
![Page 15: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/15.jpg)
Functional Requirements
Android operating system on the Smartphone.
Album Viewer
![Page 16: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/16.jpg)
UI Tested on:
Android emulator version 2.2 MB525 Motorola Defy
External Interface Requirements
Hardware Requirement:
A Camera 600 MHz Processor 256 Mb+ RAM
Software Requirement:
Android 2.2(Foryo) or Higher Setting Application Unknown
Sources - Checked
![Page 17: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/17.jpg)
2 Design
How We Planned The Application
![Page 18: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/18.jpg)
SAP
ClickCounter
Album Viewer
Camera
Tabs
Use
r Mod
ules
…Bottom-Up Composition
![Page 19: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/19.jpg)
Level-0 DFD
![Page 20: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/20.jpg)
Level-1 DFD
![Page 21: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/21.jpg)
The Basics of Android and The Building Blocks of It’s Code
It’s all about Coding!
AndroidLet us have a deeper look on
![Page 22: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/22.jpg)
Building Blocks of Android Code
Activity View Xml Intent
Android Manifest
![Page 23: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/23.jpg)
It’s time to examine Simple Android Project
Coding @ SAP
Code by Code
![Page 24: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/24.jpg)
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);
}}
};
![Page 25: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/25.jpg)
Start Up! Media PlayerMediaPlayer MediaPlayermySong.@Override
Protected void onCreate(Bundle savedInstanceState) {…mySong=MediaPlayer.create(StartUp.this, R.raw.music);
mySong.start();…}
@OverrideProtected void onPause() {
// TODO Auto-generated method stub
super.onPause();mySong.release();finish();
}
![Page 26: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/26.jpg)
The Start-Up
![Page 27: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/27.jpg)
Camera Initialization
ImageButton ib;Button b;
ib=(ImageButton)findViewById(R.id.ibTakePic);b=(Button)findViewById(R.id.bSetWall);
b.setOnClickListener(this);ib.setOnClickListener(this);
![Page 28: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/28.jpg)
Camera OnClick() Method
Public void onClick(View v) {// TODO Auto-generated method stub
switch(v.getId()){case R.id.bSetWall:
WallpaperManager myWallpaperManager=WallpaperManager.getInstance(getApplicationContext());
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_CAPTURE);
startActivityForResult(i,cameraData);break;
}}
![Page 29: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/29.jpg)
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);}
}
![Page 30: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/30.jpg)
Camera App
![Page 31: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/31.jpg)
3 Testing
The quality of SAP
![Page 32: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/32.jpg)
Black Box Testing
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
![Page 33: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/33.jpg)
Black Box Testing
Case Name: Sending an e-mail with faulty e-mail id
Description: Input invalid values( there is no . after @) in email address
Action: E-mail address=”iamswapan@gmailcom”…………… and click on 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 (without @ )in email address
Action: E-mail address=”iamswapangmail.com”…………… and click on 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
![Page 34: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/34.jpg)
public void onClick(View v) {// TODO Auto-generated method stub
switch(v.getId()){case R.id.bStart: int stoppedMilliseconds = 0; String chronoText =
mChronometer.getText().toString(); String array[] =
chronoText.split(":"); if (array.length == 2) { stoppedMilliseconds =
Integer.parseInt(array[0]) * 60 * 1000 + Integer.parseInt(array[1]) *
1000; } else if (array.length == 3) { stoppedMilliseconds =
Integer.parseInt(array[0]) * 60 * 60 * 1000 + Integer.parseInt(array[1]) * 60 * 1000 + Integer.parseInt(array[2]) * 1000; }
White Box Testing
mChronometer.setBase(SystemClock.elapsedRealtime() - stoppedMilliseconds);
mChronometer.start();break;case R.id.bStop:
mChronometer.stop();break;case R.id.bReset:
mChronometer.setBase(SystemClock.elapsedRealtime());
mChronometer.setEnabled(false);}
}}
![Page 35: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/35.jpg)
We Succeeded …
And, Finally
![Page 36: Simple Android Project (SAP)... A Test Application](https://reader033.vdocuments.mx/reader033/viewer/2022052823/55511778b4c905f10b8b4f3a/html5/thumbnails/36.jpg)
Thank You!