「ホーム/センター」キーが押されていることを確認する必要がある Galaxy Note 用のアプリがあります。戻るボタンにデフォルト機能 onBackPressed がある場合のような機能はありますか。どんな助けでも大歓迎です。
1 に答える
0
There is no way to catch the home-key in android. Ideally it is not for developers. But you can do the following
onPause will be called if following events occur
a. User Press Home Key
b. User press back Key
c. External interrupt like callsSo since you can handle backpress, and listen on incoming call broadcast, then you can determine in the onPause method if it is due to home press.
Parse the logcat and then do necessary action in the background service
于 2013-07-17T04:35:56.440 に答える