Dinabandhu Andrews Institute of Technology & Management. Affiliated to : Maulana Abul Kalam Azad University of Technology

Size: px
Start display at page:

Download "Dinabandhu Andrews Institute of Technology & Management. Affiliated to : Maulana Abul Kalam Azad University of Technology"

Transcription

1 Dinabandhu Andrews Institute of Technology & Management Affiliated to : Maulana Abul Kalam Azad University of Technology 1

2 STUDENT MANAGEMENT SYSTEM Presented by: Nilotpal Bose Sayantika Roy Subhojit Kundu ( ) ( ) ( ) Soham Tanabeer Arpan Ghosh Spandan Biswas ( ) ( ) ( ) 2

3 Table of Contents Page no. 1. Introduction 4 2. Software Requirements 4 3. Hardware Requirements 6 4. Data flow Diagram 7 5. Screen Shot 8 6. Source Code 9 7. Future Scope Conclusion 71 3

4 Introduction.What is student management System? A Student management system (SMS) is software to manage all day to day operations for a school. They are also called student information systems (SIS), Student information management systems (SIMS), Student records system (SRS). Functionalities of such systems are not the same and this may reflect in the name adopted by users and vendors. Software Requirements 1. Android Studio Android Studio is the official integrated development environment (IDE) for Google's Android operating system, built on Jet Brain's IntelliJ IDEA software and designed specifically for Android development. It is available for download on Windows, macos and Linux based operating systems. It is a replacement for the Eclipse Android Development Tools (ADT) as primary IDE for native Android application development. Android Studio was announced on May 16, 2013 at the Google I/O conference. It was in early access preview stage starting from version 0.1 in May 2013, then entered beta stage starting from version 0.8 which 4

5 was released in June The first stable build was released in December 2014, starting from version 1.0. The current stable version is 3.1 released in March JDK File The Java Development Kit (JDK) is an implementation of either one of the Java Platform, Standard Edition, Java Platform, Enterprise Edition, or Java Platform, Micro Edition platforms released by Oracle Corporation in the form of a binary product aimed at Java developers on Solaris, Linux, macos or Windows. The JDK includes a private JVM and a few other resources to finish the development of a Java Application. Since the introduction of the Java platform, it has been by far the most widely used Software Development Kit (SDK). On 17 November 2006, Sun announced that they would release it under the GNU General Public License (GPL), thus making it free software. This happened in large part on 8 May 2007, when Sun contributed the source code to the OpenJDK. 3. SDK A software development kit (SDK or devkit) is typically a set of software development tools that allows the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar development platform. To enrich applications with advanced functionalities, advertisements, push notifications and more, most app developers implement specific software development kits. Some SDKs are critical for developing a platform-specific app. For example, the development of an Android app on Java platform requires a Java Development Kit, for ios apps the ios SDK, and for Universal Windows Platform the.net Framework SDK. 5

6 There are also SDKs that are installed in apps to provide analytics and data about activity. Prominent examples include Google, InMobi and Facebook. It could be something as simple as the implementation of one or more application programming interfaces (APIs) in the form of ondevice libraries to interface to a particular programming language, or to include sophisticated hardware that can communicate with a particular embedded system. Common tools include debugging facilities and other utilities, often presented in an integrated development environment (IDE). SDKs also frequently include sample code and supporting technical notes or other supporting documentation to help clarify points made by the primary reference material. Hardware Requirements 1. Processor Core 2 Duo 2 nd Gen or higher 2. RAM 3GB or more 3. Hard disk 1 GB or more 6

7 Data flow Diagram Student Profile Profile Creation Attendance Student Management System Cgpa Calculator Subject Notes Create Schedule 7

8 Main Window of the Application 8

9 Source Code AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android=" package="com.majorproject.teacherassistant"> <application android:allowbackup="true" android:supportsrtl="true" <activity android:name=".appbase" <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".profile_activity" android:parentactivityname=".appbase" /> <activity android:name=".student_registartion" android:parentactivityname=".profile_activity" /> <activity android:name=".notecreate" android:parentactivityname=".noteactivity" /> <activity android:name=".attendanceactivity" android:parentactivityname=".appbase" /> <activity android:name=".result_activity" android:parentactivityname=".cgpa_activity" /> <activity android:name=".cgpa_activity" android:parentactivityname=".appbase" /> <activity android:name=".noteactivity" android:parentactivityname=".appbase" /> <activity android:name=".scheduler" android:parentactivityname=".appbase" /> <activity android:name=".make_schedule" android:parentactivityname=".scheduler" /> <activity android:name=".settingsactivity" android:parentactivityname=".appbase" /> <activity 9

10 android:name=".about" android:parentactivityname=".appbase" /> <activity android:name=".edit_student" android:parentactivityname=".appbase"/> </application> </manifest> About.java package com.majorproject.teacherassistant; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.displaymetrics; import android.view.view; import android.view.animation.animation; import android.view.animation.translateanimation; import android.widget.relativelayout; public class About extends AppCompatActivity Animation anim1,anim2; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_about); moveviewtoscreencenter(findviewbyid(r.id.names)); moveicon(findviewbyid(r.id.imageviewabout)); private void moveicon( View view ) int originalpos[] = new int[2]; view.getlocationonscreen(originalpos); anim2 = new TranslateAnimation( 0, 0, 0, originalpos[1]+100 ); anim2.setduration(2000); anim2.setfillafter(true); view.startanimation(anim2); 10

11 private void moveviewtoscreencenter( View view ) RelativeLayout root = (RelativeLayout) findviewbyid( R.id.ctr ); DisplayMetrics dm = new DisplayMetrics(); this.getwindowmanager().getdefaultdisplay().getmetrics(dm); int statusbaroffset = dm.heightpixels - root.getmeasuredheight(); int originalpos[] = new int[2]; view.getlocationonscreen(originalpos); int xdest = dm.widthpixels/2; xdest -= (view.getmeasuredwidth()/2); int ydest = dm.heightpixels/2 - (view.getmeasuredheight()/2) - statusbaroffset; anim1 = new TranslateAnimation( 0, 0, 0, ydest - originalpos[1]+250 ); anim1.setduration(1500); anim1.setfillafter(true); view.startanimation(anim1); AppBase.java package com.majorproject.teacherassistant; import android.app.activity; import android.content.intent; import android.database.cursor; import android.database.sqlite.sqlitedatabase; import android.support.design.widget.floatingactionbutton; import android.support.design.widget.snackbar; import android.support.v7.app.appcompatactivity; import android.os.bundle; 11

12 import android.util.log; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.gridview; import java.util.arraylist; public class AppBase extends AppCompatActivity ArrayList<String> basicfields; gridadapter adapter; public static ArrayList<String> divisions ; GridView gridview; public static databasehandler handler; public static Activity activity; public boolean oncreateoptionsmenu(menu menu) super.oncreateoptionsmenu(menu); MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.mai_menu, menu); return true; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.base_layout); basicfields = new ArrayList<>(); handler = new databasehandler(this); activity = this; 12

13 getsupportactionbar().show(); divisions = new ArrayList(); divisions.add("bca"); divisions.add("mca"); divisions.add("bba"); divisions.add("bhm"); divisions.add("msc CS"); divisions.add("pgdm"); gridview = (GridView)findViewById(R.id.grid); basicfields.add("attendance"); 13

14 basicfields.add("scheduler"); basicfields.add("notes"); basicfields.add("profile"); basicfields.add("cgpa CALCULATOR"); adapter = new gridadapter(this,basicfields); gridview.setadapter(adapter); public void loadsettings(menuitem item) Intent launchintent = new Intent(this,SettingsActivity.class); startactivity(launchintent); public void loadabout(menuitem item) Intent launchintent = new Intent(this,About.class); startactivity(launchintent); package com.majorproject.teacherassistant; AppCompatPreferenceActivity.java import android.content.res.configuration; import android.os.bundle; import android.preference.preferenceactivity; import android.support.annotation.layoutres; import android.support.annotation.nullable; import android.support.v7.app.actionbar; import android.support.v7.app.appcompatdelegate; import android.support.v7.widget.toolbar; import android.view.menuinflater; import android.view.view; import android.view.viewgroup; /** 14

15 * PreferenceActivity which implements and proxies the necessary calls * to be used with AppCompat. */ public abstract class AppCompatPreferenceActivity extends PreferenceActivity private AppCompatDelegate mdelegate; protected void oncreate(bundle savedinstancestate) getdelegate().installviewfactory(); getdelegate().oncreate(savedinstancestate); super.oncreate(savedinstancestate); protected void onpostcreate(bundle savedinstancestate) super.onpostcreate(savedinstancestate); getdelegate().onpostcreate(savedinstancestate); public ActionBar getsupportactionbar() return getdelegate().getsupportactionbar(); public void setsupportactionbar(@nullable Toolbar toolbar) getdelegate().setsupportactionbar(toolbar); public MenuInflater getmenuinflater() return getdelegate().getmenuinflater(); public void setcontentview(@layoutres int layoutresid) 15

16 getdelegate().setcontentview(layoutresid); public void setcontentview(view view) getdelegate().setcontentview(view); public void setcontentview(view view, ViewGroup.LayoutParams params) getdelegate().setcontentview(view, params); public void addcontentview(view view, ViewGroup.LayoutParams params) getdelegate().addcontentview(view, params); protected void onpostresume() super.onpostresume(); getdelegate().onpostresume(); protected void ontitlechanged(charsequence title, int color) super.ontitlechanged(title, color); getdelegate().settitle(title); public void onconfigurationchanged(configuration newconfig) super.onconfigurationchanged(newconfig); getdelegate().onconfigurationchanged(newconfig); 16

17 protected void onstop() super.onstop(); getdelegate().onstop(); protected void ondestroy() super.ondestroy(); getdelegate().ondestroy(); public void invalidateoptionsmenu() getdelegate().invalidateoptionsmenu(); private AppCompatDelegate getdelegate() if (mdelegate == null) mdelegate = AppCompatDelegate.create(this, null); return mdelegate; 17

18 Cgpa_activity.java package com.majorproject.teacherassistant; import android.content.intent; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.view.view; import android.widget.button; import android.widget.edittext; 18

19 import android.widget.textview; import android.widget.toast; public class cgpa_activity extends AppCompatActivity EditText c1,c2,c3,c4,c5,c6; Button b3; float sg1,sg2,sg3,sg4,sg5,sg6,cg; int i=6; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_cgpa); c1=(edittext)findviewbyid(r.id.c1); c2=(edittext)findviewbyid(r.id.c2); c3=(edittext)findviewbyid(r.id.c3); c4=(edittext)findviewbyid(r.id.c4); c5=(edittext)findviewbyid(r.id.c5); c6=(edittext)findviewbyid(r.id.c6); b3=(button)findviewbyid(r.id.b3); // TextView t=(textview)findviewbyid(r.id.tv); // t.setvisibility(view.invisible); b3.setonclicklistener(new View.OnClickListener() public void onclick(view v) sg1=read(c1); sg2=read(c2); sg3=read(c3); sg4=read(c4); sg5=read(c5); sg6=read(c6); 19

20 if(sg1==0) //g1=0; i--; if(sg2==0) //g2=0; i--; if(sg3==0) //g3=0; i--; if(sg4==0) // g4=0; i--; if(sg5==0) //g5=0; i--; if(sg6==0) // g6=0; i--; cg=(sg1+sg2+sg3+sg4+sg5+sg6)/i; if(sg1==0 && sg2==0 && sg3==0 && sg4==0 && sg5==0 && sg6==0) Toast.makeText(getApplicationContext(), "Insufficient Data ", Toast.LENGTH_LONG).show(); else if((sg1>10.0) sg2>10.0 sg3>10.0 sg4>10.0 sg5>10.0 sg6>10.0) Toast.makeText(getApplicationContext(), " Invalid SGPA", Toast.LENGTH_SHORT).show(); else Intent i3=new Intent(getApplicationContext(), Result_activity.class); 20

21 i3.putextra("final_sgpa",cg); i3.putextra("flag", 0); i3.putextra("final_perc", 0); startactivity(i3); ); private float read(edittext c) if(c.gettext().tostring().matches("")) return 0; else return (Float.valueOf(c.getText().toString()).floatValue()); package com.majorproject.teacherassistant; databasehandler.java import android.app.activity; import android.database.cursor; import android.database.sqlite.sqlitedatabase; 21

22 import android.util.log; import android.widget.toast; public class databasehandler SQLiteDatabase database; Activity activity; public databasehandler(activity activity) this.activity = activity; database = activity.openorcreatedatabase("assist", activity.mode_private, null); createtable(); public void createtable() try String qu = "CREATE TABLE IF NOT EXISTS STUDENT(name varchar(1000)," + "cl varchar(100), " + "regno varchar(100) primary key, contact varchar(100),roll integer);"; database.execsql(qu); catch (Exception e) Toast.makeText(activity,"Error Occured for create table",toast.length_long).show(); try String qu = "CREATE TABLE IF NOT EXISTS ATTENDANCE(datex date," + "hour int, " + "register varchar(100),ispresent boolean);"; database.execsql(qu); catch (Exception e) Toast.makeText(activity,"Error Occured for create table",toast.length_long).show(); try 22

23 String qu = "CREATE TABLE IF NOT EXISTS NOTES(title varchar(100) not null," + "body varchar(10000), cls varchar(1000), sub varchar(1000),datex TIMESTAMP default CURRENT_TIMESTAMP);"; database.execsql(qu); catch (Exception e) Toast.makeText(activity,"Error Occured for create table",toast.length_long).show(); try String qu = "CREATE TABLE IF NOT EXISTS SCHEDULE(cl varchar(100),subject varchar(1000)," + "timex time, day_week varchar(100));"; database.execsql(qu); catch (Exception e) Toast.makeText(activity,"Error Occured for create table",toast.length_long).show(); public boolean execaction(string qu) Log.i("databaseHandler", qu); try database.execsql(qu); catch (Exception e) Log.e("databaseHandler", qu); Toast.makeText(activity,"Error Occured for execaction",toast.length_long).show(); return false; return true; Cursor execquery(string qu) 23

24 try return database.rawquery(qu,null); catch (Exception e) Log.e("databaseHandler", qu); // Toast.makeText(activity,"Error Occured for execaction",toast.length_long).show(); return null; package com.majorproject.teacherassistant; Edit_Student.java import android.app.activity; import android.database.cursor; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.log; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.toast; public class Edit_Student extends AppCompatActivity Activity activity = this; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_edit student); Button loadbutton = (Button)findViewById(R.id.loadForEdit); assert loadbutton!= null; loadbutton.setonclicklistener(new View.OnClickListener() 24

25 public void onclick(view v) EditText adm = (EditText)findViewById(R.id.register_); String qu = "SELECT * FROM STUDENT WHERE regno = '" + adm.gettext().tostring().touppercase() + "'"; Cursor cr = AppBase.handler.execQuery(qu); if(cr==null cr.getcount()==0) Toast.makeText(getBaseContext(),"No Such Student",Toast.LENGTH_LONG).show(); else cr.movetofirst(); try EditText name = (EditText) findviewbyid(r.id.edit_name_); EditText roll = (EditText) findviewbyid(r.id.roll_); EditText contact = (EditText) findviewbyid(r.id.contact_); assert name!= null; name.settext(cr.getstring(0)); assert roll!= null; roll.settext(cr.getstring(4)); assert contact!= null; contact.settext(cr.getstring(3)); catch (Exception e) ); Button saveedit = (Button)findViewById(R.id.buttonSAVEEDITS); assert saveedit!= null; saveedit.setonclicklistener(new View.OnClickListener() public void onclick(view v) EditText name = (EditText) findviewbyid(r.id.edit_name_); EditText roll = (EditText) findviewbyid(r.id.roll_); 25

26 EditText contact = (EditText) findviewbyid(r.id.contact_); EditText adm = (EditText)findViewById(R.id.register_); String qu = "UPDATE STUDENT SET name = '" + name.gettext().tostring() + "', " + " roll = " + roll.gettext().tostring() + ", contact = '" + contact.gettext().tostring() + "' " + "WHERE regno = '" + adm.gettext().tostring().touppercase() + "'"; Log.d("Edit_Student", qu); if(appbase.handler.execaction(qu)) Toast.makeText(getBaseContext(),"Edit Saved", Toast.LENGTH_LONG).show(); activity.finish(); else Toast.makeText(getBaseContext(),"Error Occured", Toast.LENGTH_LONG).show(); ); gridadapter.java package com.majorproject.teacherassistant; import android.app.activity; import android.app.alertdialog; import android.app.dialog; import android.app.dialogfragment; import android.app.fragmentmanager; import android.app.notification; import android.app.notificationmanager; import android.app.pendingintent; import android.content.dialoginterface; import android.content.intent; import android.content.sharedpreferences; import android.database.cursor; 26

27 import android.net.uri; import android.os.bundle; import android.preference.preferencemanager; import android.provider.settings; import android.support.v4.app.notificationcompat; import android.util.log; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.view.animation.animation; import android.view.animation.scaleanimation; import android.widget.arrayadapter; import android.widget.baseadapter; import android.widget.datepicker; import android.widget.edittext; import android.widget.imageview; import android.widget.spinner; import android.widget.textview; import android.widget.toast; import java.util.arraylist; import java.util.stringtokenizer; public class gridadapter extends BaseAdapter ArrayList names; public static Activity activity; public gridadapter(activity activity, ArrayList names) this.activity = activity; this.names = names; public int getcount() 27

28 return names.size(); public Object getitem(int position) return names.get(position); public long getitemid(int position) return position; public View getview(int position, View v, ViewGroup parent) if (v == null) LayoutInflater vi = LayoutInflater.from(activity); v = vi.inflate(r.layout.grid_layout, null); TextView textview = (TextView)v.findViewById(R.id.namePlacer); ImageView imageview = (ImageView)v.findViewById(R.id.imageHolder); if(names.get(position).tostring().equals("attendance")) imageview.setimageresource(r.drawable.ic_attendance); v.setonclicklistener(new View.OnClickListener() public void onclick(view v) FragmentManager fm = activity.getfragmentmanager(); createrequest request = new createrequest(); request.show(fm,"select"); ); Animation anim = new ScaleAnimation( 0.95f, 1f, // Start and end values for the X axis scaling 0.95f, 1f, // Start and end values for the Y axis scaling 28

29 Animation.RELATIVE_TO_SELF, 0.5f, // Pivot point of X scaling Animation.RELATIVE_TO_SELF, 0.5f); // Pivot point of Y scaling anim.setfillafter(true); // Needed to keep the result of the animation anim.setduration(2000); anim.setrepeatmode(animation.infinite); anim.setrepeatcount(animation.infinite); imageview.startanimation(anim); else if(names.get(position).tostring().equals("scheduler")) imageview.setimageresource(r.drawable.ic_schedule); v.setonclicklistener(new View.OnClickListener() public void onclick(view v) Intent launchinintent = new Intent(activity, scheduler.class); activity.startactivity(launchinintent); ); Animation anim = new ScaleAnimation( 0.95f, 1f, // Start and end values for the X axis scaling 0.95f, 1f, // Start and end values for the Y axis scaling Animation.RELATIVE_TO_SELF, 0.5f, // Pivot point of X scaling Animation.RELATIVE_TO_SELF, 0.5f); // Pivot point of Y scaling anim.setfillafter(true); // Needed to keep the result of the animation anim.setduration(2000); anim.setrepeatmode(animation.infinite); anim.setrepeatcount(animation.infinite); imageview.startanimation(anim); else if(names.get(position).tostring().equals("notes")) imageview.setimageresource(r.drawable.ic_notes); v.setonclicklistener(new View.OnClickListener() public void onclick(view v) 29

30 Intent launchinintent = new Intent(activity, noteactivity.class); activity.startactivity(launchinintent); ); Animation anim = new ScaleAnimation( 0.95f, 1f, // Start and end values for the X axis scaling 0.95f, 1f, // Start and end values for the Y axis scaling Animation.RELATIVE_TO_SELF, 0.5f, // Pivot point of X scaling Animation.RELATIVE_TO_SELF, 0.5f); // Pivot point of Y scaling anim.setfillafter(true); // Needed to keep the result of the animation anim.setduration(2000); anim.setrepeatmode(animation.infinite); anim.setrepeatcount(animation.infinite); imageview.startanimation(anim); else if(names.get(position).tostring().equals("profile")) imageview.setimageresource(r.drawable.ic_profile); v.setonclicklistener(new View.OnClickListener() public void onclick(view v) Intent launchinintent = new Intent(activity, profile_activity.class); activity.startactivity(launchinintent); ); Animation anim = new ScaleAnimation( 0.95f, 1f, // Start and end values for the X axis scaling 0.95f, 1f, // Start and end values for the Y axis scaling Animation.RELATIVE_TO_SELF, 0.5f, // Pivot point of X scaling Animation.RELATIVE_TO_SELF, 0.5f); // Pivot point of Y scaling anim.setfillafter(true); // Needed to keep the result of the animation anim.setduration(2000); anim.setrepeatmode(animation.infinite); anim.setrepeatcount(animation.infinite); imageview.startanimation(anim); 30

31 else if(names.get(position).tostring().equals("cgpa CALCULATOR")) imageview.setimageresource(r.drawable.ic_cgpa); v.setonclicklistener(new View.OnClickListener() public void onclick(view v) Intent launchinintent = new Intent(activity, cgpa_activity.class); activity.startactivity(launchinintent); ); Animation anim = new ScaleAnimation( 0.95f, 1f, // Start and end values for the X axis scaling 0.95f, 1f, // Start and end values for the Y axis scaling Animation.RELATIVE_TO_SELF, 0.5f, // Pivot point of X scaling Animation.RELATIVE_TO_SELF, 0.5f); // Pivot point of Y scaling anim.setfillafter(true); // Needed to keep the result of the animation anim.setduration(2000); anim.setrepeatmode(animation.infinite); anim.setrepeatcount(animation.infinite); imageview.startanimation(anim); textview.settext(names.get(position).tostring()); return v; public static class createrequest extends DialogFragment public void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); 31

32 public Dialog oncreatedialog(bundle savedinstancestate) AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); // Get the layout inflater LayoutInflater inflater = getactivity().getlayoutinflater(); final View v = inflater.inflate(r.layout.pick_period, null); final DatePicker datepicker = (DatePicker) v.findviewbyid(r.id.datepicker); final EditText hour = (EditText)v.findViewById(R.id.periodID); final Spinner spn = (Spinner) v.findviewbyid(r.id.spinnersubject); String qu = "SELECT DISTINCT sub FROM NOTES"; ArrayList<String> subs = new ArrayList<>(); subs.add("not Specified"); Cursor cr = AppBase.handler.execQuery(qu); if(cr!=null) cr.movetofirst(); while(!cr.isafterlast()) subs.add(cr.getstring(0)); Log.d("gridAdapter.class", "Cached " + cr.getstring(0)); cr.movetonext(); else Log.d("gridAdapter.class", "No SUBS" + cr.getstring(0)); ArrayAdapter<String> adapterspinner = new ArrayAdapter<String>(activity, android.r.layout.simple_spinner_dropdown_item, subs); assert spn!= null; spn.setadapter(adapterspinner); builder.setview(v) // Add action buttons.setpositivebutton("enter", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int id) int day = datepicker.getdayofmonth(); 32

33 int month = datepicker.getmonth() + 1; int year = datepicker.getyear(); String date = year + "-" + month + "-" + day; String subject = spn.getselecteditem().tostring(); String qx = "SELECT title FROM NOTES where sub = '" + subject + "'"; Cursor cr = AppBase.handler.execQuery(qx); String subnames = ""; if(cr!=null) cr.movetofirst(); while(!cr.isafterlast()) subnames += (cr.getstring(0)) + "\n"; cr.movetonext(); makenotification(subnames); Cursor cursor = AppBase.handler.execQuery("SELECT * FROM ATTENDANCE WHERE datex = '" + date +"' AND hour = " + hour.gettext() + ";"); if(cursor==null cursor.getcount()==0) Intent launchinintent = new Intent(AppBase.activity, attendanceactivity.class); launchinintent.putextra("date", date); launchinintent.putextra("period", hour.gettext().tostring()); AppBase.activity.startActivity(launchinIntent); else Toast.makeText(getActivity(),"Period Already Added",Toast.LENGTH_LONG).show(); ).setnegativebutton("cancel", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int id) dialog.dismiss(); ); 33

34 return builder.create(); public static void makenotification(string userintrouble) Log.d("NOTIFICATION","Building..."); Intent notificationintent = new Intent(activity.getApplicationContext(), noteactivity.class); // notificationintent.putextra(mainlistadapter.user_ ,userintrouble); // notificationintent.putextra(mainlistadapter.is_emergency, true); PendingIntent pintent = PendingIntent.getActivity(activity, 0, notificationintent, 0); SharedPreferences sharedprefs = PreferenceManager.getDefaultSharedPreferences(activity.getBaseContext()); Uri ring = Uri.parse(sharedPrefs.getString("Notification_Sound", Settings.System.DEFAULT_RINGTONE_URI.toString())); NotificationCompat.Builder builder = new NotificationCompat.Builder(activity.getBaseContext()).setTicker("Ticker Title").setContentTitle("Notes Are Available For this subject").setsmallicon(r.drawable.ic_notes).setstyle(new NotificationCompat.BigTextStyle().bigText(userIntrouble)).setContentIntent(pIntent).setSound(ring); Notification noti = builder.build(); noti.contentintent = pintent; noti.flags = Notification.FLAG_AUTO_CANCEL; NotificationManager notificationmanager = (NotificationManager) activity.getsystemservice(activity.notification_service); notificationmanager.notify(0, noti); package com.majorproject.teacherassistant; listadapter.java import android.app.activity; import android.util.log; import android.view.layoutinflater; 34

35 import android.view.view; import android.view.viewgroup; import android.widget.baseadapter; import android.widget.checkbox; import android.widget.textview; import java.util.arraylist; public class listadapter extends BaseAdapter ArrayList<String> namelist; ArrayList<String> registers; Activity activity; ArrayList<Boolean> attendancelist; public listadapter(activity activity,arraylist<string> namelist,arraylist<string> reg) this.namelist = namelist; this.activity = activity; this.registers = reg; attendancelist = new ArrayList<>(); for(int i=0; i<namelist.size(); i++) attendancelist.add(new Boolean(true)); public int getcount() return namelist.size(); public Object getitem(int position) return namelist.get(position); 35

36 public long getitemid(int position) return position; public View getview(final int position, View v, ViewGroup parent) if (v == null) LayoutInflater vi = LayoutInflater.from(activity); v = vi.inflate(r.layout.list_ele, null); final int pos = position; TextView textview = (TextView) v.findviewbyid(r.id.attendancename); textview.settext(namelist.get(position)); final CheckBox checkbox = (CheckBox)v.findViewById(R.id.attMarker); checkbox.setonclicklistener(new View.OnClickListener() public void onclick(view v) attendancelist.set(pos,checkbox.ischecked()); Log.d("Attendance", namelist.get(position).tostring() + " is absent " + attendancelist.get(position)); ); return v; public void saveall() for(int i=0; i<namelist.size(); i++) int sts = 1; if(attendancelist.get(i)) sts = 1; else sts = 0; String qu = "INSERT INTO ATTENDANCE VALUES('" +attendanceactivity.time + "',"+ "" + attendanceactivity.period + ","+ 36

37 "'" + registers.get(i) + "',"+ "" + sts + ");"; AppBase.handler.execAction(qu); activity.finish(); make_schedule.java package com.majorproject.teacherassistant; import android.content.intent; import android.support.design.widget.floatingactionbutton; 37

38 import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuinflater; import android.view.view; import android.widget.arrayadapter; import android.widget.button; import android.widget.edittext; import android.widget.spinner; import android.widget.timepicker; import android.widget.toast; import java.util.arraylist; public class make_schedule extends AppCompatActivity Spinner classselect,dayselect; ArrayAdapter adapterspinner, days; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.schedule_create); classselect = (Spinner)findViewById(R.id.classSelector); dayselect = (Spinner)findViewById(R.id.daySelector); adapterspinner = new ArrayAdapter<String>(this, android.r.layout.simple_spinner_dropdown_item, AppBase.divisions); assert classselect!= null; classselect.setadapter(adapterspinner); ArrayList<String> weekdays = new ArrayList<>(); weekdays.add("monday"); weekdays.add("tuesday"); 38

39 weekdays.add("wednesday"); weekdays.add("thursday"); weekdays.add("friday"); weekdays.add("saturday"); weekdays.add("sunday"); days = new ArrayAdapter<String>(this, android.r.layout.simple_spinner_dropdown_item, weekdays); assert classselect!= null; dayselect.setadapter(days); Button btn = (Button)findViewById(R.id.saveBUTTON_SCHEDULE); assert btn!= null; btn.setonclicklistener(new View.OnClickListener() public void onclick(view v) saveschedule(v); ); private void saveschedule(view v) String dayselected = dayselect.getselecteditem().tostring(); String classselected = classselect.getselecteditem().tostring(); EditText edittext = (EditText)findViewById(R.id.subjectName); String subject = edittext.gettext().tostring(); if(subject.length()<2) Toast.makeText(getBaseContext(),"Enter Valid Subject Name",Toast.LENGTH_SHORT).show(); return; TimePicker timepicker = (TimePicker)findViewById(R.id.timePicker); int hour = timepicker.getcurrenthour(); int min = timepicker.getcurrentminute(); 39

40 String sql = "INSERT INTO SCHEDULE VALUES('" + classselected +"'," + "'" + subject + "'," + "'" + hour +":"+min +"'," + "'" + dayselected + "');"; Log.d("Schedule", sql); if(appbase.handler.execaction(sql)) Toast.makeText(getBaseContext(),"Scheduling Done", Toast.LENGTH_LONG).show(); this.finish(); else Toast.makeText(getBaseContext(),"Failed To Schedule", Toast.LENGTH_LONG).show(); noteactivity.java package com.majorproject.teacherassistant; import android.app.activity; import android.app.alertdialog; import android.content.dialoginterface; import android.content.intent; import android.database.cursor; import android.support.design.widget.floatingactionbutton; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.view.view; import android.widget.adapterview; import android.widget.arrayadapter; import android.widget.listview; import android.widget.toast; 40

41 import java.util.arraylist; public class noteactivity extends AppCompatActivity implements ListView.OnItemClickListener,ListView.OnItemLongClickListener ListView listview; ArrayAdapter adapter; ArrayList titles; ArrayList contents; Activity activity =this; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_note); titles = new ArrayList(); contents = new ArrayList(); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fab_note); assert fab!= null; fab.setonclicklistener(new View.OnClickListener() public void onclick(view view) Intent launchintent = new Intent(activity,noteCreate.class); startactivity(launchintent); ); listview = (ListView)findViewById(R.id.noteList); loadnotes(); listview.setonitemclicklistener(this); listview.setonitemlongclicklistener(this); private void loadnotes() 41

42 titles.clear(); contents.clear(); String qu = "SELECT * FROM NOTES"; Cursor cursor = AppBase.handler.execQuery(qu); if(cursor==null cursor.getcount()==0) Toast.makeText(getBaseContext(),"No Notes Found",Toast.LENGTH_LONG).show(); else cursor.movetofirst(); while (!cursor.isafterlast()) titles.add(cursor.getstring(0)); contents.add(cursor.getstring(1)); cursor.movetonext(); adapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,titles); listview.setadapter(adapter); public boolean oncreateoptionsmenu(menu menu) super.oncreateoptionsmenu(menu); MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.note_menu, menu); return true; public void onitemclick(adapterview<?> parent, View view, int position, long id) AlertDialog.Builder alert = new AlertDialog.Builder(activity); alert.settitle(titles.get(position).tostring()); alert.setmessage(contents.get(position).tostring()); alert.setpositivebutton("ok", null); alert.show(); 42

43 public boolean onitemlongclick(adapterview<?> parent, View view, int position, long id) AlertDialog.Builder alert = new AlertDialog.Builder(activity); final String title = titles.get(position).tostring(); final String body = contents.get(position).tostring(); alert.settitle("delete?"); alert.setmessage("do you want to delete this note?"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "DELETE FROM NOTES WHERE TITLE = '" + title + "' AND body = '" + body + "'"; if (AppBase.handler.execAction(qu)) loadnotes(); Toast.makeText(getBaseContext(), "Deleted", Toast.LENGTH_LONG).show(); else loadnotes(); Toast.makeText(getBaseContext(), "Failed", Toast.LENGTH_LONG).show(); dialog.dismiss(); ); alert.setnegativebutton("no",null); alert.show(); return true; public void refreshnote(menuitem item) loadnotes(); 43

44 notecreate.java package com.majorproject.teacherassistant; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.view.view; import android.widget.arrayadapter; 44

45 import android.widget.button; import android.widget.edittext; import android.widget.spinner; import android.widget.toast; public class notecreate extends AppCompatActivity EditText title,body; Spinner spinner; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.note_create); Button btn = (Button)findViewById(R.id.noteSaveButton); assert btn!= null; btn.setonclicklistener(new View.OnClickListener() public void onclick(view v) savedata(); ); spinner = (Spinner)findViewById(R.id.pinSpinner); ArrayAdapter<String> adapterspinner = new ArrayAdapter<String>(this, android.r.layout.simple_spinner_dropdown_item, AppBase.divisions); assert spinner!= null; spinner.setadapter(adapterspinner); private void savedata() title = (EditText)findViewById(R.id.noteTitle); body = (EditText)findViewById(R.id.noteBody); EditText sub = (EditText)findViewById(R.id.subjectNote); String qu = " INSERT INTO NOTES(title,body,cls,sub) VALUES('" + title.gettext().tostring() + "','" + body.gettext().tostring() +"'," + "'" + spinner.getselecteditem().tostring() + "','" + sub.gettext().tostring().touppercase() + "')"; 45

46 if(appbase.handler.execaction(qu)) Toast.makeText(getBaseContext(),"Note Saved",Toast.LENGTH_LONG).show(); this.finish(); profile_activity.java package com.majorproject.teacherassistant; import android.app.activity; 46

47 import android.app.alertdialog; import android.content.dialoginterface; import android.content.intent; import android.database.cursor; import android.support.design.widget.floatingactionbutton; import android.support.design.widget.snackbar; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.view.view; import android.widget.adapterview; import android.widget.button; import android.widget.checkbox; import android.widget.edittext; import android.widget.listview; import android.widget.textview; import android.widget.toast; import java.util.arraylist; public class profile_activity extends AppCompatActivity databasehandler handler = AppBase.handler; Activity profileactivity = this; ListView listview; profile_adapter adapter; ArrayList<String> dates; ArrayList<String> datesalone; ArrayList<Integer> houralone; ArrayList<Boolean> atts; Activity activity =this; private View v; 47

48 protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.stu_profile); dates = new ArrayList<>(); datesalone = new ArrayList<>(); houralone = new ArrayList<>(); atts = new ArrayList<>(); listview = (ListView) findviewbyid(r.id.attendprofileview_list); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fab); assert fab!= null; fab.setonclicklistener(new View.OnClickListener() public void onclick(view view) Intent launchintent = new Intent(profileActivity,Student_Registartion.class); startactivity(launchintent); ); TextView textview = (TextView)findViewById(R.id.profileContentView); assert textview!= null; textview.setonlongclicklistener(new View.OnLongClickListener() public boolean onlongclick(view v) AlertDialog.Builder alert = new AlertDialog.Builder(activity); alert.settitle("delete Student"); alert.setmessage("are you sure?"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) EditText edittext = (EditText) findviewbyid(r.id.edittext); String regno = edittext.gettext().tostring(); 48

49 String qu = "DELETE FROM STUDENT WHERE REGNO = '" + regno.touppercase() + "'"; if (AppBase.handler.execAction(qu)) Log.d("delete", "done from student"); String qa = "DELETE FROM ATTENDANCE WHERE register = '" + regno.touppercase() + "'"; if (AppBase.handler.execAction(qa)) Toast.makeText(getBaseContext(), "Deleted", Toast.LENGTH_LONG).show(); Log.d("delete", "done from attendance"); ); alert.setnegativebutton("no", null); alert.show(); return true; ); Button findbutton = (Button)findViewById(R.id.buttonFind); assert findbutton!= null; findbutton.setonclicklistener(new View.OnClickListener() public void onclick(view v) find(v); ); public void find(view view) dates.clear(); atts.clear(); EditText edittext = (EditText)findViewById(R.id.editText); TextView textview = (TextView)findViewById(R.id.profileContentView); String reg = edittext.gettext().tostring(); String qu = "SELECT * FROM STUDENT WHERE regno = '" + reg.touppercase() + "'"; 49

50 String qc = "SELECT * FROM ATTENDANCE WHERE register = '" + reg.touppercase() + "';"; String qd = "SELECT * FROM ATTENDANCE WHERE register = '" + reg.touppercase() + "' AND ispresent = 1"; Cursor cursor = handler.execquery(qu); //Start Count Here float att = 0f; Cursor cur = handler.execquery(qc); Cursor cur1 = handler.execquery(qd); if(cur==null) Log.d("profile","cur null"); if(cur1==null) Log.d("profile","cur1 null"); if(cur!=null&&cur1!=null) cur.movetofirst(); cur1.movetofirst(); try att = ((float) cur1.getcount()/cur.getcount())*100; if(att<=0) att = 0f; Log.d("profile_activity","Total = " + cur.getcount() + " avail = "+cur1.getcount() + " per " + att); catch (Exception e)att = -1; if(cursor==null cursor.getcount()==0) assert textview!= null; textview.settext("no Data Available"); else 50

51 String attendance = ""; if(att<0) attendance = "Attendance Not Available"; else attendance = " Attendance " + att + " %"; cursor.movetofirst(); String buffer = ""; buffer += " " + cursor.getstring(0) + "\n"; buffer += " " + cursor.getstring(1)+ "\n"; buffer += " " + cursor.getstring(2)+ "\n"; buffer += " " + cursor.getstring(3)+ "\n"; buffer += " " + cursor.getint(4)+ "\n"; buffer += " " + attendance+ "\n"; textview.settext(buffer); String q = "SELECT * FROM ATTENDANCE WHERE register = '" + edittext.gettext().tostring().touppercase() + "'"; Cursor cursorx = handler.execquery(q); if(cursorx==null cursorx.getcount()==0) Toast.makeText(getBaseContext(),"No Attendance Info Available",Toast.LENGTH_LONG).show(); else cursorx.movetofirst(); while(!cursorx.isafterlast()) datesalone.add(cursorx.getstring(0)); houralone.add(cursorx.getint(1)); dates.add(cursorx.getstring(0) + ":" + cursorx.getint(1) + "th Hour"); if(cursorx.getint(3)==1) atts.add(true); else Log.d("profile",cursorx.getString(0) + " -> " + cursorx.getint(3)); atts.add(false); 51

52 cursorx.movetonext(); adapter = new profile_adapter(dates,atts,profileactivity,datesalone,houralone,edittext.gettext().tostring().touppercase()); listview.setadapter(adapter); public boolean oncreateoptionsmenu(menu menu) super.oncreateoptionsmenu(menu); MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.profile_menu, menu); return true; public void editstudent(menuitem item) Intent launchintent = new Intent(this,Edit_Student.class); startactivity(launchintent); package com.majorproject.teacherassistant; profile_adapter.java import android.app.activity; import android.app.alertdialog; import android.content.dialoginterface; import android.util.log; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.adapterview; import android.widget.baseadapter; import android.widget.checkbox; 52

53 import android.widget.textview; import android.widget.toast; import java.util.arraylist; public class profile_adapter extends BaseAdapter ArrayList<String> dates; ArrayList<Boolean> present; Activity activity; String uname; public profile_adapter(arraylist<string> dates,arraylist<boolean> present, Activity activity, ArrayList<String> datesalone,arraylist<integer> houralone, String re) this.dates = dates; this.present = present; this.activity = activity; this.datesalone = datesalone; this.houralone = houralone; uname = re; ArrayList<String> datesalone; ArrayList<Integer> houralone; public int getcount() return dates.size(); public Object getitem(int position) return dates.get(position); 53

54 public long getitemid(int position) return position; public View getview(final int position, View v, ViewGroup parent) if (v == null) LayoutInflater vi = LayoutInflater.from(activity); v = vi.inflate(r.layout.list_ele, null); final int pos = position; TextView textview = (TextView) v.findviewbyid(r.id.attendancename); textview.settext(dates.get(position)); CheckBox checkbox = (CheckBox)v.findViewById(R.id.attMarker); checkbox.setclickable(false); Log.d("Profile", present.get(position) + ""); checkbox.setchecked(present.get(position)); textview.setonlongclicklistener(new View.OnLongClickListener() public boolean onlongclick(final View v) AlertDialog.Builder alert = new AlertDialog.Builder(activity); alert.settitle("alter Student Attendance"); alert.setmessage("are you sure?"); alert.setpositivebutton("present", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "UPDATE ATTENDANCE SET ISPRESENT = " " WHERE " + " register = '" + uname + "' AND datex = '" + datesalone.get(position) + "'" + " AND hour = " + houralone.get(position) ; if (AppBase.handler.execAction(qu)) Toast.makeText(activity,"Done",Toast.LENGTH_LONG).show(); 54

55 Log.d("profile", qu); ); alert.setnegativebutton("absent", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "UPDATE ATTENDANCE SET ISPRESENT = " " WHERE " + " register = '" + uname + "' AND datex = '" + datesalone.get(position) + "'" + " AND hour = " + houralone.get(position) ; if (AppBase.handler.execAction(qu)) Toast.makeText(activity,"Done",Toast.LENGTH_LONG).show(); Log.d("profile", qu); ); alert.show(); return true; ); return v; package com.majorproject.teacherassistant; Result_activity.java import android.os.bundle; import android.os.dropboxmanager; import android.support.v7.app.appcompatactivity; import android.view.view; import android.widget.edittext; import android.widget.textview; import android.widget.toast; 55

56 import java.math.bigdecimal; import java.math.roundingmode; public class Result_activity extends AppCompatActivity protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_result_activity); EditText sgpa, percentage; sgpa = (EditText) findviewbyid(r.id.sgpa); percentage = (EditText) findviewbyid(r.id.percentage); TextView t = (TextView) findviewbyid(r.id.t); TextView t1 = (TextView) findviewbyid(r.id.t3); try Bundle b = getintent().getextras(); float final_sgpa = b.getfloat("final_sgpa"); int flag = b.getint("flag"); float final_perc = b.getfloat("final_perc"); if (flag == 0) t.settext("your CGPA is "); percentage.setvisibility(view.invisible); t1.setvisibility(view.invisible); BigDecimal bd = new BigDecimal(final_sgpa).setScale(2, RoundingMode.HALF_EVEN); final_sgpa = bd.floatvalue(); 56

57 BigDecimal bd1 = new BigDecimal(final_perc).setScale(2, RoundingMode.HALF_EVEN); final_perc = bd1.floatvalue(); sgpa.settext(string.valueof(final_sgpa)); percentage.settext(string.valueof(final_perc + "%")); catch (Exception e) Toast.makeText(getBaseContext(),"Exception Occured",Toast.LENGTH_LONG).show(); scheduler.java package com.majorproject.teacherassistant; import android.app.activity; import android.app.alertdialog; import android.content.contenturis; import android.content.dialoginterface; import android.content.intent; import android.database.cursor; import android.support.design.widget.floatingactionbutton; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.menu; import android.view.menuinflater; import android.view.menuitem; import android.view.view; import android.widget.adapterview; import android.widget.arrayadapter; import android.widget.listview; 57

58 import android.widget.toast; import java.util.arraylist; public class scheduler extends AppCompatActivity implements AdapterView.OnItemLongClickListener ListView listview; ArrayAdapter adapter; ArrayList<String> subs; ArrayList<String> subx; ArrayList<String> times; Activity activity = this; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_scheduler); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fab_sch); assert fab!= null; fab.setonclicklistener(new View.OnClickListener() public void onclick(view view) Intent launchintent = new Intent(getBaseContext(), make_schedule.class); startactivity(launchintent); ); subs = new ArrayList<>(); times = new ArrayList<>(); subx = new ArrayList<>(); listview = (ListView)findViewById(R.id.schedulerList); loadschedules(); listview.setonitemlongclicklistener(this); 58

59 private void loadschedules() subs.clear(); times.clear(); String qu = "SELECT * FROM SCHEDULE ORDER BY subject"; Cursor cursor = AppBase.handler.execQuery(qu); if(cursor==null cursor.getcount()==0) Toast.makeText(getBaseContext(),"No Schedules Available",Toast.LENGTH_LONG).show(); else cursor.movetofirst(); while(!cursor.isafterlast()) subx.add(cursor.getstring(1)); subs.add(cursor.getstring(1) + "\nfor " + cursor.getstring(0) + "\nat " + cursor.getstring(2) + " : " + cursor.getstring(3)); times.add(cursor.getstring(2)); cursor.movetonext(); ArrayAdapter adapter = new ArrayAdapter(getBaseContext(),android.R.layout.simple_list_item_1,subs); listview.setadapter(adapter); public boolean onitemlongclick(adapterview<?> parent, View view, final int position, long id) AlertDialog.Builder alert = new AlertDialog.Builder(activity); alert.settitle("delete Schedule?"); alert.setmessage("do you want to delete this schedule?"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "DELETE FROM SCHEDULE WHERE subject = '" + subx.get(position) + "' AND timex = '" + times.get(position) + "'"; if (AppBase.handler.execAction(qu)) 59

60 Toast.makeText(getBaseContext(), "Deleted", Toast.LENGTH_LONG).show(); loadschedules(); else Toast.makeText(getBaseContext(), "Failed", Toast.LENGTH_LONG).show(); loadschedules(); dialog.dismiss(); ); alert.setnegativebutton("no", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) dialog.dismiss(); ); alert.show(); return true; public void refresh(menuitem item) loadschedules(); public boolean oncreateoptionsmenu(menu menu) super.oncreateoptionsmenu(menu); MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.scheduler_menu, menu); return true; package com.majorproject.teacherassistant; SettingsActivity.java 60

61 import android.annotation.targetapi; import android.app.activity; import android.app.alertdialog; import android.content.context; import android.content.dialoginterface; import android.content.intent; import android.content.res.configuration; import android.graphics.drawable.colordrawable; import android.media.ringtone; import android.media.ringtonemanager; import android.net.uri; import android.os.build; import android.os.bundle; import android.preference.listpreference; import android.preference.preference; import android.preference.preferenceactivity; import android.support.v7.app.actionbar; import android.preference.preferencefragment; import android.preference.preferencemanager; import android.preference.ringtonepreference; import android.text.textutils; import android.view.menuitem; import android.widget.toast; import java.util.list; public class SettingsActivity extends AppCompatPreferenceActivity Activity base = this; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setupactionbar(); addpreferencesfromresource(r.xml.pref_general); 61

62 Preference mypref = findpreference("clear_schedule"); mypref.setonpreferenceclicklistener(new Preference.OnPreferenceClickListener() public boolean onpreferenceclick(preference preference) final AlertDialog.Builder alert = new AlertDialog.Builder(base); alert.settitle("are you sure?"); alert.setmessage("this will wipe your entire scheduling data"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "DROP TABLE SCHEDULE"; if (AppBase.handler.execAction(qu)) Toast.makeText(getBaseContext(), "Done", Toast.LENGTH_LONG).show(); AppBase.handler.createTable(); dialog.dismiss(); ); alert.setnegativebutton("no", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) dialog.dismiss(); return; ); alert.show(); return true; ); mypref = findpreference("clear_attendance"); mypref.setonpreferenceclicklistener(new Preference.OnPreferenceClickListener() public boolean onpreferenceclick(preference preference) final AlertDialog.Builder alert = new AlertDialog.Builder(base); alert.settitle("are you sure?"); alert.setmessage("this will wipe your entire attendance data"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() 62

63 public void onclick(dialoginterface dialog, int which) String qu = "DROP TABLE ATTENDANCE"; if(appbase.handler.execaction(qu)) Toast.makeText(getBaseContext(),"Done",Toast.LENGTH_LONG).show(); AppBase.handler.createTable(); dialog.dismiss(); ); alert.setnegativebutton("no", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) dialog.dismiss(); return; ); alert.show(); return true; ); mypref = findpreference("clear_notes"); mypref.setonpreferenceclicklistener(new Preference.OnPreferenceClickListener() public boolean onpreferenceclick(preference preference) final AlertDialog.Builder alert = new AlertDialog.Builder(base); alert.settitle("are you sure?"); alert.setmessage("this will wipe your entire Notes data"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "DROP TABLE NOTES"; if(appbase.handler.execaction(qu)) 63

64 Toast.makeText(getBaseContext(),"Done",Toast.LENGTH_LONG).show(); AppBase.handler.createTable(); dialog.dismiss(); ); alert.setnegativebutton("no", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) dialog.dismiss(); return; ); alert.show(); return true; ); mypref = findpreference("clear_student"); mypref.setonpreferenceclicklistener(new Preference.OnPreferenceClickListener() public boolean onpreferenceclick(preference preference) final AlertDialog.Builder alert = new AlertDialog.Builder(base); alert.settitle("are you sure?"); alert.setmessage("this will wipe your entire Student data"); alert.setpositivebutton("yes", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) String qu = "DROP TABLE STUDENT"; if(appbase.handler.execaction(qu)) Toast.makeText(getBaseContext(),"Done",Toast.LENGTH_LONG).show(); AppBase.handler.createTable(); dialog.dismiss(); 64

65 ); alert.setnegativebutton("no", new DialogInterface.OnClickListener() public void onclick(dialoginterface dialog, int which) dialog.dismiss(); return; ); alert.show(); return true; ); private void setupactionbar() ActionBar actionbar = getsupportactionbar(); if (actionbar!= null) actionbar.setdisplayhomeasupenabled(true); public boolean onoptionsitemselected(menuitem item) switch (item.getitemid()) case android.r.id.home: this.finish(); return true; return super.onoptionsitemselected(item); package com.majorproject.teacherassistant; Student_Registration.java import android.app.activity; import android.app.alertdialog; 65

66 import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.util.log; import android.view.view; import android.widget.arrayadapter; import android.widget.button; import android.widget.edittext; import android.widget.spinner; import android.widget.toast; import java.util.arraylist; public class Student_Registartion extends AppCompatActivity Activity activity = this; Spinner spinner; protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.activity_student registartion); spinner = (Spinner) findviewbyid(r.id.spinner); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.r.layout.simple_spinner_dropdown_item, AppBase.divisions); spinner.setadapter(adapter); Button btn = (Button) findviewbyid(r.id.buttonsave); assert btn!= null; btn.setonclicklistener(new View.OnClickListener() public void onclick(view v) savetodatabase(v); ); 66

67 public void savetodatabase(view view) EditText name = (EditText)findViewById(R.id.edit_name); EditText roll = (EditText)findViewById(R.id.roll); EditText register = (EditText)findViewById(R.id.register); EditText contact = (EditText)findViewById(R.id.contact); String classselected = spinner.getselecteditem().tostring(); if(name.gettext().length()<2 roll.gettext().length()==0 register.gettext().length()<2 contact.gettext().length()<2 classselected.length()<2) AlertDialog.Builder alert = new AlertDialog.Builder(activity); alert.settitle("invalid"); alert.setmessage("insufficient Data"); alert.setpositivebutton("ok", null); alert.show(); return; String qu = "INSERT INTO STUDENT VALUES('" +name.gettext().tostring()+ "'," + "'" + classselected +"',"+ "'" + register.gettext().tostring().touppercase() +"',"+ "'" + contact.gettext().tostring() +"',"+ "" + Integer.parseInt(roll.getText().toString()) +");"; Log.d("Student Reg", qu); AppBase.handler.execAction(qu); qu = "SELECT * FROM STUDENT WHERE regno = '" + register.gettext().tostring() + "';"; Log.d("Student Reg", qu); if(appbase.handler.execquery(qu)!=null) Toast.makeText(getBaseContext(),"Student Added", Toast.LENGTH_LONG).show(); this.finish(); 67

68 attendanceactivity.java package com.majorproject.teacherassistant; import android.app.activity; import android.app.notification; import android.app.notificationmanager; import android.app.pendingintent; import android.content.context; import android.content.intent; import android.database.cursor; import android.support.v4.app.notificationcompat; 68

@Bind(R.id.input_ ) EditText EditText Button _loginbutton;

@Bind(R.id.input_ ) EditText EditText Button _loginbutton; package cyborg.pantaucctv; import android.app.progressdialog; import android.content.intent; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.util.log; import android.view.view;

More information

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android.

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. - A dialog is a small window that prompts the user to make a decision or enter additional information. - A dialog does

More information

Practical 1.ListView example

Practical 1.ListView example Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml

More information

MAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

MAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MAD ASSIGNMENT NO 3 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MainActivity.java File package com.example.tutorialspoint; import android.manifest;

More information

MyDatabaseHelper. public static final String TABLE_NAME = "tbl_bio";

MyDatabaseHelper. public static final String TABLE_NAME = tbl_bio; Page 1 of 5 MyDatabaseHelper import android.content.context; import android.database.sqlite.sqliteopenhelper; class MyDatabaseHelper extends SQLiteOpenHelper { private static final String DB_NAME = "friend_db";

More information

Tabel mysql. Kode di PHP. Config.php. Service.php

Tabel mysql. Kode di PHP. Config.php. Service.php Tabel mysql Kode di PHP Config.php Service.php Layout Kode di Main Activity package com.example.mini.webandroid; import android.app.progressdialog; import android.os.asynctask; import android.support.v7.app.appcompatactivity;

More information

POCKET STUDY. Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar

POCKET STUDY. Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar POCKET STUDY Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar 1 Under Graduate Student, Department of Computer Science and Engineering, SRM University, Chennai, India 2 Under Graduate

More information

1. Simple List. 1.1 Simple List using simple_list_item_1

1. Simple List. 1.1 Simple List using simple_list_item_1 1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist

More information

Fragment Example Create the following files and test the application on emulator or device.

Fragment Example Create the following files and test the application on emulator or device. Fragment Example Create the following files and test the application on emulator or device. File: AndroidManifest.xml

More information

Android Programs Day 5

Android Programs Day 5 Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()

More information

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { } Android ActionBar import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { Layout, activity.xml

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon

More information

B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam;

B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam; B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam; import java.util.arraylist; import android.app.activity; import android.app.alertdialog;

More information

Basic GUI elements - exercises

Basic GUI elements - exercises Basic GUI elements - exercises https://developer.android.com/studio/index.html LIVE DEMO Please create a simple application, which will be used to calculate the area of basic geometric figures. To add

More information

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia;

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia; LISTING CODE A-1 Indo_to_jawa_Fragments.java package studio.arti.kamusjawaindonesia; import android.content.dialoginterface; import android.database.cursor; import android.database.sqlite.sqlitedatabase;

More information

TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION

TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION BISHAL MANDAL REGISTRATION NO: 151170510014 of 2015-2016

More information

Mobile Programming Lecture 7. Dialogs, Menus, and SharedPreferences

Mobile Programming Lecture 7. Dialogs, Menus, and SharedPreferences Mobile Programming Lecture 7 Dialogs, Menus, and SharedPreferences Agenda Dialogs Menus SharedPreferences Android Application Components 1. Activity 2. Broadcast Receiver 3. Content Provider 4. Service

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2 Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

Android Coding. Dr. J.P.E. Hodgson. August 23, Dr. J.P.E. Hodgson () Android Coding August 23, / 27

Android Coding. Dr. J.P.E. Hodgson. August 23, Dr. J.P.E. Hodgson () Android Coding August 23, / 27 Android Coding Dr. J.P.E. Hodgson August 23, 2010 Dr. J.P.E. Hodgson () Android Coding August 23, 2010 1 / 27 Outline Starting a Project 1 Starting a Project 2 Making Buttons Dr. J.P.E. Hodgson () Android

More information

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Tip: Switching UIs THE PROBLEM How to switch from one UI to another Each UI is associated with a distinct class that controls it Solution shown: two UIs,

More information

EMBEDDED SYSTEMS PROGRAMMING Application Basics

EMBEDDED SYSTEMS PROGRAMMING Application Basics EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Basics APPLICATIONS Application components (e.g., UI elements) are objects instantiated from the platform s frameworks Applications are event driven ( there

More information

PROGRAMMING APPLICATIONS DECLARATIVE GUIS

PROGRAMMING APPLICATIONS DECLARATIVE GUIS PROGRAMMING APPLICATIONS DECLARATIVE GUIS DIVING RIGHT IN Eclipse? Plugin deprecated :-( Making a new project This keeps things simple or clone or clone or clone or clone or clone or clone Try it

More information

MAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

MAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MAD ASSIGNMENT NO 2 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. Android Widgets There are given a lot of android widgets with simplified

More information

Android SQLite Database Tutorial - CRUD Operations

Android SQLite Database Tutorial - CRUD Operations Android SQLite Database Tutorial - CRUD Operations by Kapil - Monday, March 21, 2016 http://www.androidtutorialpoint.com/storage/android-sqlite-database-tutorial/ YouTube Video Android SQLite Introduction

More information

CSE 660 Lab 7. Submitted by: Arumugam Thendramil Pavai. 1)Simple Remote Calculator. Server is created using ServerSocket class of java. Server.

CSE 660 Lab 7. Submitted by: Arumugam Thendramil Pavai. 1)Simple Remote Calculator. Server is created using ServerSocket class of java. Server. CSE 660 Lab 7 Submitted by: Arumugam Thendramil Pavai 1)Simple Remote Calculator Server is created using ServerSocket class of java Server.java import java.io.ioexception; import java.net.serversocket;

More information

Android/Java Lightning Tutorial JULY 30, 2018

Android/Java Lightning Tutorial JULY 30, 2018 Android/Java Lightning Tutorial JULY 30, 2018 Java Android uses java as primary language Resource : https://github.mit.edu/6178-2017/lec1 Online Tutorial : https://docs.oracle.com/javase/tutorial/java/nutsandbolts/inde

More information

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015 Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional

More information

Lampiran Program : Res - Layout Activity_main.xml

More information

Android CardView Tutorial

Android CardView Tutorial Android CardView Tutorial by Kapil - Wednesday, April 13, 2016 http://www.androidtutorialpoint.com/material-design/android-cardview-tutorial/ YouTube Video We have already discussed about RecyclerView

More information

Android Application Model I

Android Application Model I Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath Reading: Big Nerd Ranch Guide, Chapters 3, 5 (Activities);

More information

Mobile Software Development for Android - I397

Mobile Software Development for Android - I397 1 Mobile Software Development for Android - I397 IT COLLEGE, ANDRES KÄVER, 2015-2016 EMAIL: AKAVER@ITCOLLEGE.EE WEB: HTTP://ENOS.ITCOLLEGE.EE/~AKAVER/2015-2016/DISTANCE/ANDROID SKYPE: AKAVER Timetable

More information

ListView Containers. Resources. Creating a ListView

ListView Containers. Resources. Creating a ListView ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a

More information

Press project on the left toolbar if it doesn t show an overview of the app yet.

Press project on the left toolbar if it doesn t show an overview of the app yet. #3 Setting up the permissions needed to allow the app to use GPS. Okay! Press project on the left toolbar if it doesn t show an overview of the app yet. In this project plane, we will navigate to the manifests

More information

Android Workshop: Model View Controller ( MVC):

Android Workshop: Model View Controller ( MVC): Android Workshop: Android Details: Android is framework that provides java programmers the ability to control different aspects of smart devices. This interaction happens through the Android SDK (Software

More information

ANDROID PROGRAMS DAY 3

ANDROID PROGRAMS DAY 3 ANDROID PROGRAMS DAY 3 //Android project to navigate from first page to second page using Intent Step 1: Create a new project Step 2: Enter necessary details while creating project. Step 3: Drag and drop

More information

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator. Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New

More information

Manifest.xml. Activity.java

Manifest.xml. Activity.java Dr.K.Somasundaram Ph.D Professor Department of Computer Science and Applications Gandhigram Rural Institute, Gandhigram, Tamil Nadu-624302, India ka.somasundaram@gmail.com Manifest.xml

More information

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath 1 Framework Support (e.g. Android) 2 Framework Capabilities

More information

Mobile and Ubiquitous Computing: Android Programming (part 3)

Mobile and Ubiquitous Computing: Android Programming (part 3) Mobile and Ubiquitous Computing: Android Programming (part 3) Master studies, Winter 2015/2016 Dr Veljko Pejović Veljko.Pejovic@fri.uni-lj.si Based on Programming Handheld Systems, Adam Porter, University

More information

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Diving into Android. By Jeroen Tietema. Jeroen Tietema, Diving into Android By Jeroen Tietema Jeroen Tietema, 2015 1 Requirements 4 Android SDK 1 4 Android Studio (or your IDE / editor of choice) 4 Emulator (Genymotion) or a real device. 1 See https://developer.android.com

More information

South Africa Version Control.

South Africa Version Control. South Africa 2013 Lecture 7: User Interface (Navigation)+ Version Control http://aiti.mit.edu South Africa 2013 Today s agenda Recap Navigation Version Control 2 Tutorial Recap Activity 1 Activity 2 Text

More information

Mobila applikationer och trådlösa nät, HI1033, HT2013

Mobila applikationer och trådlösa nät, HI1033, HT2013 Mobila applikationer och trådlösa nät, HI1033, HT2013 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android

More information

public AnimLayer(Context context, AttributeSet attrs, int defstyle) { super(context, attrs, defstyle); initlayer(); }

public AnimLayer(Context context, AttributeSet attrs, int defstyle) { super(context, attrs, defstyle); initlayer(); } AnimLayer.java package com.kyindo.game; import java.util.arraylist; import java.util.list; import android.content.context; import android.util.attributeset; import android.view.view; import android.view.animation.animation;

More information

1 카메라 1.1 제어절차 1.2 관련주요메서드 1.3 제작철차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다.

1 카메라 1.1 제어절차 1.2 관련주요메서드 1.3 제작철차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다. 1 카메라 1.1 제어절차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다. 1.2 관련주요메서드 setpreviewdisplay() : startpreview() : stoppreview(); onpicturetaken() : 사진을찍을때자동으로호출되며캡처한이미지가전달됨 1.3 제작철차 Step 1 프로젝트를생성한후매니페스트에퍼미션들을설정한다.

More information

Workshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking

Workshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking Workshop 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking 2. Create Intent with Parsing Data (Page 3 8) Making Phone Call and Dial Access Web Content Playing YouTube Video 3. Create

More information

Android Layout Types

Android Layout Types Android Layout Types Android Linear Layout Android LinearLayout is a view group that aligns all children in either vertically or horizontally. android:divider - This is drawable to use as a vertical divider

More information

LifeStreet Media Android Publisher SDK Integration Guide

LifeStreet Media Android Publisher SDK Integration Guide LifeStreet Media Android Publisher SDK Integration Guide Version 1.12.0 Copyright 2015 Lifestreet Corporation Contents Introduction... 3 Downloading the SDK... 3 Choose type of SDK... 3 Adding the LSM

More information

Database Development In Android Applications

Database Development In Android Applications ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Database Development In Android Applications 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran

More information

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based.

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based. 1 COS 470 - MOBILE DEVELOPMENT INTRODUCTION 2 WHAT IS ANDROID Linux-based Java/Kotlin Android Runtime (ART) System Apps SMS, Calendar, etc. Platform Architecture 3 CORE OS Linux (64 bit) Each app is a

More information

Android Application Development. By : Shibaji Debnath

Android Application Development. By : Shibaji Debnath Android Application Development By : Shibaji Debnath About Me I have over 10 years experience in IT Industry. I have started my career as Java Software Developer. I worked in various multinational company.

More information

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Saving State THE PROBLEM How to save the state (of a UI, for instance) so that it survives even when the application is closed/killed The state should

More information

Intents. Your first app assignment

Intents. Your first app assignment Intents Your first app assignment We will make this. Decidedly lackluster. Java Code Java Code XML XML Preview XML Java Code Java Code XML Buttons that work

More information

ITU- FAO- DOA- TRCSL. Training on. Innovation & Application Development for E- Agriculture. Shared Preferences

ITU- FAO- DOA- TRCSL. Training on. Innovation & Application Development for E- Agriculture. Shared Preferences ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Shared Preferences 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran Tanveer, ITU Experts

More information

Introduction. Who Should Read This Book. Key Topics That This Book Covers

Introduction. Who Should Read This Book. Key Topics That This Book Covers Introduction Android is Google s open source and free Java-based platform for mobile development. Tablets are getting more popular every day. They are gadgets that fall between smartphones and personal

More information

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Overview MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Lecture: MVC Model View Controller What is an App? Android Activity Lifecycle Android Debugging Fixing Rotations & Landscape Layouts Localization

More information

Mobila applikationer och trådlösa nät, HI1033, HT2012

Mobila applikationer och trådlösa nät, HI1033, HT2012 Mobila applikationer och trådlösa nät, HI1033, HT2012 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming University of Babylon College of Information Technology Department of Information Networks Mobile Fundamentals and Programming Lecture 7: Data Persistence : shared preferences Lecturer : Ali Kadhim Al-Bermani

More information

Android Dialogs. Dialogs are simple visual objects that pop up and display a message or prompt for some user input.

Android Dialogs. Dialogs are simple visual objects that pop up and display a message or prompt for some user input. Android Dialogs Dialogs are simple visual objects that pop up and display a message or prompt for some user input. Create a new Android project with a suitable name and package. To begin with it will have

More information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should

More information

INTRODUCTION TO ANDROID

INTRODUCTION TO ANDROID INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android

More information

M.A.D Assignment # 1

M.A.D Assignment # 1 Submitted by: Rehan Asghar Roll no: BSSE (7) 15126 M.A.D Assignment # 1 Submitted to: Sir Waqas Asghar Submitted by: M. Rehan Asghar 4/25/17 Roll no: BSSE 7 15126 XML Code: Calculator Android App

More information

Android - JSON Parser Tutorial

Android - JSON Parser Tutorial Android - JSON Parser Tutorial JSON stands for JavaScript Object Notation.It is an independent data exchange format and is the best alternative for XML. This chapter explains how to parse the JSON file

More information

Real-Time Embedded Systems

Real-Time Embedded Systems Real-Time Embedded Systems DT8025, Fall 2016 http://goo.gl/azfc9l Lecture 8 Masoumeh Taromirad m.taromirad@hh.se Center for Research on Embedded Systems School of Information Technology 1 / 51 Smart phones

More information

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9)

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics ArrayAdapter Preferences Widgets Jonathan Diehl, Hendrik Thüs 2 ArrayAdapter Jonathan Diehl, Hendrik Thüs

More information

Learn about Android Content Providers and SQLite

Learn about Android Content Providers and SQLite Tampa Bay Android Developers Group Learn about Android Content Providers and SQLite Scott A. Thisse March 20, 2012 Learn about Android Content Providers and SQLite What are they? How are they defined?

More information

FRAGMENTS.

FRAGMENTS. Fragments 69 FRAGMENTS In the previous section you learned what an activity is and how to use it. In a small-screen device (such as a smartphone), an activity typically fi lls the entire screen, displaying

More information

Debojyoti Jana (Roll ) Rajrupa Ghosh (Roll ) Sreya Sengupta (Roll )

Debojyoti Jana (Roll ) Rajrupa Ghosh (Roll ) Sreya Sengupta (Roll ) DINABANDHU ANDREWS INSTITUTE OF TECHNOLOGY AND MANAGEMENT (Affiliated to West Bengal University of Technology also known as Maulana Abul Kalam Azad University Of Technology) Project report on ANDROID QUIZ

More information

Android Beginners Workshop

Android Beginners Workshop Android Beginners Workshop at the M O B IL E M O N D AY m 2 d 2 D E V E L O P E R D A Y February, 23 th 2010 Sven Woltmann, AndroidPIT Sven Woltmann Studied Computer Science at the TU Ilmenau, 1994-1999

More information

LAMPIRAN PROGRAM. public class Listdata_adiktif extends ArrayAdapter<ModelData_adiktif> {

LAMPIRAN PROGRAM. public class Listdata_adiktif extends ArrayAdapter<ModelData_adiktif> { 1 LAMPIRAN PROGRAM JAVA Listdata_adiktif.java package com.example.win.api.adapter; import android.content.context; import android.support.annotation.nonnull; import android.view.layoutinflater; import

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

Android Gym Application Utilizing Near Field Communications (NFC) CM0343

Android Gym Application Utilizing Near Field Communications (NFC) CM0343 2013 Android Gym Application Utilizing Near Field Communications (NFC) CM0343 FULL CODE APPENDIX BRETT STEVENS Supervisor Kirill Sidorov Moderator Christine Mumford 1 Contents Appendices... 2 AddExerciseActivity...

More information

Java & Android. Java Fundamentals. Madis Pink 2016 Tartu

Java & Android. Java Fundamentals. Madis Pink 2016 Tartu Java & Android Java Fundamentals Madis Pink 2016 Tartu 1 Agenda» Brief background intro to Android» Android app basics:» Activities & Intents» Resources» GUI» Tools 2 Android» A Linux-based Operating System»

More information

Notification mechanism

Notification mechanism Notification mechanism Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University. Portions of this page are reproduced from work created

More information

Computer Science E-76 Building Mobile Applications

Computer Science E-76 Building Mobile Applications Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 1 http://developer.android.com Android SDK and NDK

More information

EMBEDDED SYSTEMS PROGRAMMING Android NDK

EMBEDDED SYSTEMS PROGRAMMING Android NDK EMBEDDED SYSTEMS PROGRAMMING 2014-15 Android NDK WHAT IS THE NDK? The Android NDK is a set of cross-compilers, scripts and libraries that allows to embed native code into Android applications Native code

More information

Java Training Center - Android Application Development

Java Training Center - Android Application Development Java Training Center - Android Application Development Android Syllabus and Course Content (3 months, 2 hour Daily) Introduction to Android Android and it's feature Android releases and Versions Introduction

More information

Arrays of Buttons. Inside Android

Arrays of Buttons. Inside Android Arrays of Buttons Inside Android The Complete Code Listing. Be careful about cutting and pasting.

More information

Data Persistence. Chapter 10

Data Persistence. Chapter 10 Chapter 10 Data Persistence When applications create or capture data from user inputs, those data will only be available during the lifetime of the application. You only have access to that data as long

More information

Mobile Application Development

Mobile Application Development Mobile Application Development donation-web api { method: 'GET', path: '/api/candidates', config: CandidatesApi.find, { method: 'GET', path: '/api/candidates/{id', config: CandidatesApi.findOne, { method:

More information

... 1... 2... 2... 3... 3... 4... 4... 5... 5... 6... 6... 7... 8... 9... 10... 13... 14... 17 1 2 3 4 file.txt.exe file.txt file.jpg.exe file.mp3.exe 5 6 0x00 0xFF try { in.skip(9058); catch (IOException

More information

External Services. CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion

External Services. CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion External Services CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion 1 External Services Viewing websites Location- and map-based functionality

More information

Embedded Systems Programming - PA8001

Embedded Systems Programming - PA8001 Embedded Systems Programming - PA8001 http://goo.gl/ydeczu Lecture 8 Mohammad Mousavi m.r.mousavi@hh.se Center for Research on Embedded Systems School of Information Science, Computer and Electrical Engineering

More information

SMART VEHICLE TRACKING APPLICATION

SMART VEHICLE TRACKING APPLICATION SMART VEHICLE TRACKING APPLICATION Report submitted for the partial fulfillment of the requirements for the degree of Bachelor of Technology in Information Technology Submitted by Ritaman Baral (IT2014/008)

More information

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] s@lm@n Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] Android AND-401 : Practice Test Question No : 1 Which of the following is required to allow the Android

More information

Our First Android Application

Our First Android Application Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,

More information

Appendix A : Android Studio Code For Android

Appendix A : Android Studio Code For Android Appendix A : Android Studio Code For Android Monitoring : ` public Pubnub pubnub; public static final String PUBLISH_KEY = "pub-c-798bd0f6-540b-48af-9e98-7d0028a5132a"; public static final String SUBSCRIBE_KEY

More information

APPENDIX. Application Store Admin. build.gradle. app/build.gradle

APPENDIX. Application Store Admin. build.gradle. app/build.gradle Application Store Admin build.gradle APPENDIX // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() dependencies { classpath

More information

Create Parent Activity and pass its information to Child Activity using Intents.

Create Parent Activity and pass its information to Child Activity using Intents. Create Parent Activity and pass its information to Child Activity using Intents. /* MainActivity.java */ package com.example.first; import android.os.bundle; import android.app.activity; import android.view.menu;

More information

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1 Action Bar Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1) App Icon 3) Action Buttons 2)View Control 4) Action Overflows

More information

<uses-permission android:name="android.permission.internet"/>

<uses-permission android:name=android.permission.internet/> Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework

More information

API Guide for Gesture Recognition Engine. Version 2.0

API Guide for Gesture Recognition Engine. Version 2.0 API Guide for Gesture Recognition Engine Version 2.0 Table of Contents Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket Library... 4 Project

More information

Android Hide Title Bar Example. Android Screen Orientation Example

Android Hide Title Bar Example. Android Screen Orientation Example igap Technologies 1 if(!activitycompat.shouldshowrequestpermissionrationale(this, Manifest.permission.READ_CONTACTS)) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_CONTACTS,

More information

By The Name of Allah. The Islamic University of Gaza Faculty of Engineering Computer Department Final Exam. Mobile Computing

By The Name of Allah. The Islamic University of Gaza Faculty of Engineering Computer Department Final Exam. Mobile Computing By The Name of Allah The Islamic University of Gaza Faculty of Engineering Computer Department Final Exam Dr. Aiman Ahmed Abu Samra Eng. Nour El-Deen I. Jaber Student Name ID Mark Exam Duration \ 1:30

More information

5Displaying Pictures and Menus with Views

5Displaying Pictures and Menus with Views 5Displaying Pictures and Menus with Views WHAT YOU WILL LEARN IN THIS CHAPTER How to use the Gallery, ImageSwitcher, GridView, and ImageView views to display images How to display options menus and context

More information