Package: android.hardware.gnss@1.0

IGnssNiCallback

interface IGnssNiCallback

GNSS Network Initiated callback interface.

Properties

GnssNiType

enum GnssNiType: uint8_t

GnssNiType constants

Details
Members
VOICE = 1
UMTS_SUPL = 2
UMTS_CTRL_PLANE = 3
EMERGENCY_SUPL = 4
Annotations
export
name="" , value_prefix="GPS_NI_TYPE_"

GnssNiNotifyFlags

enum GnssNiNotifyFlags: uint32_t

GnssNiNotifyFlags constants

Details
Members
NEED_NOTIFY = 0x0001
NI requires notification
NEED_VERIFY = 0x0002
NI requires verification
PRIVACY_OVERRIDE = 0x0004
NI requires privacy override, no notification/minimal trace
Annotations
export
name="" , value_prefix="GPS_NI_"

GnssUserResponseType

enum GnssUserResponseType: uint8_t

GNSS NI responses, used to define the response in NI structures

Details
Members
RESPONSE_ACCEPT = 1
RESPONSE_DENY = 2
RESPONSE_NORESP = 3
Annotations
export
name="" , value_prefix="GPS_NI_"

GnssNiEncodingType

enum GnssNiEncodingType: int32_t

NI data encoding scheme

Details
Members
ENC_NONE = 0
ENC_SUPL_GSM_DEFAULT = 1
ENC_SUPL_UTF8 = 2
ENC_SUPL_UCS2 = 3
ENC_UNKNOWN = -1
Annotations
export
name="" , value_prefix="GPS_"

GnssNiNotification

struct GnssNiNotification {int32_t notificationId; GnssNiType niType; bitfield notifyFlags; uint32_t timeoutSec; GnssUserResponseType defaultResponse; string requestorId; string notificationMessage; GnssNiEncodingType requestorIdEncoding; GnssNiEncodingType notificationIdEncoding}

Represents an NI request

Details
Members
notificationId
An ID generated by HAL to associate NI notifications and UI responses.
niType
A type used to distinguish different categories of NI events, such as VOICE, UMTS_SUPL etc.
notifyFlags
Notification/verification options, combinations of GnssNiNotifyFlags constants.
timeoutSec
Timeout period to wait for user response.Set to 0 for no timeout limit.Specified in seconds.
defaultResponse
Default response when timeout.
requestorId
String representing the requester of the network inititated location request.
notificationMessage
Notification message.String representing the service(for eg.SUPL-service)who sent the network initiated location request.
requestorIdEncoding
requestorId decoding scheme.
notificationIdEncoding
notificationId decoding scheme

Methods

niNotifyCb

niNotifyCb (GnssNiNotification notification)

Callback with a network initiated request.

Details
Parameters
notification
network initiated request.