Found 1966 Articles for Apps/Applications

How to close the notification panel after notification button is clicked in Android?

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

1K+ Views

This example demonstrate about How to close the notification panel after notification button is clicked 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.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity { ... Read More

How to open last activity when tapping on Android notification?

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

600 Views

This example demonstrate about How to open last activity when tapping on 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 res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {    public static ... Read More

How to make notification intent resume rather than making a new intent?

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

400 Views

This example demonstrate about How to make notification intent resume rather than making a new intentStep 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.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {   ... Read More

Start an Activity from a Notification in Android?

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

867 Views

This example demonstrate about Start an Activity from a Notification 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.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.app.PendingIntent ; import android.content.Context ; import android.content.Intent ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {    public static final String ... Read More

How to group android notifications like whatsapp?

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

673 Views

This example demonstrate about How to group android notifications like whatsappStep 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.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.content.Context ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import android.widget.Button ; public class MainActivity extends AppCompatActivity {    public static final String NOTIFICATION_CHANNEL_ID = "10001" ;    private final ... Read More

How to display multiple notifications in android?

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

825 Views

This example demonstrate about How to display multiple 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 a sound into raw folderStep 4 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.content.ContentResolver ; import android.content.Context ; import android.graphics.Color ; import android.media.AudioAttributes ; import android.net.Uri ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import ... Read More

Custom Notification Sounds for Android Oreo and Beyond?

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

2K+ Views

This example demonstrate about Custom Notification Sounds for Android Oreo and BeyondStep 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 a sound into raw folderStep 4 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.content.ContentResolver ; import android.content.Context ; import android.graphics.Color ; import android.media.AudioAttributes ; import android.net.Uri ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; ... Read More

Create and Manage Notification Channels in Android

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

2K+ Views

This example demonstrate about Create and Manage Notification Channels 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 a sound into raw folderStep 4 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.content.ContentResolver ; import android.content.Context ; import android.graphics.Color ; import android.media.AudioAttributes ; import android.net.Uri ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; import android.view.View ; import ... Read More

Android Notification Example with Vibration, Sound, Action and Big View Styles

Chandu yadav
Updated on 30-Jul-2019 22:30:26

362 Views

This example demonstrate about Android Notification Example with Vibration, Sound, Action and Big View StylesStep 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.javapackage app.tutorialspoint.com.notifyme; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity {    private final static String default_notification_channel_id = "default";    @Override    protected void onCreate (Bundle ... Read More

How to play an android notification sound?

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

309 Views

This example demonstrate about How to play ringtone/alarm/notification sound 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 src/MainActivity.javapackage app.tutorialspoint.com.notifyme; import android.app.NotificationManager; import android.content.Context; import android.media.MediaPlayer; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import java.util.Objects; public class MainActivity extends AppCompatActivity {    private final static String default_notification_channel_id = "default";    @Override    protected void onCreate (Bundle ... Read More

Advertisements