S - Assistant App: Project Report
S - Assistant App: Project Report
on
S – Assistant App
Submitted in the partial fulfillment of the requirement for the award of Degree of
Bachelor of Technology
in
COMPUTER SCIENCE & ENGINEERING
Batch
(2017-2021)
This is a humble effort to express our sincere gratitude towards those who have guided and helped me to complete
this project.
A project is major milestone during the study period of a student. As such this project was a challenge to me and
was an opportunity to prove my caliber. I am highly grateful and obliged to each and every one making me help
out of problems being faced by us.
It would not have been possible to see through the undertaken project without the guidance of Er.Tejinde
Sharmar. It was purely on the basis of their experience and knowledge that we able to clear all the theoretical and
technical hurdles during the development phases of this project work.
Last but not the least I am very thankful to our Head of Department Er. Vinod Sharma and all Members of
Computer Science Deptt. who gave us an opportunity to face real time problems while fulfilling need of an
organization by making projects for them.
DECLARATION
We Sanyam Dhawan, Shivam Kapoor, Prabhnoor Singh and Simranjit Kaur hereby declare that the project
work entitled “Notification listener" is an authentic record of my own work carried out as requirements of
Institutional Training project for the award of degree of B. Tech (CSE), Amritsar Group of College,
Amritsar under the guidance of Er.Tejinder Sharma.
Certified that the above statement made by the student is correct to the best of our knowledge and
Brief.
(Signature of students)
Sanyam Dhawan – 1701359
Prabhnoor Singh – 1701327
Shivam Kapoor – 1701368
Simranjit Kaur - 1701377
Faculty coordinator
Er.Tejinder Sharma (Assistant professor-CSE Department)
INDEX PAGE
3. Source Code
4.
Output
Android Studio
Android Studio is the official integrated development environment (IDE)
for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed
specifically for Android development. It is available for download
on Windows, macOS and Linux based operating systems or as a subscription-based service in
2020. It is a replacement for the Eclipse Android Development Tools (ADT) as the primary IDE
for native Android application development.
The following features are provided in the current stable version:[15][16]
It is used for:
Our Apk will let you to put someone on alert . By alert I mean when ever that person message you on apk
like Hangout your device will vibrate until you remove the notification generated on your Notification
bar. So that you will not miss your boss message. You may think why we created this app how is this
useful then think of a scenario that your boss said “Mr.xyz I will share important document in some time”
So what will you do to get informed when he sent it or how will you distinguish between another
notification and this notification ? Then our app will let you do any another work you want to do.
Activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="1" android:layout_width="-
1" android:layout_height="-1">
</ScrollView>
</LinearLayout>
Main activity.java
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Menu;
import android.text.html;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TableRow.LayoutParams;
import android.widget.TextView;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
textview.setTextSize(20.0f);
textview.setTextColor(Color.parseColor("#0B0719"));
stringBuilder.append("<br><b>");
stringBuilder.append(title);
stringBuilder.append(" : </b>");
stringBuilder.append(text);
textview.setText(Html.fromHtml(stringBuilder.toString()));
tr.addView(textview);
MainActivity.this.tab.addView(tr);
};
TableLayout tab;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
LocalBroadcastManager.getInstance(this).registerReceiver(this.onNotice, new
IntentFilter("Msg"));
getMenuInflater().inflate(R.menu.menu, menu);
return true;
}
Notification Service.java
Import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Vibrator;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
<application
Android:allowBackup=”true”
Android:icon=”@mipmap/ic_launcher”
Android:label=”@string/app_name”
Android:supportsRtl=”true”
Android:theme=”@style/AppTheme”>
<activity android:name=”.MainActivity”>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<service android:name=”.NotificationListenerExampleService”
Android:label=”@string/service_label”
Android:permission=”android.permission.BIND_NOTIFICATION_LISTENER_SERVIC
E”>
<intent-filter>
<action android:name=”android.service.notification.NotificationListenerService”
/>
</intent-filter>
</service>
</application>
</manifest>
Screenshot
Fig 1: Device on which Notification will come and waiting for Notification
Fig2: The sender sends the message to receiver
Fig 3: On Notification received.