Press home button to stop service

后端 未结 3 386
谎友^
谎友^ 2021-01-16 12:08

i want to if the user press home button my service will be stop , this is my code but it\'s not working for me, please help me:

@Override
public boolean onKe         


        
3条回答
  •  臣服心动
    2021-01-16 12:46

    public static final int KEYCODE_HOME

    This key is handled by the framework and is never delivered to applications.

    Source

提交回复
热议问题