public interface SDK
Modifier and Type | Method and Description |
---|---|
void |
executeInitialRegistration()
This will initiate the registration process.
|
void |
executeMORegistration(int simSlot)
To trigger auto registration for sim slot
|
void |
executeMTRegistrationProcess(android.support.v4.app.FragmentActivity activity,
java.lang.String countryCode,
java.lang.String mobileNumber,
int simSlot)
To trigger manual registration you can use this method.
|
RegistrationInfo |
getRegisteredSimInfoBasedOnSlot(int simSlot)
returns the registration info based on sim slot, where slot is the sim slot in telephony.
|
java.lang.String |
getVersion()
Get the version of current
SDK library. |
SDK |
init()
Initializes the
SDK library. |
void |
injectSmsToSystemDb(java.lang.String phoneNumber,
java.lang.String messageContent,
int simSlot)
This method will insert the SMS into the system SMS DB, make sure to call
provideInjectSmsPermission() before inserting the first ever message
|
int |
processFcm(java.util.Map<java.lang.String,java.lang.String> pnData)
This method is to process the received notification.
|
void |
provideInjectSmsPermission()
This method is required to check the writing permission to the System DB
and enables it if the permission is not granted
|
void |
receiveDataMessages(int simSlot,
retrofit2.Callback<java.util.List<com.gupshup.registration.model.MessageResponse>> callback)
This method is used to receive SOIP messages
|
void |
sendAcknowledgementForReceivedMessage(com.gupshup.registration.model.DataMessageStatusParam param,
retrofit2.Callback<com.gupshup.registration.model.SendMessageStatusResponse> callback)
This method is to send message ACK to server.
|
java.lang.String getVersion()
SDK
library.SDK
librarySDK init() throws InitializationException
SDK
library. {@link
- InitializationListener} object to get events of initialization e.g onFinish, onFailedSDK
InitializationException
- if any error occurred while initialization e.g : No DB write permissionvoid executeInitialRegistration()
void executeMTRegistrationProcess(android.support.v4.app.FragmentActivity activity, java.lang.String countryCode, java.lang.String mobileNumber, int simSlot)
countryCode
- Country code of you belongs to.mobileNumber
- The number you want to register.simSlot
- Which sim you want to register.void executeMORegistration(int simSlot)
simSlot
- Triggering MO for desired sim slotvoid injectSmsToSystemDb(java.lang.String phoneNumber, java.lang.String messageContent, int simSlot)
phoneNumber
- String: the phone number of the sendermessageContent
- GupshupTextMessage: which will contain the message textsimSlot
- int: sim slot on which the message received.void provideInjectSmsPermission()
void receiveDataMessages(int simSlot, retrofit2.Callback<java.util.List<com.gupshup.registration.model.MessageResponse>> callback)
simSlot
- Sim slot on which message got received.callback
- Callback to get message list.int processFcm(java.util.Map<java.lang.String,java.lang.String> pnData)
pnData
- Received notification.void sendAcknowledgementForReceivedMessage(com.gupshup.registration.model.DataMessageStatusParam param, retrofit2.Callback<com.gupshup.registration.model.SendMessageStatusResponse> callback)
param
- This contains various message detail like messageId,status,sourcePhoneNumber etc..callback
- RegistrationInfo getRegisteredSimInfoBasedOnSlot(int simSlot)
simSlot
-