Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Android: ¿cómo NO traer la aplicación al frente cuando el usuario hace clic en un botón en la notificación?

Tengo una notificación con botones y estos botones modifican la interfaz de notificación cuando el usuario hace clic en uno de ellos.

La interfaz de notificación se actualiza correctamente, pero... la actividad principal de mi aplicación también aparece al frente.

¿Cómo evitar traer la aplicación al frente?

Gracias !!!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

¡Encontré la solución!

La intención de la notificación tiene que activar un servicio y no una actividad.

 Intent buttonsIntent = new Intent(this, NotificationManagementService.class); buttonsIntent.putExtra("do_action", action); contentView.setOnClickPendingIntent(R.id.notifButton, PendingIntent.getActivity(this, 0, buttonsIntent, PendingIntent.FLAG_UPDATE_CURRENT)); notification.contentView = contentView; mNotificationManager.notify(1, notification);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!