public class MainActivity extends AppCompatActivity { private static final String CHANNEL_ID = "notificacion"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Intent intent = new Intent(this, AlertActivity.class);//intent para ir a un sitio web//// Intent intent = new Intent(Intent.ACTION_VIEW);
// intent.setData(Uri.parse("http://usbcartagena.edu.co/"));// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);//PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,intent, 0);NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID) .setSmallIcon(R.drawable.ic_announcement_black_24dp) .setContentTitle("Notificación Sanbuenaventura") .setContentText("Clases Virtual por Covid 19") .setPriority(NotificationCompat.PRIORITY_DEFAULT)// .setContentIntent(pendingIntent).setAutoCancel(true); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);int notificationId=100; notificationManager.notify(notificationId, builder.build()); }LogoUsbARCHIVO PAGINA WEB RESPONSIVO PRACTICA WEBVIEWpagina web responsivaImagenes AndroidAplicación Javascript responsivo
martes, 24 de marzo de 2020
Notificación Android
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario