PMPpcEventReceiver

class PMPpcEventReceiver(val delegate: PMPpcEventIfc) : BroadcastReceiver

Simple implementation of BroadCastReceiver for PPC Events

Integrator has to :

  • register this class in android
  • define action filter

Samples

import android.content.Context
import android.content.IntentFilter
import com.sygic.profi.model.pm.ppc.PMPpcEvent
import com.sygic.profi.sdk.ifc.PMConstants
import com.sygic.profi.sdk.ifc.ppc.PMPpcEventIfc
import com.sygic.profi.sdk.party.ppc.PMPpcEventReceiver
fun main() { 
   //sampleStart 
   class PPCReceiver: PMPpcEventIfc {

    private val receiver = PMPpcEventReceiver(this)

    fun register(context: Context) {
        context.registerReceiver(receiver, IntentFilter(PMConstants.FILTER_PPC))
    }

    fun unregister(context: Context) {
        context.unregisterReceiver(receiver)
    }

    override fun broadcast(ppc: PMPpcEvent) {
        assert(ppc.correlationId != null)
        TODO("Do something useful with PMPpcEvent")
    }
} 
   //sampleEnd
}

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getResultExtras(p0: Boolean): Bundle
Link copied to clipboard
fun goAsync(): BroadcastReceiver.PendingResult
Link copied to clipboard
Link copied to clipboard
open override fun onReceive(context: Context, intent: Intent)

Accept intent from Android broadcast, decode it from flatbuffer bytearray to POJO, and delegate it.

Link copied to clipboard
open fun peekService(p0: Context, p1: Intent): IBinder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setResult(p0: Int, p1: String, p2: Bundle)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setResultExtras(p0: Bundle)

Properties

Link copied to clipboard