8

enter image description here

I want to open activity through push notification, but in mi devices it is not opening due to "Show on lock screen" permission of, how to enable this programmatically.

  • The question doesn't appear to include any attempt at all to solve the problem.StackOverflow expects you to [try to solve your own problem first](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users), as your attempts help us to better understand what you want. Please edit the question to show what you've tried, and show a specific roadblock you're running into with [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example. For more information, please see [How to Ask](https://stackoverflow.com/help/how-to-ask). – Stephan T. Dec 03 '18 at 07:12
  • i have used below code for wake lock, working in all devices except xiamoi device getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); – Siva Prasad Dec 03 '18 at 07:21
  • With this code not working i have already tried this – Siva Prasad Jun 17 '19 at 12:16
  • Did you solve this? – Nabin Dhakal Dec 29 '19 at 10:07
  • 1
    Any updates on this ? – sumit sonawane Oct 03 '20 at 07:03

0 Answers0