mediQuo

mediQuo

›Android SDK

Overview

  • Getting Started

API Reference

  • Overview
  • Activation Codes
  • Patients
  • Prescriptions
  • Professionals
  • Messages
  • Troubleshooting

Android SDK

  • Installation
  • Professional List
  • Medical history
  • Customization
  • Other funcionalities
  • Changelog

iOS SDK

  • Installation
  • Professional List
  • Medical history
  • Customization
  • Other funcionalities
  • Changelog

Widget

  • Introduction
  • Permament session

    • Integration
    • Authentication

    Temporal session

    • Integration
  • Methods
  • Customization
  • Events

Other funcionalities

This describes the other funcionalities of the sdk.

Fetch number of unread messages

You can get the number of pending messages to read in order to be able to display them whenever and wherever you want.

private val unreadMessagesLister = object : MediquoUnreadMessagesListener {
    override fun onResponse(count: Int) {
        /* Number of pending messages to read */  
    }
}

private fun fetchUnreadMessages() {
    MediquoSDK.getInstance()?.getUnreadMessageCount(unreadMessagesLister)
}

Return intent

You can provide a return intent to redirect your app if you init a mediQuo SDK activity from a push or a deeplink.

MediquoSDK.getInstance()?.returnIntent = yourIntent

Tracking

If you would track SDK local events, implements a BroadcastReceiver with IntentFilter action to match: com.mediquo.sdk.event

Event nameParamsTypeDescription
chat_viewprofessionalHash
specialityId
String
int
User enter in a chat activity
chat_message_receivedprofessionalHash
specialityId
message
String
int
String
The user received a text message
chat_message_sentprofessionalHash
specialityId
message
String
int
String
The sent received a text message
professional_profile_viewprofessionalHashStringThe user enter in a professional profile activity
medical_history_viewThe user enter in the medical history activity
allergies_viewThe user enter in the allergies list activity
illnesses_viewThe user enter in the illnesses list activity
medications_viewThe user enter in the medications list activity
reports_viewThe user enter in the reports list activity
recipes_viewThe user enter in the recipes list activity
call_startedThe user start a call
call_endedThe user end a call
videocall_startedThe user start a videocall
videocall_endedThe user end a videocall

Example

class SDKReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {

        val eventType = intent.extras?.getString(EVENT_KEY)

        val message = intent.extras?.getString(MESSAGE)
        val hash = intent.extras?.getString(PRO_HASH)
        val specialityId = intent.extras?.getInt(SPECIALITY_ID, -1)

        when (eventType) {
            CHAT_VIEW -> { /* Event chat view */ }
            CHAT_MESSAGE_RECEIVED -> { /* Event message received */ }
            CHAT_MESSAGE_SENT -> { /* Event message sent */ }
            PROFESSIONAL_PROFILE_VIEW -> { /* Event professional profile view */ }
            MEDICAL_HISTORY_VIEW -> { /* Event medical history view */ }
            ALLERGIES_VIEW -> { /* Event allergies view */ }
            ILLNESSES_VIEW -> { /* Event illnesses view */ }
            MEDICATIONS_VIEW -> { /* Event medications view */ }
            REPORTS_VIEW -> { /* Event reports view */ }
            RECIPES_VIEW -> { /* Event recipes view */ }
            CALL_STARTED -> { /* Event call started */ }
            CALL_ENDED -> { /* Event call ended */ }
            VIDEOCALL_STARTED -> { /* Event videocall started */ }
            VIDEOCALL_ENDED -> { /* Event videocall ended */ }
        }
    }
}
← CustomizationChangelog →
  • Fetch number of unread messages
  • Return intent
  • Tracking
MediQuo PRO Logo
Copyright © 2023 mediQuo