Tracking
If you need to track user actions inside the SDK, implement a BroadcastReceiver with an IntentFilter action com.meetinglawyers.sdk.events.
LocalBroadcastManager.getInstance(this).registerReceiver(
YourBroadcastReceiver(),
IntentFilter("com.meetinglawyers.sdk.events")
);
class YourBroadcastReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val eventType = intent.extras?.getString("event_type")
when (eventType) {
"ChatView" -> { /* your code here */ }
"ProfessionalProfileView" -> { /* your code here */ }
"ChatMessageReceived" -> { /* your code here */ }
"ChatMessageSent" -> { /* your code here */ }
}
}
}
Current events supported:
| Event name | Params | Type | Description |
|---|---|---|---|
ChatView | professionalHash speciality | String Integer | A chat activity has been shown to the user. |
ProfessionalProfileView | professionalHash | String | A professional profile activity has been shown to the user. |
ChatMessageReceived | professionalHash speciality message | String Integer String | The user has received and visualized a text message. |
ChatMessageSent | professionalHash speciality message | String Integer String | The user has sent a text message. |