2introduction

71
PAGE-1 INTRODUCTION Sudhridh Bharat Application is a useful mobile application this project is provide the facility to various data (family, parent ,pregnant women, child , water source, type of toilet etc.) about a Anganwadi center for child nutrition and pregnant women monitoring in proper way The main strategy of the project is to provide all information about people from Anganwadi center to Block level officer and all officer that are belong to that deportment( mahila Baal Vikash and pustahar vibhag) very quickly and analysis that and provide needed nutrition material The mobile Application are use basically Anganwadi support(Helper) and collect All information about people and upload automatic and also with help of sync All information are show in cms according to state wise deistic wise and also display Block wise The mobile app is based on Jsw project hold on various modules. Login Registration Synchronizations Nutrition Monitoring Help Setting In this project my module is change language and registration which is part of Anganwadi Support ,it is dynamically related to collect information and change language according to requirement to the user and in registration module that are ahold parent registration ,pregnant women registration child registration and also nutrition and monitor registered child and pregnant women.

Transcript of 2introduction

Page 1: 2introduction

PAGE-1

INTRODUCTION

Sudhridh Bharat Application is a useful mobile application this project is provide the facility to various data (family, parent ,pregnant women, child , water source, type of toilet etc.) about a Anganwadi center for child nutrition and pregnant women monitoring in proper way

The main strategy of the project is to provide all information about people from Anganwadi center to Block level officer and all officer that are belong to that deportment( mahila Baal Vikash and pustahar vibhag) very quickly and analysis that and provide needed nutrition material

The mobile Application are use basically Anganwadi support(Helper) and collectAll information about people and upload automatic and also with help of sync All information are show in cms according to state wise deistic wise and also display Block wise The mobile app is based on Jsw project hold on various modules.

Login Registration Synchronizations Nutrition Monitoring Help Setting

In this project my module is change language and registration which is part of Anganwadi Support ,it is dynamically related to collect information and change language according to requirement to the user and in registration module that are ahold parent registration ,pregnant women registration child registration and also nutrition and monitor registered child and pregnant women.

1.1 Purpose.

Main aim in this mobile app (Sudirdh Bharat Application) is to provide an easy way not only automatic all functionalities of Anganwadi center but also to provide full information about people and water source , type of toilet and every thing according to block wise ,Deistic level related deportment officer very fast and accurate.We are committed to bring the best way to all information to help of CMS .

Page 2: 2introduction

PAGE-2

1.2 Scope

The current system of Anganwadi center the Anganwadi support is gather all information about the parent, pregnant women, child and note down a register (note book) and send that register to his upper officer but that process is very complex ,time taking system and untrusted system. this system have lot of drawback Example Anganwadi person are note all information about child ,height ,weight ,MUAC, current source of water, type of toilet but when that information are analysis and apply to next two month after that may something will be changed that time

With help of this project all information Conway very fast and easy to analyze and take decision easily

The result of this application will be very positive and I hope all state Govt. adopt this app and implemented in whole country, currently this app are implemented in maharastra Govt.

1.3 Definition, Acronyms, and Abbreviations-

IEEE The Institute of Electric and Electronics,IncMUAC Middle Upper Arm circumference EDD Expected Delivery DateLMP Last, Month, PeriodGUI Graphical User Management

Page 3: 2introduction

PAGE-3

Chapter- 2 THE OVERALL DESCRIPTION

Page 4: 2introduction

PAGE-4

2. Overall Description

2.1Product Perspective-

Anganwadi Support is a child nutrition and monitoring system this project is a mobile based project.it is provide facilities to Anganwadi helper are may belong to city or very backward Area there may be not sufficient resource (Electricity or network) this App are developed this kind of problem keep in mindNot use very much graphical interface and images that app have local and server data base .suppose the user are collect information on his mobile phone but that time network not available that time this app also work, that time this app store all information in local data base and that time the user on network he/she send all information into server with help of synchronization This app are provide various application on CMS but our application is different in following ways

Easy to gather all information to all person or any one person Using this app to provide an scale to a particular child is healthy or required nutrition . Similarly use the app we are calculate Expected Delivery Date of a pregnant women and

monitor his in a proper manner. In server end user’s are officer that are analysis and take decision according to graph

representation Server end according to select state, select deistic , select block, and select family

2.1.1 User interface-

The user will be interacted with the system a mobile application (Anganwadi support) are run in android 4.4(kit-cat) to current version that app not need to moreBattery and if user are login at one time with correct user name and password next time they does not need to user name and password that user enter directly main menu and register, or monitor very easily that app UI is very simple and not use any image or heavy weight code that are degrade that performance,

Page 5: 2introduction

PAGE-5

2.1.2 Hardware interfaces-

The hardware used for the development of the project is-;

Mobile device Android 4.4Processor Dual core 1.2GHZ RAM 1GBSD Card 8GBCamera 5mp 2492*1944

2.1.3 Software interfaces -

In client side very simple and mobile support android 4.4(OS)

2.1.4 Memory Constraints-

A minimum of 3GB RAM is required to install ADT.

2.2 Product Function-

The product function monitoring system is as follows:

1. Our system keep is handle the child nutrition .2. Our system keep all information about all family like as parent registration.3. The system is handle the child weight and height and its made a graph analytical

according view growth of child.4. All information will show in server and handle the web API.5. Web API is handle by admin and its control in server.

Page 6: 2introduction

PAGE-6

2.3 User Characteristics-

The product is design to be usable by individual with a minimum level of literacy and related to the use of information technology of mobile. The user of application required only a few of training on the application and this application hold many local language exp-Marathi, Hindi, English etc.

2.4 Constraints-

This application is developed on ADT bundle and web services are handle Cake Php .Web services is call by JSON API and local database is SqLite and server side database use MySql.

Page 7: 2introduction

PAGE-7

Chapter-3 Specific Requirement

Page 8: 2introduction

PAGE-8

3.1 External Interface Requirement-

3.1.1 User Interface-

The user interface of Anganwadi support content the following activities: Child Registration- All information about child. Parent Registration-All information about parents. Pregnant Women Registration-All information about pregnant women. Nutrition-The nutrition activity contain growth of child. Monitoring-The monitoring activity is contain the growth of pregnant women in proper

way. Water source- The rural or city area people drinking water source, well, tubewell,piped. Toilet Type- The registered family have type of toilet open, close. Delivery Order-Order of child. Weight- The child or pregnant women weight in cms. Height-The child or pregnant women height in cms. Hg- Hemoglobin level of pregnant women MUAC- Middle upper arm circumfuse

3.1.2 Hardware interface-

No specific hardware requirement for the application. In future we can configure some hardware to the application like bar code reader ,figure print reader and card reader,

3.1.3 Software interface-

The software used for the development of the project

Development tool :ADT BundleOS :windows/LinuxDBMS :SQLITE

Page 9: 2introduction

PAGE-9

3.2 Software product feature-

As we discuss about the various forms and their uses in the application, the block specified in the

forms takes appropriate input from the user validate them check them and processes the system

according to the input and generated outputs.

At form level our application has following commands-

1- Save - this button is used to save new data in database.

2- Modify - this button is used to modify the records.

3- View - this button is used to view the records.

4- First - This button is used to view the first record in the database.

5- Previous - This button is used to view the previous record.

6- Next - This button is used to view the next record.

7- Last - This button is used to view the last record.

8- Delete - This button is used to delete the records.

9- Exit - This button is used to exit form the form.

10- Cancel - This button is used to clear the records from the forms.

11- Print - This button is used to print the records.

The whole processing in the web application are done on the level. Each form validates input on

form level and then send them into the database. Our web application generates two types of

output-

1-Output in forms

2-In the forms of reports

3.2.1 Report generation-

Outputs can be generated in the form of reports. Reports can be generated in the specified format

according to user requirement like-

Tabular

Group left

Form-like

Mailing-Label

Group-above

Page 10: 2introduction

PAGE-10

Matrix

Matrix-with-group

Form-letter

These reports are forcontains all information of all branches with company wise/institute

wise. This is an online web application so that user take information online. Parents can see

class details, their progress reports and also results from home. This is too much user

friendly.there is lots of scope the area of user interface, database performance Etc.This report

master, payment,good receipt etc. these reports are generated by the joining of the various

tables. The report output can be delivered directly to a printer or saved in the following

formats:

PDF

HTML

XML

Microsoft Excel

3.3 Logical DataBase Requirements:

In this application Sqlite is used as database. There are many tables in the modules. These table

are dynamically related with other modules os Target PMT. In these tables various types of keys

like primary key, foreign key constraints like not null, unique and triggers are applied. This

database secure and fast.

The tables of this module are as follows-

1- Login

2- Family

3- Child Registration

4- Parent Registration

5- Language

6- Child Nutrition

7- Anganwadi center

8- Beat

9- Birth status

Page 11: 2introduction

PAGE-11

10- Boolean support

11- Caste

12- Delivery type

13- Drinking water source

14- Gender

15- Multimedia

16- Nutrition

17- Place of delivery

18- Pregnant women monitor

19- Regional language

20- Religion

21- Server id

22- Toilet availability

23- Type toilet

24- User

1.Login

Page 12: 2introduction

PAGE-12

user_name TEXTuser_id INTEGERPassword TEXTEmail TEXTPRIMARY KEY user_id

2.Anganwadi center

center_id INTEGERcenter_name TEXTbeat_id NUMERICPRIMARY KEY center_id

3.Child Registration

Gender TEXTStatus NUMERICchild_id INTEGERchild_name TEXTdate_of_birth TEXTbirth_weight TEXTparent_name TEXTserver_id NUMERICLatitude TEXTLongitude TEXTMultimedia TEXT,birth_order NUMERICuser_id NUMERICbirth_height TEXTPRIMARY KEY child_id

4.ParentRegistration

Page 13: 2introduction

PAGE-13

parent_id INTEGERhouser_id TEXTLatitude TEXTLongitude TEXTFather TEXTMother TEXThas_toilet NUMERIChave_water NUMERIClitracy_status NUMERICReligion NUMERICCaste TEXTf_adharcard TEXTm_adharcard TEXTAddress TEXTuser_id NUMERICserver_id NUMERICStatus NUMERICPRIMARY KEY parent_id

5.Child_Nutrition_Monitorparent_name TEXTchild_name TEXTWeight TEXTHeight TEXTMuac TEXTStatus NUMERICServer_id NUMERICMultimedia TEXT

6.Beat

beat_id INTEGERbeat_name TEXTPRIMARY KEY beat_id

7.Birth_StatusId INTEGERValue TEXTPRIMARY KEY id

Page 14: 2introduction

PAGE-14

8.Boolean_SupportId INTEGERValue TEXTPRIMARY KEY id

9.Nutrition

nutrition_id INTEGERStatus NUMERICchild_id NUMERICdate_of_monitoring TEXTheight TEXTWeight TEXTMuac TEXTlatitude TEXTLongitude TEXTserver_id NUMERICPRIMARY KEY nutrition_id

9.Pregnant_Women Monitorwomen_id NUMERICpregnant_women_name TEXTWeight TEXTHb TEXTStatus TEXTserver_id NUMERICcurrent_date TEXT

10.Regional_language

multimedia_id INTEGERData BLOBStatus NUMERICType NUMERICserver_id NUMERICPRIMARY KEY multimedia_id

Page 15: 2introduction

PAGE-15

10.ServerValue TEXTId INTEGERPRIMARY KEY id

3.4 Software System Attributes:

3.4.1 Reliability

Reliability the main objective so as to win the Confidence of the user and to provide information

on which he can relies upon. 

3.4.2 Availability

The entire system should be available round the year, except for a periodic maintenance. The

maintenance period should be pre scheduled and short. The users should be reminded of the

unavailability period, well in advance.

3.4.3 Security

Since the information entered is of vital Importance to the organization and to the owner

of the website, it should be made to allow only the website developers to manipulate the

data.

Page 16: 2introduction

PAGE-16

3.4.4 Maintainability

The document should be easy for the users who execute the system day to day, for the developers

who wish to edit or develop further, and for the personnel who is in charge of the maintenance.

3.4.5 Portability

The system shoul support window and Linux operating system. And application can also be

integrate into client-server web application.

3.4.6 Usability

The GUI should be easy to learn and use by users of any technical background. A tool-tip feature

is available in all blocks, to guide the users.

3.5 List Of Diagrams

3.5.1 Data Flow Diagram-

Zero level DFD.

Page 17: 2introduction

PAGE-17

One level DFD

LOGINAnganwadi Helper

VERIFY

FROM

DATABASE

REGISTRATION MONIT

ORINGSYNCRO

NIZ-ATION

HELP

Change

language

Main Menu

1.11.2 1.3 1.4

1.0

informationinformation

datadata

information

info

rmati

on

info

rmati

on

inform

ation

information

inform

ation

info

rmati

on

1.5

Page 18: 2introduction

PAGE-18

3.5.2 Use case diagram

LOGIN

REGISTRATION

MONITORING/

NUTRITIONSYNCHRONI

ZATION

HELP

SETTING

PEOPLE LIST

ANALYSIS

ANGANWADI SAHAYIKA

Anganwadi Helper

ADMIN

Page 19: 2introduction

PAGE-19

Chapter-4 Implementation Results

Page 20: 2introduction

PAGE-20

Login page

Page 21: 2introduction

PAGE-21

Parent registration

Page 22: 2introduction

PAGE-22

List Parent registration

Page 23: 2introduction

PAGE-23

Pregnant women registration

Page 24: 2introduction

PAGE-24

Listing of Pregnant women page

Page 25: 2introduction

PAGE-25

Child registration

Page 26: 2introduction

PAGE-26

Monitoring

Page 27: 2introduction

PAGE-27

Pregnant women monitoring

Page 28: 2introduction

PAGE-28

Child monitoring

Page 29: 2introduction

PAGE-29

Sync

Page 30: 2introduction

PAGE-30

Settings

Page 31: 2introduction

PAGE-31

After change language

Page 32: 2introduction

PAGE-32

Chapter-5 Source Code

Page 33: 2introduction

PAGE-33

Login Pagepublic class ActivityLogin extends Activity { EditText etxtUserName, extxPassword; TextView txtLogin,txtUser,txtPass,txtLat1,txtLat,txtLang,txtType; String notavaliduser; public static final String TxtLogin = "txtLogin"; public static final String TxtUser = "txtUser"; public static final String TxtPass = "txtPass"; public static final String TxtLat1 = "txtLat1"; public static final String TxtLat = "txtLat"; public static final String TxtLang = "txtLang"; public static final String TxtType = "txtType"; public static final String Notavaliduser = "notavaliduser";

String strUserName, strPassword, gcm;SharedPrefHelper sph;LocationManager locationManager;long minTime = 1000;float minDistance = 1;public boolean foundGPSLocation = false;String tag = "";MyLocationListener mylistener;

SqliteHelper sqliteHelper;ServerHelper serverhelper;private ProgressDialog mProgressDialog;

@Overrideprotected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);setContentView(R.layout.activity_login);initialize();

String languageId = sph.getString("Language", "1");// getting languageId

String Login = sqliteHelper.LanguageChange(TxtLogin,languageId);String User = sqliteHelper.LanguageChange(TxtUser,languageId);String Pass = sqliteHelper.LanguageChange(TxtPass,languageId);String Lat1 = sqliteHelper.LanguageChange(TxtLat1,languageId);String Lat = sqliteHelper.LanguageChange(TxtLat,languageId);

Page 34: 2introduction

PAGE-34

String Lang = sqliteHelper.LanguageChange(TxtLang,languageId);String Type = sqliteHelper.LanguageChange(TxtType,languageId);notavaliduser = sqliteHelper.LanguageChange(Notavaliduser,languageId);

txtLogin.setText(Login);txtUser.setText(User);txtPass.setText(Pass);txtLat1.setText(Lat1);txtLat.setText(Lat);txtLang.setText(Lang);txtType.setText(Type);

//startGPS(); //enableGPS(); //startGettingLocationUsingGPSProvider();

}

public void initialize() {

sqliteHelper = new SqliteHelper(this);sph = new SharedPrefHelper(this);txtLogin = (TextView) findViewById(R.id.txtLogin);txtUser = (TextView) findViewById(R.id.txtUser);txtPass = (TextView) findViewById(R.id.txtPass);txtLat1 = (TextView) findViewById(R.id.txtLat1);txtLat = (TextView) findViewById(R.id.txtLat);txtLang = (TextView) findViewById(R.id.txtLang);txtType = (TextView) findViewById(R.id.txtType);etxtUserName = (EditText) findViewById(R.id.etxtUserName);extxPassword = (EditText) findViewById(R.id.extxPassword);sph = new SharedPrefHelper(this);locationManager = (LocationManager)

getSystemService(LOCATION_SERVICE);mylistener = new MyLocationListener();txtLat = (TextView) findViewById(R.id.txtLat);txtLang = (TextView) findViewById(R.id.txtLang);txtType = (TextView) findViewById(R.id.txtType);//sqliteHelper=new SqliteHelper(this);serverhelper=new ServerHelper();

mProgressDialog = new ProgressDialog(this);mProgressDialog.setIndeterminate(false);mProgressDialog.setMax(100);mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

Page 35: 2introduction

PAGE-35

mProgressDialog.setCancelable(true);mProgressDialog.setMessage("Please wait!!! ");mProgressDialog.setCanceledOnTouchOutside(false);

}

private void startGPS() {boolean isGPSEnabled = locationManager

.isProviderEnabled(LocationManager.GPS_PROVIDER);if (!isGPSEnabled) {

showSettingsAlert();}

}

public final boolean isInternetOn() {

ConnectivityManager connec = (ConnectivityManager) getSystemService(getBaseContext().CONNECTIVITY_SERVICE);

if (connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED

|| connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING

|| connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING

|| connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED) {

return true;

} else if (connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED

|| connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED) {

return false;}return false;

}

public void click_login(View vw) {

strUserName = etxtUserName.getText().toString();strPassword = extxPassword.getText().toString();if (strUserName.equalsIgnoreCase("")

|| (strPassword.equalsIgnoreCase(""))) {

Page 36: 2introduction

PAGE-36

Toast.makeText(getApplicationContext(),"Please enter username and password!", 200).show();

} else {if (sqliteHelper.validateUserOffline(strUserName, strPassword)>0) {

GlobalVars.UserID=sqliteHelper.validateUserOffline(strUserName, strPassword);

Intent intent = new Intent(this, MainMenuActivity.class);startActivity(intent);

} else {Toast.makeText(getApplicationContext(),

"Invalid user, authenticating online!!!", 200).show();

if(isInternetOn()==false){

Toast.makeText(getApplicationContext(),"Please enable internet to online login!!!",

200).show();}else{

mProgressDialog.show();new AsyncTask<String, String, String>(){

@Overrideprotected void onPostExecute(String result) {

// TODO Auto-generated method stubsuper.onPostExecute(result);if(result!=null){

try {JSONObject user= new

JSONObject(result);if(user.has("user_id")){

int user_id= user.getInt("user_id");

if(user_id>0){

sqliteHelper.SaveUser(strUserName, strPassword, user_id+"");

GlobalVars.UserID=user_id;Intent intent = new

Intent(ActivityLogin.this, MainMenuActivity.class);

Page 37: 2introduction

PAGE-37

startActivity(intent);}else{

Toast.makeText(getApplicationContext(),

notavaliduser, 200).show();}

}mProgressDialog.dismiss();

} catch (JSONException e) {// TODO Auto-generated catch blocke.printStackTrace();

}

}

}

@Overrideprotected String doInBackground(String... arg0) {

// TODO Auto-generated method stubreturn serverhelper.LoginOnServer(strUserName,

strPassword);}

}.execute((String)null);}}

}}

/** * Get provider name. * * @return Name of best suiting provider. * */String getProviderName() {

LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

Criteria criteria = new Criteria();criteria.setPowerRequirement(Criteria.POWER_LOW); // Chose your desired

// power consumption

Page 38: 2introduction

PAGE-38

// level.criteria.setAccuracy(Criteria.ACCURACY_FINE); // Choose your accuracy

// requirement.criteria.setSpeedRequired(true); // Chose if speed for first location

// fix is required.

criteria.setAltitudeRequired(false); // Choose if you use altitude.criteria.setBearingRequired(false); // Choose if you use bearing.criteria.setCostAllowed(false); // Choose if this provider can waste

// money :-)

// Provide your criteria and flag enabledOnly that tells// LocationManager only to return active providers.return locationManager.getBestProvider(criteria, true);

}

public void showSettingsAlert() {AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);// Setting Dialog TitlealertDialog.setTitle("GPS setting");// Setting Dialog MessagealertDialog.setMessage("Would you like to enable GPS?");// On pressing Settings buttonalertDialog.setPositiveButton("Yes",

new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {

Intent intent = new Intent(

Settings.ACTION_LOCATION_SOURCE_SETTINGS);startActivity(intent);

}});

// on pressing cancel buttonalertDialog.setNegativeButton("No",

new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {

dialog.cancel();}

});

// Showing Alert Message

Page 39: 2introduction

PAGE-39

alertDialog.show();}

public void Notify(String notificationTitle, String notificationMessage,String path) {

Uri soundUri = Uri.parse("android.resource://com.example.anganwarisupport/raw/"

+ path);NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(

this).setSmallIcon(R.drawable.ic_launcher) // notification icon.setContentTitle("Geo-Location Updates") // title

// for

// notification.setContentText("Geo-Location Updates") // message for

// notification.setAutoCancel(true).setSound(soundUri);

NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

mNotificationManager.notify(0, mBuilder.build());}

public void startGettingLocationUsingGPSProvider() {locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,

minTime, minDistance, mylistener);CountDownTimer count = new CountDownTimer(5000, 1) {

@Overridepublic void onFinish() {

Toast.makeText(getApplicationContext(), "Connecting AGPS", 200)

.show();Notify("a", "aa", "agps");tag = "AGPS";startGettingLocationUsingNetworkProvider();

}

@Overridepublic void onTick(long millisUntilFinished) {

// TODO Auto-generated method stub

Page 40: 2introduction

PAGE-40

}

};count.start();

}

public void startGettingLocationUsingNetworkProvider() {locationManager.requestLocationUpdates(

LocationManager.NETWORK_PROVIDER, minTime, minDistance,

mylistener);}

public boolean isGPSEnabled() {LocationManager mlocManager = (LocationManager) this

.getSystemService(this.LOCATION_SERVICE);

boolean enabled = mlocManager.isProviderEnabled(LocationManager.GPS_PROVIDER);

return enabled;}

public void enableGPS() {Intent intent = new Intent("android.location.GPS_ENABLED_CHANGE");intent.putExtra("enabled", true);sendBroadcast(intent);

}

public void disableGPS() {// Disable GPSIntent intent = new Intent("android.location.GPS_ENABLED_CHANGE");intent.putExtra("enabled", false);sendBroadcast(intent);

}

class MyLocationListener implements LocationListener {String provider_tag = "";

@Overridepublic void onLocationChanged(Location location) {

String sss = location.getLongitude() + "";if (sss.length() > 10) {

txtLat.setText("Latitude : " + location.getLatitude());txtLang.setText("Longitude : " + location.getLongitude());

Page 41: 2introduction

PAGE-41

txtType.setText("Type : " +"GPS");} else {

txtLat.setText("Latitude : " + location.getLatitude());txtLang.setText("Longitude : " + location.getLongitude());txtType.setText("Type : " +"AGPS");

}

GlobalVars.lattitude = location.getLatitude() + "";GlobalVars.longitude = location.getLongitude() + "";

}

@Overridepublic void onProviderDisabled(String provider) {

// TODO Auto-generated method stub

}

@Overridepublic void onProviderEnabled(String provider) {

// TODO Auto-generated method stub

}

@Overridepublic void onStatusChanged(String provider, int status, Bundle extras) {

// TODO Auto-generated method stubif (provider.equalsIgnoreCase("gps")) {

Notify("a", "aa", "gps");locationManager.requestLocationUpdates(

LocationManager.GPS_PROVIDER, 10, 1, mylistener);

tag = "GPS";}

}}

@Overridepublic void onBackPressed() {

// TODO Auto-generated method stubsuper.onBackPressed();// disableGPS();

}

}

Page 42: 2introduction

PAGE-42

Child Registrationpublic class ActivityChildReg extends Activity implements

AdapterView.OnItemSelectedListener {

String Childmandatory;String gendermandatory;String dobmandatory;String weightmandatory;String pleasebOrder,childregistrationdone,no,yes,cancelRegistration,savingserver;

SharedPrefHelper sph;SqliteHelper sqliteHelper;

TextView txtChildRegistration;TextView txtDateOfBirth;TextView txtBirthWeight;TextView txtBirthOrder;TextView txtSelectParent;TextView txtPlaceOfDelivery;TextView txtPhotograph;TextView txtGps;TextView txtBirthHeight,txtChildName1,txtGender;

public static final String TxtChildRegistration = "txtChildRegistration";public static final String TxtDateOfBirth = "txtDateOfBirth";public static final String TxtBirthWeight = "txtBirthWeight";public static final String TxtBirthOrder = "txtBirthOrder";public static final String TxtSelectParent = "txtSelectParent";public static final String TxtPlaceOfDelivery = "txtPlaceOfDelivery";public static final String TxtPhotograph = "txtPhotograph";public static final String TxtGps = "txtGps";public static final String TxtBirthHeight = "txtBirthHeight";public static final String TxtChildName1 = "txtChildName1";public static final String TxtGender = "txtGender";

public static final String Thildmandatory="Childmandatory!";

Page 43: 2introduction

PAGE-43

public static final String Gendermandatory="gendermandatory"; public static final String Dobmandatory="dobmandatory"; public static final String Weightmandatory="weightmandatory"; public static final String PleasebOrder="pleasebOrder"; public static final String Childregistrationdone="childregistrationdone"; public static final String No="no"; public static final String Yes="yes"; public static final String CancelRegistration="cancelRegistration"; public static final String Savingserver="savingserver";

static EditText etxtDateOfBirth, etxtChildName, etxtBirthWeight, etxtBirthHeight;Button btnGps;Spinner spnBirthOrder, spnSelectParent,spnGender;ImageView btnClicked;

private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE = 100;byte[] image;

int birth_order, birthOrder;String child_name, date_of_birth, child_weight, parent_name, lattitude,gender,

longitude, parentid, birthWeight;String[] birthStatus = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10",

"11", "12" };

ProgressDialog progressDialog;

String image64 = "";ServerHelper serverhelper= new ServerHelper();

@Overrideprotected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);setContentView(R.layout.activity_activity_child_reg);

initialize();

btnGps.setText("Lat: " + GlobalVars.lattitude + ", Long: "+ GlobalVars.longitude);

String languageId = sph.getString("Language", "1");// getting languageId

String childregistration = sqliteHelper.LanguageChange(TxtChildRegistration,languageId);

String dob = sqliteHelper.LanguageChange(TxtDateOfBirth,languageId);String bweight = sqliteHelper.LanguageChange(TxtBirthWeight,languageId);String border = sqliteHelper.LanguageChange(TxtBirthOrder,languageId);String selectparent = sqliteHelper.LanguageChange(TxtSelectParent,languageId);

Page 44: 2introduction

PAGE-44

String placeofdel=sqliteHelper.LanguageChange(TxtPlaceOfDelivery,languageId);

String Photograph = sqliteHelper.LanguageChange(TxtPhotograph,languageId);String gps = sqliteHelper.LanguageChange(TxtGps,languageId);String BirthHeight = sqliteHelper.LanguageChange(TxtBirthHeight,languageId);String ChildName1 =

sqliteHelper.LanguageChange(TxtChildName1,languageId);String Gender = sqliteHelper.LanguageChange(TxtGender,languageId);Childmandatory=sqliteHelper.LanguageChange(Thildmandatory, languageId);gendermandatory=sqliteHelper.LanguageChange(Gendermandatory, languageId);dobmandatory=sqliteHelper.LanguageChange(Dobmandatory, languageId);dobmandatory=sqliteHelper.LanguageChange(Dobmandatory, languageId);weightmandatory=sqliteHelper.LanguageChange(Weightmandatory, languageId);pleasebOrder=sqliteHelper.LanguageChange(PleasebOrder, languageId);childregistrationdone=sqliteHelper.LanguageChange(Childregistrationdone,

languageId);no=sqliteHelper.LanguageChange(No, languageId);yes=sqliteHelper.LanguageChange(Yes, languageId);cancelRegistration=sqliteHelper.LanguageChange(CancelRegistration,

languageId);savingserver=sqliteHelper.LanguageChange(Savingserver, languageId);

//setting texttxtChildRegistration.setText(childregistration);txtDateOfBirth.setText(dob);txtBirthWeight.setText(bweight);txtBirthOrder.setText(border);txtSelectParent.setText(selectparent);txtPlaceOfDelivery.setText(placeofdel);txtPhotograph.setText(Photograph);txtGps.setText(gps);txtBirthHeight.setText(BirthHeight);txtChildName1.setText(ChildName1);txtGender.setText(Gender);

spnBirthOrder.setOnItemSelectedListener(this);

// Creating the ArrayAdapter instance having the country listArrayAdapter aa = new ArrayAdapter(this,

android.R.layout.simple_spinner_item, birthStatus);

aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);// Setting the ArrayAdapter data on the SpinnerspnBirthOrder.setAdapter(aa);

populateList(spnSelectParent, "parents", "parent_id", "mother",

Page 45: 2introduction

PAGE-45

"Select Parent", "");

populateList(spnGender, "gender", "id", "value","Select Gender", "");

}public void initialize() {

sqliteHelper = new SqliteHelper(this);sph = new SharedPrefHelper(this);serverhelper= new ServerHelper();

txtChildRegistration = (TextView) findViewById(R.id.txtChildRegistration);txtDateOfBirth = (TextView) findViewById(R.id.txtDateOfBirth);txtBirthWeight = (TextView) findViewById(R.id.txtBirthWeight);txtBirthOrder = (TextView) findViewById(R.id.txtBirthOrder);txtSelectParent = (TextView) findViewById(R.id.txtSelectParent);txtPlaceOfDelivery = (TextView) findViewById(R.id.txtPlaceOfDelivery);txtPhotograph = (TextView) findViewById(R.id.txtPhotograph);txtGps = (TextView) findViewById(R.id.txtGps);txtBirthHeight = (TextView) findViewById(R.id.txtBirthHeight);txtChildName1 = (TextView) findViewById(R.id.txtChildName1);txtGender = (TextView) findViewById(R.id.txtGender);

etxtDateOfBirth = (EditText) findViewById(R.id.etxtDateOfBirth);spnBirthOrder = (Spinner) findViewById(R.id.spnBirthOrder);spnSelectParent = (Spinner) findViewById(R.id.spnSelectParent);spnGender = (Spinner) findViewById(R.id.spnGender);etxtChildName = (EditText) findViewById(R.id.etxtChildName);etxtBirthWeight = (EditText) findViewById(R.id.etxtBirthWeight);btnClicked = (ImageView) findViewById(R.id.btnClicked);btnGps = (Button) findViewById(R.id.btnGps);etxtBirthHeight = (EditText) findViewById(R.id.etxtBirthHeight);Button btnGps = (Button) findViewById(R.id.btnGps);

progressDialog = new ProgressDialog(this);progressDialog.setMessage(savingserver);progressDialog.setIndeterminate(false);progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);progressDialog.setCancelable(true);progressDialog.setIndeterminateDrawable(getResources().getDrawable(

R.drawable.rotate_loading_360));

}

Page 46: 2introduction

PAGE-46

public void click_Image(View vw) {

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);File f = new File(android.os.Environment.getExternalStorageDirectory(),

"temp.jpg");intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));startActivityForResult(intent,

CAMERA_CAPTURE_IMAGE_REQUEST_CODE);

}

public String getSelectedValue(Spinner spn) {SpinnerHelper data = (SpinnerHelper) spn.getItemAtPosition((int)

spn.getSelectedItemId());return data.getValue();

}

public void click_save(View vw) {parentid = getSelectedValue(spnSelectParent);int serverid=sqliteHelper.getServerId(parentid);gender =getSelectedValue(spnGender);// spnGender.getSelectedItemId()+"";

String order = spnBirthOrder.getSelectedItem().toString();

birthWeight = etxtBirthWeight.getText().toString();String height=etxtBirthHeight.getText().toString();

Child child = new Child();if (etxtChildName.getText().toString().equals("")) {

etxtChildName.setError(Childmandatory);}else if (gender.equals("")) {

Toast.makeText(getApplicationContext(),gendermandatory,Toast.LENGTH_SHORT).show();

}else if (etxtDateOfBirth.getText().toString().equals("")) {

etxtDateOfBirth.setError(dobmandatory);}

else if (etxtBirthWeight.getText().toString().equals("")) {

etxtBirthWeight.setError(weightmandatory);}

else if (order.equals("")) {

Page 47: 2introduction

PAGE-47

Toast.makeText(getApplicationContext(),pleasebOrder, Toast.LENGTH_SHORT).show();

}else{child.setChild_name(etxtChildName.getText().toString());child.setParent_name(parentid);child.setGender(gender);child.setDate_of_birth(etxtDateOfBirth.getText().toString());child.setChild_weight(birthWeight);child.setBirth_order( Integer.parseInt(order));child.setMultimedia(image64);child.setLatitude(GlobalVars.lattitude);child.setLongitude(GlobalVars.longitude);child.setHeight(height);

long id = sqliteHelper.ChildRegistration(child);if (id > 0) {

Toast.makeText(getApplicationContext(),childregistrationdone, 200).show();//child registration don!!

Intent intent1 = new Intent(ActivityChildReg.this,ActivityChildListing.class);

intent1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);startActivity(intent1);

}}

/*new AsyncTask<String, String, String>(){

@Overrideprotected void onPostExecute(String result) {

// TODO Auto-generated method stubsuper.onPostExecute(result);progressDialog.dismiss();

Intent intent1 = new Intent(ActivityChildReg.this,

MainMenuRegistrationActivity.class);

intent1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);startActivity(intent1);

Page 48: 2introduction

PAGE-48

}

@Overrideprotected String doInBackground(String... arg0) {

// TODO Auto-generated method stubreturn serverhelper.ChildRegistration(child);//return null;

}

}.execute((String)null);*/

}

private int parseInt(Object selectedItem) {// TODO Auto-generated method stubreturn 0;

}

@SuppressLint("NewApi")public void show_callender(View vw) {

DialogFragment newFragment = new DatePickerFragment();newFragment.show(getFragmentManager(), "datePicker");

}

@SuppressLint("NewApi")public static class DatePickerFragment extends DialogFragment implements

DatePickerDialog.OnDateSetListener {

@Overridepublic Dialog onCreateDialog(Bundle savedInstanceState) {

// Use the current date as the default date in the pickerfinal Calendar c = Calendar.getInstance();int year = c.get(Calendar.YEAR);int month = c.get(Calendar.MONTH);int day = c.get(Calendar.DAY_OF_MONTH);// Create a new instance of DatePickerDialog and return itreturn new DatePickerDialog(getActivity(), this, year, month, day);

}

public void onDateSet(DatePicker view, int year, int month, int day) {String dt = day + "-" + month + "-" + year;

Page 49: 2introduction

PAGE-49

Calendar c = Calendar.getInstance();c.set(year, month, day, 0, 0);SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");etxtDateOfBirth.setText(sdf.format(c.getTime()));

}}

public void populateList(Spinner spinner, String tableName, String col_id,String col_value, String label, String whr) {

ArrayList<SpinnerHelper> items = new ArrayList<SpinnerHelper>();items = sqliteHelper.populateSpinner(tableName, col_id, col_value,

label, whr);ArrayAdapter<SpinnerHelper> adapter = new ArrayAdapter<SpinnerHelper>(

ActivityChildReg.this, android.R.layout.simple_spinner_item,items);

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);spinner.setPrompt(label);spinner.setAdapter(adapter);

}

@Overrideprotected void onActivityResult(int requestCode, int resultCode, Intent data) {

// TODO Auto-generated method stubsuper.onActivityResult(requestCode, resultCode, data);

if (resultCode == RESULT_OK) {if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE)

{File f = new File(Environment.getExternalStorageDirectory()

.toString());for (File temp : f.listFiles()) {

if (temp.getName().equals("temp.jpg")) {f = temp;break;

}}try {

Bitmap bm;BitmapFactory.Options btmapOptions = new

BitmapFactory.Options();

bm = BitmapFactory.decodeFile(f.getAbsolutePath(),btmapOptions);

Page 50: 2introduction

PAGE-50

final int maxSize = 800;int outWidth;int outHeight;int inWidth = bm.getWidth();int inHeight = bm.getHeight();if (inWidth > inHeight) {

outWidth = maxSize;outHeight = (inHeight * maxSize) / inWidth;

} else {outHeight = maxSize;outWidth = (inWidth * maxSize) / inHeight;

}

bm = Bitmap.createScaledBitmap(bm, outWidth, outHeight,

true);

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

bm.compress(Bitmap.CompressFormat.PNG, 100,byteArrayOutputStream);

byte[] byteArray = byteArrayOutputStream.toByteArray();image64 =

Base64.encodeToString(byteArray,Base64.DEFAULT);

btnClicked.setImageBitmap(bm);

String path = android.os.Environment.getExternalStorageDirectory()+ File.separator+ "Phoenix" + File.separator + "default";

f.delete();OutputStream fOut = null;File file = new File(path, String.valueOf(System

.currentTimeMillis()) + ".jpg");try {

fOut = new FileOutputStream(file);bm.compress(Bitmap.CompressFormat.JPEG, 85,

fOut);fOut.flush();fOut.close();

} catch (FileNotFoundException e) {e.printStackTrace();

} catch (IOException e) {e.printStackTrace();

} catch (Exception e) {

Page 51: 2introduction

PAGE-51

e.printStackTrace();}

} catch (Exception e) {e.printStackTrace();

}}

}

}

public void click_getgps(View vw) {Button btnGps = (Button) findViewById(R.id.btnGps);btnGps.setText("Lat: " + GlobalVars.lattitude + ", Long: "

+ GlobalVars.longitude);}

@Overridepublic void onBackPressed() {

AlertDialog.Builder builder = new AlertDialog.Builder(this);// builder.setTitle("Information");builder.setMessage(cancelRegistration);

builder.setPositiveButton(no, new DialogInterface.OnClickListener() {public void onClick(DialogInterface dialog, int which) {

dialog.dismiss();}

});

builder.setNegativeButton(yes, new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {

Intent intent = new Intent(ActivityChildReg.this,MainMenuRegistrationActivity.class);

intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK| Intent.FLAG_ACTIVITY_CLEAR_TASK);

startActivity(intent);}

});AlertDialog alert = builder.create();alert.show();

}

@Overridepublic boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.

Page 52: 2introduction

PAGE-52

getMenuInflater().inflate(R.menu.activity_child_reg, menu);return true;

}

@Overridepublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,

long arg3) {// TODO Auto-generated method stub

}

@Overridepublic void onNothingSelected(AdapterView<?> arg0) {

// TODO Auto-generated method stub

}

}

Page 53: 2introduction

PAGE-53

Chapter-6 Testing

Page 54: 2introduction

PAGE-54

Feasibility Study (include Technical, Operational and Economical Feasibility)

There are five areas of feasibility - Technical, Economic, Legal, Operational, and Scheduling.

Technology and system feasibility

The assessment is based on an outline design of system requirements, to determine whether the company has the technical expertise to handle completion of the project. When writing a feasibility report, the following should be taken to consideration:

A brief description of the business to assess more possible factors which could affect the

study

The part of the business being examined

The human and economic factor

The possible solutions to the problem

At this level, the concern is whether the proposal is both technically and legal feasible (assuming moderate cost).

Legal Feasibility

Determines whether the proposed system conflicts with legal requirements , e.g. a data processing system must comply with the local Data Protection Acts .

Operational Feasibility

Operational feasibility is a measure of how well a proposed system solves the problems, and takes advantage of the opportunities identified during scope definition and how it satisfies the requirements identified in the requirements analysis phase of system development.

The operational feasibility assessment focuses on the degree to which the proposed development projects fits in with the existing business environment and objectives with regard to development schedule, delivery date and existing business processes.

To ensure success, desired operational outcomes must be imparted during design and development. These include such design-dependent parameters such as reliability, maintainability, supportability, usability, reducibility, disposability, sustainability, affordability and others. These parameters are required to be considered at the early stages of design if desired operational behaviors are to be realized. A system design and development requires appropriate and timely application of engineering and management efforts to meet the previously mentioned

Page 55: 2introduction

PAGE-55

parameters. A system may serve its intended purpose most effectively when its technical and operating characteristics are engineered into the design. Therefore operational feasibility is a critical aspect of systems engineering that needs to be an integral part of the early design phases.

Schedule Feasibility

A project will fail if it takes too long to be completed before it is useful. Typically this means estimating how long the system will take to develop, and if it can be completed in a given time period using some methods like payback period. Schedule feasibility is a measure of how reasonable the project timetable is. Given our technical expertise, are the project deadlines reasonable? Some projects are initiated with specific deadlines. It is necessary to determine whether the deadlines are mandatory or desirable.

Page 56: 2introduction

PAGE-56

BIBLIOGRAPHY

BOOKS JAVA 2 Complete Reference. Programming with java”E.Ballaguruswamy”

REFERENCES http://www.android.developer.com/ http://www.androidhive.com/ http://www.javatpoint.com/ http://www.wikipedia.com/ introduction_of_android.html http://www.androidhelper.com