Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extend Lollipops "heads-up" notification duration

Tags:

Been trying to find a way to create a persistent heads up notification, exactly like receiving a phone call or hangouts call. Are these restricted to Google/system apps?

I've tried:

  • Updating the notification before the heads up notification is removed.
  • Setting the ongoing flag to true.
  • Setting auto cancel to false

Can't seem to find this being done anywhere.

like image 319
RyPope Avatar asked Jul 08 '16 22:07

RyPope


1 Answers

It worked for me:

  • set ongoing flag to true
  • set full screen intent
  • set priority to PRIORITY_HIGH
  • set category to CATEGORY_CALL
like image 71
Vladimir Avatar answered Sep 28 '22 03:09

Vladimir