




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























rd
S. No Date Experiment Name Pg. No.
1. College Phone Book Android Application 3 – 6 2. Donors and Receivers Android Application 7 – 10 3. Android enabled Home Automation System (via Bluetooth)
4. Theft Detector – Alarm System Android Application 15 – 17 5. Mobile Theft Monitoring Android Application^ 18 – 20 6. Search Your Doctor Android Application 21 – 23 7. Alumni Portal App Mobile Application 24 – 26 8. Vehicle tracking using driver mobile GPS tracking 27 – 29 9. Student-Faculty document sharing android project^ 30 – 32 10. Android tourist guide project 33 – 35
LAB-2:
LABORATORY TASK: Donors and Receivers Android Application
package com.example.phonesmsapp; import android.os.Bundle; import android.view.View; import android.widget.*; import androidx.appcompat.app.AppCompatActivity; public class PhoneBookActivity extends AppCompatActivity { EditText name, phone; TextView result; Spinner spinner; String[] data = {"Select Type", "Donor", "Receiver"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_phone_book); name = findViewById(R.id.name); phone = findViewById(R.id.phone); result = findViewById(R.id.result); spinner = findViewById(R.id.spinner); ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, data); spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView parent, View view, int position, long id) { if(position != 0) { result.setText("Selected: " + data[position]); } } @Override public void onNothingSelected(AdapterView parent) {} }); } public void save(View v){ String n = name.getText().toString(); String p = phone.getText().toString(); result.setText("Saved: " + n + " - " + p); } }
LAB-3:
LABORATORY TASK: Android enabled Home Automation System (via Bluetooth)
package com.example.phonesmsapp; import android.os.Bundle; import android.view.View; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; public class PhoneBookActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_phone_book); } public void onLight(View v){ Toast.makeText(this, "Light ON", Toast.LENGTH_SHORT).show(); } public void offLight(View v){ Toast.makeText(this, "Light OFF", Toast.LENGTH_SHORT).show(); } }