Intership Report Aditya
Intership Report Aditya
June 2022
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 I
Android App Development Using Android Studio
DECLARATION
I hereby declare that this project work is an authentic record of my own work done
under the supervision of my mentor Mr. Darshan Chauhan at 214, Golden Square,
NR.D-Mart, Mota - Varachha, Surat and Internal Guide Mrs. Avani N. Patel,
Assistant Professor, Computer Engineering Department, VIEAT, Anita, Kim. This
project work is only meant for submission to the Computer Engineering
department, Vidhyadeep Institute of Engineering and Technology, as the
requirement of 2-week industrial training. All the data used in calculations is
correct to best of my knowledge and observed practically at the site
Aditya Pandit
(190940107006)
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 II
Android App Development Using Android Studio
CERTIFICATE
This is to certify that project work embodied in this report entitled “Android App
Development Using Android Studio” has been carried out by Pathan Aditya
Pandit (190940107006) at “Infinite Developers, at 303, Atlanta Mall, Mota -
Varachha, Surat” for Bachelors of Engineering at Vidhyadeep Institute of
Engineering & Technology, Kim (094)affiliated by Gujarat Technological
University. This Internship project work has been carried out under my supervision
and to the satisfaction of department. The student work has been accepted for
publication.
Date:
Place:
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 IV
Android App Development Using Android Studio
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 V
Android App Development Using Android Studio
ACKNOWLEDGEMENT
I would also like to thank Mr. BhavikBhai Jinjala, at 303, Atlanta Mall, Mota -
Varachha, Surat for giving me the opportunity to work on the prestigious project.
The internship opportunity I had with Infinite Developers was a great chance for
learning and professional development. Therefore, I consider myself as a very
lucky individual as I was provide with an opportunity to be a part of it
I would like to thank Mr. Tejas Rana Head of the Computer Engineering
Department, for his valuable advice and providing necessary facilities for our
project work.
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 VI
Android App Development Using Android Studio
EXECUTIVE SUMMARY
COMPANY PROJECTS
App Development
Website Development
Software Development
Digital Marketing
Search Engine Optimization
Uiux Design
Graphics Design
E-Commerce Development
Accounting And ERP Solutions
Game Development
TABLE OF CONTENTS
Title Page No.
Title page I
Declaration II
Certificate III
Joining letter IV
Completion Certificate V
Acknowledgement VI
CONTENTS
Chapter:5 Opportunities 42
5.1 What roles you served? 43
5.2 What work you carried out? 43
5.3 What contribution you made to company? 43
Chapter:6 Learning 44
Chapter:8 References 48
Chapter:9 Conclusion 50
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 X
Android App Development Using Android Studio
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 XI
Android App Development Using Android Studio
Introduction of Internship
1.1 General Introduction of Internship
An internship is a period of work experience offered by an organization for a
limited period of time. The Internship Programs aim to provide our students
the opportunity to consolidate their theoretical foundation through practical
experience. The students can explore their interest in future career
development.
1.2 Justification of internship
An objective for this position should emphasize the skills you already
possess in the area and your interest in learning more Some internship is used
to allow individuals to perform scientific research while others are
specifically designed to allow people to gain first-hand experience working.
1.3 Aim of the study
Internship utilized in a number of different career fields, like engineering,
medical field, economics, advertising and many more which is good for the
students to gain first-hand experience working.
1.4 Objective of the study
This is Summer Internship 2022(B.E. 7th Semester) report which defines my
achievement, work in field of web development and my professional growth
during this 15th days period of time.
1.5 Scope of the study
This internship report gives an experience of a professional work and the
challenging task that is faced by me in Durvasa Infotech which is very good
for me and it is encourage me. As well as it also provides a brief description
of Durvasa Infotech for the students who are interested about Durvasa
Infotech for their professional growth.
1.6 Need of the study
Internship is a way to build the work experience, professional behavior at
the corporate world. It is also helpful for develop the technical as well as
non-technical skills that can be emphasized in the resume for future jobs. It is
also helpful for the fresher’s or developers to improve chance of the higher
position.
Features of Android
Android is a powerful open-source operating system that open-source provides
immense features and some of these are listed below.
Android Versions
Google first publicly announced Android in November 2007 but was released on
23 SEPTEMBER 2008 to be exact. The first device to bring Android into the
market was the HTC Dream with the version Android 1.0. Since then, Google
released a lot of android versions such as Apple Pie, Banana Bread, Cupcake,
Donut, Éclair, Froyo, Gingerbread, Jellybeans, Kitkat, Lollipop, marshmallow,
Nougat, Oreo, etc. with extra functionalities and new features.
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 XV
Android App Development Using Android Studio
Weekly progresses
3.1 List of Activities involved
E
21/06/2022 Research On Selected Project(Reminder App).
E
22/06/2022 Create The Main Screen (activity_main.xml) and MainActivity.java to add
K functionality.
24/06/2022 Start Working on activity_reminder.xml to add Task and Also Start Working On
ReminderActivity.java
25/06/2022 Done Workink On ReminderActivity .java And activity_reminder .xml and Start
working on AlarmBrodcast.java
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XVIII
Android App Development Using Android Studio
E
28/06/2022 dbManager.java and notification layout is done and start working on
E notificationmessage.java .
02/07/2022 Adding the Feature to remove the list on long click by RecyclerViewInterface and
my Adapter.
Code templates and GitHub integration to help you build common app features and
import sample code
Extensive testing tools and frameworks
Lint tools to catch performance, usability, version compatibility, and other
problems
C++ and NDK support
Built-in support for Google Cloud Platform, making it easy to integrate Google
Cloud Messaging and App Engine
Project structure
Each project in Android Studio contains one or more modules with source code
files and resource files. Types of modules include:
Android app modules
Library modules
Google App Engine modules
By default, Android Studio displays your project files in the Android project view,
as shown in figure 1. This view is organized by modules to provide quick access to
your project's key source files.
All the build files are visible at the top level under Gradle Scripts and each app
module contains the following folders:
manifests: Contains the AndroidManifest.xml file.
java: Contains the Java source code files, including JUnit test code.
res: Contains all non-code resources, such as XML layouts, UI strings, and bitmap
images.
Project Selection
After the Introction of the Android Studio , It was the Time to select the project so
I visit couple of site related android project and choose couple of projects and
make the list and ask the instructor for advise and choose the “Reminder App.”
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 XX
Android App Development Using Android Studio
You should design a home screen with a list of reminders and a screen to take user
input about his reminders. Below you can find a clear explanation of how the flow
of the application should be:
RecyclerView:
In Android, RecyclerView is a sophisticated and versatile version of ListView and
GridView. It’s used for displaying plenty of knowledge sets that may be scrolled
expeditiously by maintaining a restricted variety of views.
SQLite Database:
SQLite information is an ASCII text file electronic database. It allows you to
perform the CRUD operations such as Create, Read, Update and delete.
Alarm Manager:
Android AlarmManager permits you to access the system alarm. With the
assistance of AlarmManager, you’ll be able to schedule your tasks.
Notification Manager:
Notification Manager helps to place notifications into the status bar of your device.
The user can expand the notification by going to the notification tray of your
device
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@color/cardview_dark_background"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/teal_700"
android:title="Reminders"
android:titleTextColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/create_reminder"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:layout_marginEnd="30dp"
android:layout_marginBottom="50dp"
android:src="@drawable/plus_icon" />
</RelativeLayout>
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXIII
Android App Development Using Android Studio
MainActivity.java
package com.reminder.reminder;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
FloatingActionButton mCreateRem;
RecyclerView mRecyclerview;
ArrayList<Model> dataholder = new ArrayList<Model>();
myAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@Override
public void onBackPressed() {
finish();
super.onBackPressed();
Output:
splash_activity.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".splashActivity">
<View
android:id="@+id/view"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_marginBottom="60dp"
android:background="@drawable/add_alert"
android:backgroundTintMode="add"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Reminder App"
android:textSize="30sp"
android:textColor="@color/cardview_dark_background"
app:layout_constraintTop_toBottomOf="@+id/view"
android:layout_marginTop="12dp"
android:gravity="center"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Splash_Activity.java
package com.reminder.reminder;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import com.reminder.reminder.MainActivity;
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXVI
Android App Development Using Android Studio
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
int secondsDelayed = 1;
new Handler().postDelayed(new Runnable() {
public void run() {
startActivity(new Intent(getApplicationContext(),
MainActivity.class));
finish();
}
}, secondsDelayed * 500);
}
}
Output:
activity_reminder.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@color/cardview_dark_background"
android:layout_height="match_parent"
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXVII
Android App Development Using Android Studio
android:gravity="center"
android:orientation="vertical"
app:backgroundTint="@null"
tools:context=".ReminderActivity">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:cardCornerRadius="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cardview_dark_background"
android:orientation="vertical"
app:backgroundTint="@null">
<TextView
android:layout_width="380dp"
android:layout_height="wrap_content"
android:text="Add Reminder Here..."
android:textSize="30dp"
android:textColor="@color/cardview_light_background"
android:background="@color/teal_700"
android:backgroundTintMode="add"
android:textStyle="bold"
android:layout_margin="10dp"/>
<EditText
android:id="@+id/editTitle"
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_margin="10dp"
android:textColor="@color/cardview_light_background"
android:hint="Enter The Task" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btnDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="0.5"
android:text="date" />
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXVIII
Android App Development Using Android Studio
<Button
android:id="@+id/btnTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="0.5"
android:text="time" />
</LinearLayout>
<Button
android:id="@+id/btnSbumit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Save" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
ReminderActivity.java
package com.reminder.reminder;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlarmManager;
import android.app.DatePickerDialog;
import android.app.PendingIntent;
import android.app.TimePickerDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;
import android.widget.Toast;
import com.reminder.reminder.AlarmBrodcast;
import com.reminder.reminder.MainActivity;
import com.reminder.reminder.dbManager;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXIX
Android App Development Using Android Studio
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reminder);
mTimebtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
selectTime();
}
});
mDatebtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
selectDate();
}
});
mSubmitbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String title = mTitledit.getText().toString().trim();
String date = mDatebtn.getText().toString().trim();
String time = mTimebtn.getText().toString().trim();
if (title.isEmpty()) {
Toast.makeText(getApplicationContext(), "Please Enter
text", Toast.LENGTH_SHORT).show();
} else {
if (time.equals("time") || date.equals("date")) {
Toast.makeText(getApplicationContext(), "Please
select date and time", Toast.LENGTH_SHORT).show();
} else {
processinsert(title, date, time);
}
}
}
});
}
String time;
time = "";
String formattedMinute;
if (minute / 10 == 0) {
formattedMinute = "0" + minute;
} else {
formattedMinute = "" + minute;
}
if (hour == 0) {
time = "12" + ":" + formattedMinute + " AM";
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXI
Android App Development Using Android Studio
return time;
}
PendingIntent pendingIntent =
PendingIntent.getBroadcast(getApplicationContext(), 0, intent,
PendingIntent.FLAG_ONE_SHOT);
String dateandtime = date + " " + timeTonotify;
DateFormat formatter = new SimpleDateFormat("d-M-yyyy hh:mm");
try {
Date date1 = formatter.parse(dateandtime);
am.set(AlarmManager.RTC_WAKEUP, date1.getTime(), pendingIntent);
Toast.makeText(getApplicationContext(), "Alaram",
Toast.LENGTH_SHORT).show();
} catch (ParseException e) {
e.printStackTrace();
}
}
}
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXII
Android App Development Using Android Studio
Output:
AlarmBrodcast.java
package com.reminder.reminder;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.widget.RemoteViews;
import androidx.core.app.NotificationCompat;
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXIII
Android App Development Using Android Studio
}
}
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXIV
Android App Development Using Android Studio
dbManager.java
package com.reminder.reminder;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
String query = "create table tbl_reminder(id integer primary key
autoincrement,title text,date text,time text)";
sqLiteDatabase.execSQL(query);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
if (result == -1) {
return "Failed";
} else {
return "Successfully inserted";
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXV
Android App Development Using Android Studio
}
/* public int deletereminder(int id){
SQLiteDatabase database = getWritableDatabase();
return database.delete("tbl_reminder","id=?",new
String[]{String.valueOf(id)});
}*/
notificationmessage.java
package com.reminder.reminder;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notification_message);
mflashButton =(Button) findViewById(R.id.flashButton);
textView = findViewById(R.id.tv_message);
Bundle bundle = getIntent().getExtras();
textView.setText(bundle.getString("message"));
mflashButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getApplicationContext(), "Reminder Is
Disable!!", Toast.LENGTH_SHORT).show();
}
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXVI
Android App Development Using Android Studio
});
}
}
model.java
package com.reminder.reminder;
public Model() {
}
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXVII
Android App Development Using Android Studio
myAdapter.java
package com.reminder.reminder;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.database.sqlite.SQLiteDatabase;
import android.provider.CalendarContract;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
@NonNull
@Override
public myviewholder onCreateViewHolder(@NonNull ViewGroup parent, int
viewType) {
View view =
LayoutInflater.from(parent.getContext()).inflate(R.layout.single_reminder_fil
e, parent, false);
return new myviewholder(view);
}
@Override
public void onBindViewHolder(@NonNull myviewholder holder,
@SuppressLint("RecyclerView") int position) {
holder.mTitle.setText(dataholder.get(position).getTitle());
holder.mDate.setText(dataholder.get(position).getDate());
holder.mTime.setText(dataholder.get(position).getTime());
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXVIII
Android App Development Using Android Studio
/*holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(view.getContext(), "Click " ,
Toast.LENGTH_SHORT).show();
}
});*/
holder.itemView.setOnLongClickListener(new View.OnLongClickListener()
{
@Override
public boolean onLongClick(View view) {
/* AlertDialog.Builder builder = new
AlertDialog.Builder(context)
.setTitle("Remove Task")
.setMessage("Are you sure you want to remove ?")
.setCancelable(false)
.setIcon(R.drawable.ic_baseline_delete_24)
.setPositiveButton("Yes", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
dbManager dbManager = new dbManager(context);
int result =
dbManager.deletereminder(holder.itemView.getId());
if(result>0){*/
dataholder.remove(position);
notifyItemRemoved(position);
Toast.makeText(view.getContext(), "Removed!! " ,
Toast.LENGTH_SHORT).show();
/*}
else {
Toast.makeText(view.getContext(), "Failed
to Removed!! At Position" + position, Toast.LENGTH_SHORT).show();
}
}
})
.setNegativeButton("No", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
}
});
builder.show();*/
return true;
}
});
}
@Override
public int getItemCount() {
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XXXIX
Android App Development Using Android Studio
return dataholder.size();
}
}
}
/* public myviewholder linkAdapter(myAdapter adapter){
this.adapter = adapter;
return linkAdapter(this);
}*/
}
Single_reminder_file.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:cardCornerRadius="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:textSize="20dp"
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 XL
Android App Development Using Android Studio
android:textStyle="bold" />
<TextView
android:id="@+id/txtDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Date"
android:textSize="20dp"
android:textStyle="italic" />
<TextView
android:id="@+id/txtTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:textSize="20dp"
android:textStyle="italic" />
</LinearLayout>
</androidx.cardview.widget.CardView>
Output:
Notification_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:backgroundTintMode="add"
android:layout_width="fill_parent"
android:layout_height="64dp"
android:padding="10dp">
<Button
android:id="@+id/flashButton"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="Disable" />
<ImageView
android:id="@+id/icon"
android:layout_width="60dp"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="-10dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/white"
android:src="@drawable/ic_baseline_add_alert_24" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/icon"
android:backgroundTintMode="add">
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:backgroundTintMode="add"
android:layout_marginLeft="20dp"
android:text="Flashlight"
android:textColor="@color/cardview_light_background"
android:textSize="13sp" />
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/message"
android:layout_alignParentLeft="true"
android:layout_marginTop="3dp"
android:layout_marginLeft="20dp"
android:text="90% Charging"
android:textColor="@color/cardview_light_background"
android:textSize="13sp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
Output:
02/07/2022 (Day 12) Adding the Feature to remove the list on long click by
RecyclerViewInterface and my Adapter.
RecyclerViewInterface.java
package com.reminder.reminder;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.database.sqlite.SQLiteDatabase;
import android.provider.CalendarContract;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
@NonNull
@Override
public myviewholder onCreateViewHolder(@NonNull ViewGroup parent, int
viewType) {
View view =
LayoutInflater.from(parent.getContext()).inflate(R.layout.single_reminder_fil
e, parent, false);
return new myviewholder(view);
}
@Override
public void onBindViewHolder(@NonNull myviewholder holder,
@SuppressLint("RecyclerView") int position) {
holder.mTitle.setText(dataholder.get(position).getTitle());
holder.mDate.setText(dataholder.get(position).getDate());
holder.mTime.setText(dataholder.get(position).getTime());
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XLIV
Android App Development Using Android Studio
/*holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(view.getContext(), "Click " ,
Toast.LENGTH_SHORT).show();
}
});*/
holder.itemView.setOnLongClickListener(new View.OnLongClickListener()
{
@Override
public boolean onLongClick(View view) {
/* AlertDialog.Builder builder = new
AlertDialog.Builder(context)
.setTitle("Remove Task")
.setMessage("Are you sure you want to remove ?")
.setCancelable(false)
.setIcon(R.drawable.ic_baseline_delete_24)
.setPositiveButton("Yes", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
dbManager dbManager = new dbManager(context);
int result =
dbManager.deletereminder(holder.itemView.getId());
if(result>0){*/
dataholder.remove(position);
notifyItemRemoved(position);
Toast.makeText(view.getContext(), "Removed!! " ,
Toast.LENGTH_SHORT).show();
/*}
else {
Toast.makeText(view.getContext(), "Failed
to Removed!! At Position" + position, Toast.LENGTH_SHORT).show();
}
}
})
.setNegativeButton("No", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
}
});
builder.show();*/
return true;
}
});
}
@Override
public int getItemCount() {
return dataholder.size();
}
}
/* public myviewholder linkAdapter(myAdapter adapter){
this.adapter = adapter;
return linkAdapter(this);
}*/
}
myAdapter.java
package com.reminder.reminder;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.database.sqlite.SQLiteDatabase;
import android.provider.CalendarContract;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XLVI
Android App Development Using Android Studio
this.context = context;
}
@NonNull
@Override
public myviewholder onCreateViewHolder(@NonNull ViewGroup parent, int
viewType) {
View view =
LayoutInflater.from(parent.getContext()).inflate(R.layout.single_reminder_fil
e, parent, false);
return new myviewholder(view);
}
@Override
public void onBindViewHolder(@NonNull myviewholder holder,
@SuppressLint("RecyclerView") int position) {
holder.mTitle.setText(dataholder.get(position).getTitle());
holder.mDate.setText(dataholder.get(position).getDate());
holder.mTime.setText(dataholder.get(position).getTime());
/*holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(view.getContext(), "Click " ,
Toast.LENGTH_SHORT).show();
}
});*/
holder.itemView.setOnLongClickListener(new View.OnLongClickListener()
{
@Override
public boolean onLongClick(View view) {
/* AlertDialog.Builder builder = new
AlertDialog.Builder(context)
.setTitle("Remove Task")
.setMessage("Are you sure you want to remove ?")
.setCancelable(false)
.setIcon(R.drawable.ic_baseline_delete_24)
.setPositiveButton("Yes", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
dbManager dbManager = new dbManager(context);
int result =
dbManager.deletereminder(holder.itemView.getId());
if(result>0){*/
dataholder.remove(position);
notifyItemRemoved(position);
Toast.makeText(view.getContext(), "Removed!! " ,
Toast.LENGTH_SHORT).show();
/*}
else {
Toast.makeText(view.getContext(), "Failed
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XLVII
Android App Development Using Android Studio
}
})
.setNegativeButton("No", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
}
});
builder.show();*/
return true;
}
});
}
@Override
public int getItemCount() {
return dataholder.size();
}
}
}
/* public myviewholder linkAdapter(myAdapter adapter){
this.adapter = adapter;
return linkAdapter(this);
}*/
}
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
XLVIII
Android App Development Using Android Studio
Output:
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 L
Android App Development Using Android Studio
Case study
4.1 Description and process
https://www.simplilearn.com/tutorials/sql-tutorial/what-is-sqlite#what_is_sqlite
Sqlite Database
What Is SQLite?
History of SQLite
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 LI
Android App Development Using Android Studio
AlarmManager
public class AlarmManager
extends Object
This class provides access to the system alarm services. These
allow you to schedule your application to be run at some point
in the future. When an alarm goes off, the Intent that had been
registered for it is broadcast by the system, automatically
starting the target application if it is not already running.
Registered alarms are retained while the device is asleep (and
can optionally wake the device up if they go off during that
time), but will be cleared if it is turned off and rebooted.
NotificationManager
public class NotificationManager
extends Object
Class to notify the user of events that happen. This is how you tell the
user that something has happened in the background.
Notifications can take different forms:
o A persistent icon that goes in the status bar and is accessible
through the launcher, (when the user selects it, a designated
Intent can be launched),
o Turning on or flashing LEDs on the device, or
o Alerting the user by flashing the backlight, playing a sound, or
vibrating.
Each of the notify methods takes an int id parameter and optionally
a String tag parameter, which may be null. These parameters are used
to form a pair (tag, id), or (null, id) if tag is unspecified. This pair
identifies this notification from your app to the system, so that pair
should be unique within your app. If you call one of the notify
methods with a (tag, id) pair that is currently active and a new set of
notification parameters, it will be updated. For example, if you pass a
new status bar icon, the old icon in the status bar will be replaced with
the new one. This is also the same tag and id you pass to
the cancel(int) or cancel(java.lang.String, int) method to clear this
notification.
Chapter: 5 Opportunities
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 LV
Android App Development Using Android Studio
Opportunities
5.1 What roles you served?
Duration of the 2-weeks of the internship is not a proper time period of web
development project, due to this duration I have only follows the instruction and
performed the task which is given by the supervisor.
I carried out the knowledge of the java, sqlite, alarm manager and notification
manager and how to use them in Application Development and create Reminder
App in 2-weeks of my internship journey.
I have not made any type of contribution because it was only internship session of
the 2-weeks. But I am very happy to be a part of the internship of the Durvasa
Infotech.
Chapter: 6 Learning
Learning
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
LVIII
Android App Development Using Android Studio
Challenges Faced
Main challenge that I was faced is that to complete the whole work
regarding to the Alaram Manager And NotificationManager and create my
own Application with the them because the time duration is only 2-weeks
After Adding The Alaram Manger some Time Application Crashing over
And over.
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006 LX
Android App Development Using Android Studio
Chapter: 8 References
References
https://developer.android.com/reference/android/app/AlarmManager
https://developer.android.com/reference/android/app/NotificationManager
https://data-flair.training/
https://www.geeksforgeeks.org/android-architecture/
https://developer.android.com/studio?gclid=Cj0KCQjwzqSWBhDPARIsAK38LY
9trNOCEFssynLJGsaOdRS7fAjRbbIBjEb6QU7wQJR7CH3b_jocOLYaAqJWEA
Lw_wcB&gclsrc=aw.ds
Chapter:9 Conclusion
Conclusion
This Internship is very good and very important for me because it’s
providing an extra and more understandable knowledge in web
development.
It was a great experience for me in which I learning something new which I
don’t know before the Internship.
VIEAT/BE/7-SEM/INTERNSHIP: 190940107006
LXIV