Found 1631 Articles for Android

How to create android Notification intent to clear it self?

Smita Kapse
Updated on 30-Jul-2019 22:30:26

284 Views

This example demonstrate about How to create a local Notifications in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; public class MainActivity extends AppCompatActivity {    public static final String NOTIFICATION_CHANNEL_ID = "10001" ;    private final static String default_notification_channel_id = "default" ... Read More

How to create a local Notifications in Android?

Anvi Jain
Updated on 30-Jul-2019 22:30:26

253 Views

This example demonstrate about How to create a local Notifications in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; public class MainActivity extends AppCompatActivity {    public static final String NOTIFICATION_CHANNEL_ID = "10001" ;    private final static String default_notification_channel_id = "default" ... Read More

How to create Android Notification with BroadcastReceiver?

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

4K+ Views

This example demonstrate about How to create Android Notification with BroadcastReceiver.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to res/menu/main_menu.xml.             Step 4 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.AlarmManager ; import android.app.Notification ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.os.Bundle ; import android.os.SystemClock ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ... Read More

How to schedule local notifications in Android?

Smita Kapse
Updated on 30-Jul-2019 22:30:26

2K+ Views

This example demonstrate about How to schedule local notification in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to res/menu/main_menu.xml.             Step 4 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.AlarmManager ; import android.app.Notification ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.os.Bundle ; import android.os.SystemClock ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ... Read More

How to Schedule Notification in Android?

Anvi Jain
Updated on 30-Jul-2019 22:30:26

450 Views

This example demonstrate about How to schedule notification in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to res/menu/main_menu.xml.             Step 4 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.AlarmManager ; import android.app.Notification ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.os.Bundle ; import android.os.SystemClock ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; ... Read More

How to start an Android activity when use clicks on Notification?

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

157 Views

This example demonstrate about How to start an Android activity when use clicks on NotificationStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Intent ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {    public static final String ... Read More

How to add button to notifications in android?

Smita Kapse
Updated on 30-Jul-2019 22:30:26

2K+ Views

This example demonstrate about How to add button to notifications in androidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Intent ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {    public static final String NOTIFICATION_CHANNEL_ID = "10001" ... Read More

How to detect a new Android notification?

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

2K+ Views

This example demonstrate about How to detect a new Android notificationStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to src/MyListener.javapublic interface MyListener {    void setValue (String packageName) ; }Step 3 − Add the following code to src/MyListener.javapackage app.tutorialspoint.com.notifyme ; import android.content.Context ; import android.service.notification.NotificationListenerService ; import android.service.notification.StatusBarNotification ; import android.util.Log ; public class NotificationService extends NotificationListenerService {    private String TAG = this .getClass().getSimpleName() ;    Context context ;    static MyListener myListener ;    @Override ... Read More

How can I intercept the Status Bar Notifications in Android?

Anvi Jain
Updated on 30-Jul-2019 22:30:26

714 Views

This example demonstrate about How can I intercept the Status Bar Notifications in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to src/MyListener.javapublic interface MyListener {    void setValue (String packageName) ; }Step 3 − Add the following code to src/MyListener.javapackage app.tutorialspoint.com.notifyme ; import android.content.Context ; import android.service.notification.NotificationListenerService ; import android.service.notification.StatusBarNotification ; import android.util.Log ; public class NotificationService extends NotificationListenerService {    private String TAG = this .getClass().getSimpleName() ;    Context context ;    static MyListener ... Read More

How to read all the coming notifications in android?

Anvi Jain
Updated on 30-Jul-2019 22:30:26

4K+ Views

This example demonstrate about How to read all the coming notifications in androidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to src/MyListener.javapublic interface MyListener {    void setValue (String packageName) ; }Step 3 − Add the following code to src/MyListener.javapackage app.tutorialspoint.com.notifyme ; import android.content.Context ; import android.service.notification.NotificationListenerService ; import android.service.notification.StatusBarNotification ; import android.util.Log ; public class NotificationService extends NotificationListenerService {    private String TAG = this .getClass().getSimpleName() ;    Context context ;    static MyListener myListener ... Read More

Advertisements