0

Im trying to manually send a broadcast in Android Studio

Intent intent = new Intent(Intent.ACTION_USER_PRESENT);
sendBroadcast(intent);

does not work.

Error code:

Permission Denial: not allowed to send broadcast android.intent.action.USER_PRESENT

Is there any way to send a Broadcast or execute the receiver manually?

thx :)

Marcel
  • 1
  • 2
  • Don't know if this will help you, but I had once experienced a similar issue and got help from this post: https://stackoverflow.com/questions/21469431/permission-denial-not-allowed-to-send-broadcast-in-android – Gaurav Mall Jul 01 '22 at 10:07
  • check this https://stackoverflow.com/questions/7619696/broadcast-receiver-for-action-user-present-action-screen-on-action-boot-complete – AskNilesh Jul 01 '22 at 10:11

0 Answers0