android : listening to keypress from background

2019-08-14 12:04发布

I read many answers on this topic and this is what i have understood

It is not possible to get any hardkey (home,menu,back,etsc ) press events from a service. It is not delivered to any service

For key camera button and media control broadcast events are sent if these applications are not already in the foreground.

So i need to conclude that it is not possible to launch an app by pressing a hardkey or a combination of hardkeys ie ( like home key 2 times or menu key and then back key ) ?

If this is the case how is samsung launching Vlingo when home key is pressed 2 times. How this functionality is added to samsung galaxy

thanks a lot for your time and help

1条回答
来,给爷笑一个
2楼-- · 2019-08-14 12:09

The Service Can not get the KeyEvent.

Sumsung can do it directly with the system rom. But we can not.

查看更多
登录 后发表回答