eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the...

49
PROJECT CONTEST INDIAN INSTITUTE OF TECHNOLOGY, KANPUR EVENT ALERTER Submitted by S.BOMMURAJ R.MAHALINGAM Chettinad College of Engineering & Technology Puliyur CF, Karur – 639 114, Tamilnadu, India

Transcript of eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the...

Page 1: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

PROJECT CONTEST

INDIAN INSTITUTE OF TECHNOLOGY, KANPUR

EVENT ALERTER

 

 

Submitted by

 

 

 

S.BOMMURAJ R.MAHALINGAM

Chettinad College of Engineering & TechnologyPuliyur CF, Karur – 639 114, Tamilnadu, India

 

Page 2: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

CONTENTS

S.NO TITLE PAGE  NO

1. INTRODUCTION 1.1 About the project

2. SYSTEM ANALYSIS 2.1 Existing System 2.2 Proposed System

3. PROBLEM DESCRIPTION 3.1 Module Description

4. SYSTEM CONFIGURATION  4.1Hardware Requirement 4.2 Software Requirement

5. SYSTEM DESIGN 5.1 Dataflow Diagram

6. TOOLS AND TECHNIQUES

7. CONCLUSION

8. ANNEXURE 8.1 Source Code 8.2 Screen Shots

9. REFERENCES

Page 3: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

1. INTRODUCTION

1.1 About the project

Modern hand held devices such as smart phones and PDAs have become increasingly powerful in recent years. Dramatic breakthroughs in processing power along with the number of extra features included in these devices have opened the doors to a wide range of commercial possibilities. In particular, most cell phones regularly include cameras, processors comparable to PCs and internet access.  However, even with all these added abilities, there are few applications that allow much passing of the environmental information and location based services.

 As mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras, planners, mp3 players etc., are being used in daily life. They become inseparable from daily activities. Numerous applications are available to plan one’s daily activity. Birthday reminder, calendar event reminder are some of the examples of those applications which play vital role in daily activities. The application that falls under this category is the Event Alerter. This application has been developed for the Google Android tablet and mobile devices.

The application can able to remind about any event / task related to academic activities such as showing the view of the daily class time table of a faculty member and students. It also provides the facility of reminding about the examination schedule to the students and the examination duty schedule to the faculty members respectively. It enables the facility of daily attendance maintenance and internal mark calculation for each and every subject to the faculty The application gets the name of the event, date, time, number of times the reminder to be given (one time or multiple times) as its input.

Currently the faculties members are provided with their respective time table schedules which have to be maintained by them manually and it takes a great deal of effort to maintain the records systematically. Also it is difficult to retrieve information from the records on paper. This application speeds up the procedure and reduces the efforts of the faculty.

Page 4: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

2. SYSTEM ANAYSIS

2.1 Existing System

At present there is no such application is available to remind to the events like time table reminder, examination schedule reminder. Similarly, there is no application available for attendance and mark list maintenance. There are applications available to remind about the functions such as birthday, anniversary day and other events. This application is entirely a new one.

2.2 Proposed System

The proposed system is more specific in nature and has the following objectives

To provide the faculty members as well as the students to keep track of the schedule of examinations, attendance and anything else to be scheduled as per time table. This application provides the facility of creating the database and it automatically keeps track of exam time table, class time table and attendance in a systematic and efficient way.

  This system provides a graphical user friendly interface which is easy and interactive for both the time table reminder and the general event reminder.

 

Page 5: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

3. PROJECT DESCRIPTION

3.1 Module Description

Class Time Table

This module helps to store the time table of staff and students. They can access via their authenticated and authorized login ids and store their schedule of events. It helps to store the number of hours, number of days and time duration of the classes. It alerts time table details of each hour of every day by setting time and date with repeatedly or not repeatedly by which user want.

Exam Time Table

This module helps to store the time table of students. They can access via their authenticated and authorized login ids and store their schedule of events. The staff can also post the exam schedules. It helps to store the exam dates, time duration and session. It will alert exam time table details by setting time and date. The reminder can be set for every hour by using the repetition option.

Attendance System

This module helps to track the attendance of the student with date, present/absent/on-duty details stored in the database.

Mark list

This module is used to store the mark list. The staff and the students create their account in this application to login this account. Using this mark list id only the mark list can be accessed. Otherwise it cannot be accessed. This module provides the facility to store the mark details, grade, and other marks.

Alerted Settings

This module is used to set the type of alert. The types of alerts are ringing alert and vibrate alert

Usage Help

This module helps the user to understand and handle every module of the application with screen shots along with usage tips.

Page 6: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

4. SYSTEM CONFIGURATION

4.1 Hardware Requirements

Device : Android Based tablet device or smart phones.Processor  : 800 MHz Ram   : 512MB

4.2 Software Requirements

Operating System : Android OSFront End : XmlEvent Driven Programming :JavaBack End : SQLite Database

Page 7: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

5. SYSTEM DESIGN

5.1 Dataflow Diagram:

Application Login

Login process

Login DataBase

Invalid Login Valid Login

Exit Main Menus

Class Time Table Exam Time Table Mark ListAttendance

System

Create,Edit,Save,Update

Display Clear Records

Back to Main Menu

Stop

Alerter Settings

Reminder Settings

Usage Help

Screen Shots Of HelpContents

Page 8: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

6. TOOLS AND TECHNOLOGIES

In this section, the tools are described and technology that is used in developing this proposed application.

 Tools: 

1. Eclipse: We used Eclipse for development because; it is a multi-language software development environment comprising a base workspace and an extensible plug-in system for customizing the environment.

2. Microsoft word: Microsoft word is used to write the report.

 B. Technologies:

  Android SDK: It includes a mobile device emulator, a virtual device emulator that runs directly on computer. With the help of this emulator we prototyped, developed and tested our application without having a physical device.

Page 9: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

7. CONCLUSION

This application is mainly for Android-phone users and those people who are busy with their schedules. Event Alerter is an application which helps the user about the registered event reminders on the specified date/time.

 The system is supposed to implement when the user set the reminder or schedule the calendar of events,

The application provides easy and big advantage for the student and the staff community

Page 10: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

8. ANNEXURE

8.1 Source Code:

Admin Module:

package com.example.eventalerter;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import android.content.ContentValues;import android.content.Context;import android.content.DialogInterface;import android.database.Cursor;import android.database.SQLException;import android.database.sqlite.SQLiteDatabase;import android.os.Bundle;import android.text.Editable;import android.text.TextWatcher;import android.view.LayoutInflater;import android.view.Menu;import android.view.MenuItem;import android.view.View;import android.widget.EditText;import android.widget.RadioButton;import android.widget.RadioGroup;import android.widget.Toast;

public class Admin extends Activity{public EditText ufname,uname,pass,cpass,auser,apass;public String fnameval,unameval,passval,cpassval,ruser,dbcreate,aduser,adpass,l="",a,b;public RadioGroup users;public RadioButton utype;SQLiteDatabase db;public int i=0,j=0;int uid;Context context=this;public int flag=0;public Cursor c;@Overrideprotected void onCreate(Bundle savedInstanceState) {// TODO Auto-generated method stubsuper.onCreate(savedInstanceState);setContentView(R.layout.admin);ufname=(EditText) findViewById(R.id.ufname);

Page 11: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

uname=(EditText) findViewById(R.id.txtuname);pass=(EditText) findViewById(R.id.txtpass);cpass=(EditText) findViewById(R.id.txtcpass);users=(RadioGroup) findViewById(R.id.radioGroup1);dbcreate="create table admintable(fname varchar(20),utype varchar(10),uname varchar(20),pass varchar(20));";try{db=openOrCreateDatabase("AdminDB",SQLiteDatabase.CREATE_IF_NECESSARY,null);db.execSQL(dbcreate);

}catch(SQLException e){

}}

@Overridepublic boolean onCreateOptionsMenu(Menu menu) {// TODO Auto-generated method stubsuper.onCreateOptionsMenu(menu);getMenuInflater().inflate(R.menu.admin_submenu, menu);return true;}

@Overridepublic boolean onOptionsItemSelected(MenuItem item) {// TODO Auto-generated method stubswitch(item.getItemId()){case R.id.adminsave:callsave();break;case R.id.editicon:calledit();break;case R.id.deleteicon:calldelete();break;case R.id.displayicon:calldis();break;case R.id.clear:

Page 12: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

callclear();break;case R.id.cancel:callupdate();break;

}return false;}

private void callupdate() {// TODO Auto-generated method stubfnameval=ufname.getText().toString();unameval=uname.getText().toString();passval=pass.getText().toString();cpassval=cpass.getText().toString();uid=users.getCheckedRadioButtonId();utype=(RadioButton) findViewById(uid);ruser=utype.getText().toString();if(fnameval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("User FullName Field Shoud Not Be Empty...! Please Enter Your User FullName.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubufname.requestFocus();}});f.create();f.show();

}else if(unameval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Username Field Shoud Not Be Empty...! Please Enter Your Username.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

Page 13: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubuname.requestFocus();}});f.create();f.show();}else if(passval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Password Field Shoud Not Be Empty...! Please Enter Your Password.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubpass.requestFocus();}});f.create();f.show();

}else if(cpassval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Confirm PassWord Field Shoud Not Be Empty...! Please Enter Your Confirm Password.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubcpass.requestFocus();}});f.create();f.show();}else if(!(passval.equals(cpassval)))

Page 14: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

{AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Password And Confirm Password Fields Are Does Not Match.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(android.content.DialogInterface arg0,int arg1) {// TODO Auto-generated method stubpass.requestFocus();

}});f.create();f.show();

}else if(fnameval.length()>0&&unameval.length()>0&&passval.length()>0&&cpassval.length()>0&&ruser.length()>0&&flag==1){flag=0;ContentValues in=new ContentValues();in.put("fname", fnameval);in.put("utype", ruser);in.put("uname", unameval);in.put("pass", passval);db.update("admintable", in, "uname"+"=?", new String[]{unameval});AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Admin A/C Details Are Sucessfully Updated");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(android.content.DialogInterface f,int arg1) {f.cancel();ufname.setText("");uname.setText("");pass.setText("");cpass.setText("");

Page 15: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

}});AlertDialog d=f.create();d.show();}else if(flag!=1){Toast.makeText(context, "Unpropered Editing Process..Try Again...", Toast.LENGTH_LONG).show();}

}

private void calldelete() {// TODO Auto-generated method stubLayoutInflater con=LayoutInflater.from(context);final View cus=con.inflate(R.layout.custom_adminlog, null);AlertDialog.Builder da=new AlertDialog.Builder(Admin.this);da.setTitle("Delete Admin Details");da.setView(cus);da.setIcon(R.drawable.info);da.setPositiveButton("Delete", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubauser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);aduser=auser.getText().toString();adpass=apass.getText().toString();if(aduser.length()>0&&adpass.length()>0){try{db=openOrCreateDatabase("AdminDB",SQLiteDatabase.OPEN_READONLY,null);

}catch(SQLException e){

}c=db.rawQuery("select * from admintable",null);c.moveToFirst();while(!c.isAfterLast())

Page 16: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

{if(aduser.equals(c.getString(2))&&adpass.equals(c.getString(3))){AlertDialog.Builder de=new AlertDialog.Builder(context);de.setTitle("INFORMATION");de.setMessage("Are You Sure Want To Delete This Admin Accouunt?");de.setIcon(R.drawable.info);de.setPositiveButton("Yes", new DialogInterface.OnClickListener(){

public void onClick(DialogInterface arg0,int arg1) {// TODO Auto-generated method stubdb.delete("admintable", "uname"+"=?", new String[]{aduser});Toast.makeText(context, "Records Sucessfully Deleted..", Toast.LENGTH_LONG).show();Admin.this.finish();

}

});de.setNegativeButton("No", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubarg0.cancel();}});AlertDialog ds=de.create();ds.setCancelable(false);ds.setCanceledOnTouchOutside(false);ds.show();

break;}i=c.getPosition();j=c.getCount();c.moveToNext();}if(i+1==j){Toast.makeText(context, "Invalid Admin Username Or Password..Try Again.. ", Toast.LENGTH_LONG).show();}

}

Page 17: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

}});da.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubarg0.cancel();}});final AlertDialog sh=da.create();sh.setCancelable(false);sh.setCanceledOnTouchOutside(false);sh.show();sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);auser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);auser.addTextChangedListener(new TextWatcher(){

public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stub

Page 18: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

aduser=auser.getText().toString();if(aduser.length()>0){l="1";sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

});apass.addTextChangedListener(new TextWatcher(){

public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}

public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()>0&&l.equals("1")){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(true);}

}

});

Page 19: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

}

private void calldis() {// TODO Auto-generated method stubLayoutInflater con=LayoutInflater.from(context);final View cus=con.inflate(R.layout.custom_adminlog, null);AlertDialog.Builder da=new AlertDialog.Builder(Admin.this);da.setTitle("Display Admin Details");da.setView(cus);da.setIcon(R.drawable.info);da.setPositiveButton("Display", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubauser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);aduser=auser.getText().toString();adpass=apass.getText().toString();if(aduser.length()>0&&adpass.length()>0){try{db=openOrCreateDatabase("AdminDB",SQLiteDatabase.OPEN_READONLY,null);

}catch(SQLException e){

}c=db.rawQuery("select * from admintable",null);c.moveToFirst();while(!c.isAfterLast()){if(aduser.equals(c.getString(2))&&adpass.equals(c.getString(3))){ufname.setText(c.getString(0));uname.setText(c.getString(2));pass.setText(c.getString(3));cpass.setText(c.getString(3));break;}i=c.getPosition();j=c.getCount();c.moveToNext();

Page 20: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

}if(i+1==j){Toast.makeText(context, "Invalid Admin Username Or Password..Try Again.. ", Toast.LENGTH_LONG).show();}

}

}});da.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubarg0.cancel();}});final AlertDialog sh=da.create();sh.setCancelable(false);sh.setCanceledOnTouchOutside(false);sh.show();sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);auser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);auser.addTextChangedListener(new TextWatcher(){

public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){

sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}

public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){

Page 21: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}

public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()>0){l="1";sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}

});

apass.addTextChangedListener(new TextWatcher(){

public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

}

public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();

Page 22: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

if(adpass.length()>0&&l.equals("1")){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(true);}}

});

}

private void calledit() {// TODO Auto-generated method stubflag=1;LayoutInflater con=LayoutInflater.from(context);final View cus=con.inflate(R.layout.custom_adminlog, null);AlertDialog.Builder da=new AlertDialog.Builder(Admin.this);da.setTitle("Edit Admin Details");da.setView(cus);da.setIcon(R.drawable.info);da.setPositiveButton("Display To Edit", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubauser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);aduser=auser.getText().toString();adpass=apass.getText().toString();if(aduser.length()>0&&adpass.length()>0){try{db=openOrCreateDatabase("AdminDB",SQLiteDatabase.OPEN_READONLY,null);

}catch(SQLException e){

}c=db.rawQuery("select * from admintable",null);c.moveToFirst();while(!c.isAfterLast()){if(aduser.equals(c.getString(2))&&adpass.equals(c.getString(3))){

Page 23: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

ufname.setText(c.getString(0));

uname.setText(c.getString(2));pass.setText(c.getString(3));cpass.setText(c.getString(3));break;}i=c.getPosition();j=c.getCount();c.moveToNext();}if(i+1==j){Toast.makeText(context, "Invalid Admin Username Or Password..Try Again.. ", Toast.LENGTH_LONG).show();}

}}});da.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubarg0.cancel();}});final AlertDialog sh=da.create();sh.setCancelable(false);sh.setCanceledOnTouchOutside(false);sh.show();sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);auser=(EditText) cus.findViewById(R.id.txtauser);apass=(EditText) cus.findViewById(R.id.txtapass);auser.addTextChangedListener(new TextWatcher(){

public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()>0){l="1";sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}

Page 24: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

}public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stubaduser=auser.getText().toString();if(aduser.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}});apass.addTextChangedListener(new TextWatcher(){public void afterTextChanged(Editable arg0) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()>0&&l.equals("1")){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(true);}}public void beforeTextChanged(CharSequence arg0, int arg1,int arg2, int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0){sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}public void onTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {// TODO Auto-generated method stubadpass=apass.getText().toString();if(adpass.length()==0&&l.equals("1")){

Page 25: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

sh.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);}}});}private void callclear() {// TODO Auto-generated method stubufname.setText("");uname.setText("");pass.setText("");cpass.setText("");}private void callsave() {// TODO Auto-generated method stubif(flag==1){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Press Update Option Menu Button To Save Editing Details .");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubarg0.cancel();}});f.create();f.show();

}else if(flag!=1){fnameval=ufname.getText().toString();unameval=uname.getText().toString();passval=pass.getText().toString();cpassval=cpass.getText().toString();uid=users.getCheckedRadioButtonId();utype=(RadioButton) findViewById(uid);ruser=utype.getText().toString();if(fnameval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("User FullName Field Shoud Not Be Empty...! Please Enter Your User FullName.");

Page 26: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubufname.requestFocus();}});f.create();f.show();

}else if(unameval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Username Field Shoud Not Be Empty...! Please Enter Your Username.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubuname.requestFocus();}});f.create();f.show();}else if(passval.length()==0){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Password Field Shoud Not Be Empty...! Please Enter Your Password.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubpass.requestFocus();}});f.create();f.show();}else if(cpassval.length()==0)

Page 27: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

{AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Confirm PassWord Field Shoud Not Be Empty...! Please Enter Your Confirm Password.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubcpass.requestFocus();}});f.create();f.show();}else if(!(passval.equals(cpassval))){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("Password And Confirm Password Fields Are Does Not Match.");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {public void onClick(android.content.DialogInterface arg0,int arg1) {// TODO Auto-generated method stubpass.requestFocus();

}});f.create();f.show();}else if(fnameval.length()>0&&unameval.length()>0&&passval.length()>0&&cpassval.length()>0&&ruser.length()>0 ){try{db=openOrCreateDatabase("AdminDB",SQLiteDatabase.OPEN_READONLY,null);}catch(SQLException e){}c=db.rawQuery("select * from admintable",null);c.moveToFirst();

Page 28: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

while(!c.isAfterLast()){if(unameval.equals(c.getString(2))&&passval.equals(c.getString(3))){i=c.getPosition();j=c.getCount();AlertDialog.Builder err=new AlertDialog.Builder(Admin.this);err.setMessage("Your Entered Username Or Password Already Exists.Please Enter New One..");err.setTitle("INFORMATION");err.setIcon(R.drawable.info);err.setPositiveButton("OK", new DialogInterface.OnClickListener() {public void onClick(DialogInterface arg0, int arg1) {// TODO Auto-generated method stubufname.setText("");uname.setText("");pass.setText("");cpass.setText("");}});AlertDialog d=err.create();d.show();break;}else{i=c.getPosition()+1;j=c.getCount();}c.moveToNext();}if(i==j){ContentValues in=new ContentValues();in.put("fname", fnameval);in.put("utype", ruser);in.put("uname", unameval);in.put("pass", passval);if(db.insert("admintable", null, in)!=-1){AlertDialog.Builder f=new AlertDialog.Builder(Admin.this);f.setTitle("INFORMATION");f.setMessage("New User Creation Details Are Sucessfully Saved");f.setIcon(R.drawable.info);f.setPositiveButton("OK", new DialogInterface.OnClickListener() {

Page 29: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

public void onClick(android.content.DialogInterface arg0,int arg1) {// TODO Auto-generated method stubufname.setText("");uname.setText("");pass.setText("");cpass.setText("");Admin.this.finish();}});f.create();f.show();

}}

}}

}

@Overrideprotected void onPause() {// TODO Auto-generated method stubdb.close();c.close();super.onPause();}

@Overrideprotected void onStop() {// TODO Auto-generated method stubsuper.onStop();db.close();c.close();}

}

Page 30: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

8.2 Screen Shots:

Installing Event Alerter Application At First Time:

Create Administrator Account Details:

Page 31: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Admin Option Menu:

Saving Administrator Account Details:

Page 32: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Enter Into Admin Login:

Login Into Event Alerter Application:

Page 33: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Event Alerter-MainMenu:

Page 34: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

 Class Time Table Module:

Create And Manage Class Time Table:

Page 35: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Attendance Module:

Page 36: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Create Student Name List:

Page 37: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,
Page 38: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Alerter Settings:

Select Alert Type:

Page 39: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Select TimeTable:

Create Events:

Page 40: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

Select Event Date&Time:

Page 41: eventalerter.files.wordpress.com · Web viewAs mobile devices become more like PCs, they become the part and parcel of everyone’s life. At present, checkbooks, credit cards, cameras,

9. REFERENCES

 

1. http://developer.android.com/guide/topics/fundamentals.html/ : OL.Google Android Developers, Android Develop Guide.

2. M. Fengsheng Yang, Android Application Development Revelation, China Machine Press, 2010.

3. Pro Android, 3rd ed., Springer Verlag New York , NY, 2009, pp.69-132.4. Reto Meier,Professional Android Development , vol. 2, Wiley Publishing, Inc.,

Indianapolis, Indiana, 2009.5. http://developer.android.com/reference/android/app/AlarmManager.html/AlarmManager

class.6. http://www.vogella.com/android.html/Android Development Tutorial.7. http://developer.android.com/guide/components/index.html/Android Components.8. http://www.vogella.com/articles/AndroidBroadcastReceiver/article.html/:Android

BroadcastReceiver Tutorial