How to listen mode button in Inbox710

I'm writing android application on Inbox710. and don't know how to listen mode button. 

what i want is when i click mode button i want to change application setting and turn back to previous navigation.

052413a51c4f4ae8ab9ab8a2d41f0cec.png

Has invited:

JerryShao - oversea technical support engineer

Hi botorgil


we provide the api to realize listen mode button, please check the following information.


MODE button
Press the MODE button, the system will issue an intent of "android.intent.action.ENG_MODE_SWITCH" with
A state parameter.
if (action.equals("android.intent.action.ENG_MODE_SWITCH")) {
boolean mIsEngMode = intent.getIntExtra("state", 1) == 1? true: false;
if(mIsEngMode){
Maintenance mode is open
}else{
Maintenance mode is off
}
}
The system startup defaults to the maintenance mode closed state (state=0), and then jumps between opening and closing with the button.


reply to me if you have any further questions.

To reply to a question, please Login or registered