com.gs.phone.service

BasePhoneService

This service can be considered as a simple event subscriber which listens for phone hook events. So if you want to subscribe to phone hook events, extend this class and register your own service with the special action "com.gs.phone.service". Make sure the action is actually added within the intent-filter of the service, or the target app never become a available default app. Notice this subscribe function is enabled only if you configure the target app to be the default app in the system Settings.

Supported Products:

GXV3350, GXV3370, GXV3380


Detail

Method

method description
public void onHookEvent(boolean offHook); Called when a phone hook-off or hook-on event occurs that notify the app to do something.

Params:

offHook
boolean true:off-hook event,false:on-hook event

Supported Products:

GXV3350, GXV3370, GXV3380

public void onEHSHookEvent(boolean offHook); Called when a phone EHS hook-off or hook-on event occurs that notify the app to do something.

Params:

offHook
boolean true:EHS off-hook event, false:EHS on-hook event

Supported Products:

GXV3350, GXV3370, GXV3380

public void onLineStateChanged(int lineId, int status); Called when a line status changed that notify the app to do something.

Params:

lineId
int The ID of the line
status
int The changed status of the line. Refer to {@link com.gs.phone.context.PhoneContext.LineStatus} .

Supported Products:

GXV3350, GXV3370, GXV3380

public void onShowCallingView(); This function will be called and application can open calling view here, when click the "Touch to return to call" on status bar.

Supported Products:

GXV3350, GXV3370, GXV380

public void onShowDefinedView(); this function will be called and application can open defined view here, when click the navigation call button on launcher.

Supported Products:

GXV3350, GXV3370, GXV380

public boolean onEmergencyCallButtonClicked(); Called when emergency call button clicked. Self defined BasePhoneService can implement this method for own special action, for example: go to a self defined emergency call Activity.

Return:

boolean true: The event of the emergency call button clicked has been handled. false: The event of the emergency call button clicked has not been handled, system will take the default action "go to system default phone emergency call Activity".

Supported Products:

GXV3350, GXV3370, GXV3380


Member & Constant

Member description