Android Keyevent injection requires system permissions

后端 未结 2 1771
花落未央
花落未央 2020-12-11 12:03

hi i am using key event injection using window manager but when i tested this application it gives me error

  04-12 18:19:35.794: WARN/WindowManager(58): Pe         


        
相关标签:
2条回答
  • 2020-12-11 12:53

    Only applications that are part of the firmware (i.e., signed by the firmware signing key) can hold the INJECT_EVENTS permission. If you are making your own device or firmware, this will be relevant. If you are creating an ordinary SDK application, you cannot inject events.

    0 讨论(0)
  • 2020-12-11 13:05

    Normally, you can't do this, for obvious security reasons. However, if this is for test purposes, you might find the Activity Testing documentation useful.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题