STWEmergency Manager
STWEmergencyManager
Class responsible to manage all emergency alerts
This class offers several possible operations defined in the following list:
- Start an emergency alert
- Start an emergency alert call
- Stop an emergency alert
- Acknowledge an emergency alert
- Check if exist any emergency on
Start an emergency alert
.......
@STWEmergencyLevel int emergencyLevel = STWEmergencyLevel.EMERGENCY_ALERT_URGENT;
STWEmergencyManager.getInstance().startEmergencyAlert(context, emergencyLevel, new STWEmergencyCompletionCallback() {
public void onStart(String threadId) {
//Code...
}
public void onError(int errorId) {
//Code...
}
});
........
Content copied to clipboard
Start an emergency alert call
......
STWEmergencyManager.getInstance().startEmergencyCall(context, new CompletionCallback() {
public void onCompletion(STWVCall vCall) {
//Code...
}
public void onError(int callFailReason) {
//Code...
}
}, new FallbackCallback() {
public void onFallback(String emergencyAlertNumber) {
//Start cellular emergency call..
}
});
......
Content copied to clipboard
Stop an emergency alert
.....
STWEmergencyManager.getInstance().stopEmergencyAlert(context, threadId, new STWEmergencyCompletionCallback() {
public void onStart(String threadId) {
//Code...
}
public void onError(int errorId) {
//Code...
}
});
........
Content copied to clipboard
Acknowledge an emergency alert
.....
STWEmergencyManager.getInstance().setEmergencyAlertAcknowledged(context, messageId);
........
Content copied to clipboard
Check if exist any emergency on
.....
STWEmergencyManager.getInstance().isAlertOn(context, threadId);
........
Content copied to clipboard
Check if the automatic floor control for Emergency PTT Call is enabled
.....
STWEmergencyManager.getInstance().isAutomaticFloorControlForEmergencyAllowed();
........
Content copied to clipboard
Check if Channel dependant Emergency Call is allowed
.....
STWEmergencyManager.getInstance().isChannelDependantEmergencyAllowed();
........
Content copied to clipboard
Start Emergency Call with connected users of active channel
You can use this method to start emergency call with :
- Single recipients
- Groups recipients
- Both
.....
STWEmergencyManager.getInstance().startEmergencyCallWithConnectedChannel(context,recipients,threadName,priority, completionCallback, fallbackCallback);
........
Content copied to clipboard
Check if Channel dependant Emergency Message is allowed
.....
STWEmergencyManager.getInstance().isChannelDependantEmergencyMessageAllowed();
........
Content copied to clipboard
Start Emergency Message with connected users of active channel
You can use this method to start emergency message with :
- Single recipients
- Groups recipients
- Both
.....
STWEmergencyManager.getInstance().startEmergencyAlertWithConnectedChannel(context,recipients,threadName,priority, completionCallback, fallbackCallback);
........
Content copied to clipboard
Functions
Link copied to clipboard
Get the the configured emergency message type
Link copied to clipboard
Get the thread in witch the current emergency is triggered
Link copied to clipboard
Use this method to retrieve the current thread id for the received alert message
Link copied to clipboard
Get the configured delay before launching a custom emergency message.
Link copied to clipboard
Get the thread in witch the current emergency ambient listening is triggered
Link copied to clipboard
Get the fallback phone number already written.
Link copied to clipboard
Use this method to retrieve emergency message Custom Text
Link copied to clipboard
Get the current state of emergency message
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get the configured inactivity delay before launching an emergency message.
Link copied to clipboard
Check if the Automatic floor control feature for emergency PTT call is allowed
Link copied to clipboard
Check if the channel Dependant Emergency Call feature is allowed
Link copied to clipboard
open fun isChannelDependantEmergencyMessageAllowed(@NonNull context: Context): Boolean
Content copied to clipboard
Check if the channel Dependant Emergency Message feature is allowed
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isEmergencyAmbientListeningAllowed(@NonNull context: Context): Boolean
Content copied to clipboard
Check if the emergency ambient listening feature is allowed
Link copied to clipboard
open fun isEmergencyAmbientListeningCallEnabledInCompany(@NonNull context: Context): Boolean
Content copied to clipboard
Check if the emergency ambient listening feature is enabled for company level
Link copied to clipboard
Check if the emergency call feature is allowed
Link copied to clipboard
open fun isEmergencyCallEnabledInCompany(@NonNull context: Context): Boolean
Content copied to clipboard
Check if the emergency call feature is enabled for company level
Link copied to clipboard
Check if the emergency message feature is allowed
Link copied to clipboard
Link copied to clipboard
open fun registerEmergencyListener(@NonNull listener: STWEmergencyListener)
Content copied to clipboard
Register the specified listener to be notified by any Emergency State changes
Link copied to clipboard
open fun setEmergencyAlertAcknowledged( @NonNull context: Context, @NonNull messageId: String, @Nullable callback: EmergencyAlertCompletionCallback)
Content copied to clipboard
Link copied to clipboard
Content copied to clipboard
use setExternalLocationProvider
Link copied to clipboard
open fun startEmergencyAlert( @NonNull context: Context, emergencyAlertLevel: Int, @Nullable callback: EmergencyAlertCompletionCallback)
Content copied to clipboard
Start and send an emergency alert message
Link copied to clipboard
open fun startEmergencyAlertWithConnectedChannel( @NonNull context: Context, @Nullable attendingParticipants: String, emergencyAlertLevel: Int, @Nullable callback: EmergencyAlertCompletionCallback)
Content copied to clipboard
Start and send an emergency alert message
Link copied to clipboard
open fun startEmergencyAmbientListeningCall( @NonNull context: Context, @Nullable threadId: String, @NonNull threadName: String, priority: Int, @Nullable completionCallback: CompletionCallback)
Content copied to clipboard
Start new emergency ambient listening call
Link copied to clipboard
open fun startEmergencyCall( @NonNull context: Context, @NonNull threadName: String, priority: Int, @Nullable completionCallback: CompletionCallback, @Nullable fallbackCallback: FallbackCallback)
Content copied to clipboard
open fun startEmergencyCall( @NonNull context: Context, @NonNull threadName: String, priority: Int, needRequestMediaBurst: Boolean, @Nullable completionCallback: CompletionCallback, @Nullable fallbackCallback: FallbackCallback)
Content copied to clipboard
Start new emergency alert call
Link copied to clipboard
open fun startEmergencyCallWithConnectedChannel( @NonNull context: Context, @Nullable recipients: String, @NonNull threadName: String, priority: Int, @Nullable completionCallback: CompletionCallback, @Nullable fallbackCallback: FallbackCallback)
Content copied to clipboard
Start new emergency alert call to the recipients include the member of selected channel
Link copied to clipboard
open fun stopEmergencyAlert( @NonNull context: Context, @NonNull threadId: String, @Nullable callback: EmergencyAlertCompletionCallback)
Content copied to clipboard
Stop the emergency alert corresponding the the specified thread
Link copied to clipboard
open fun stopEmergencyAmbientListeningAlert( @NonNull context: Context, @NonNull threadId: String, @Nullable callback: EmergencyAlertCompletionCallback)
Content copied to clipboard
Stop the emergency Ambient Listening alert corresponding the the specified thread
Link copied to clipboard
open fun unregisterEmergencyListener(@NonNull listener: STWEmergencyListener)
Content copied to clipboard
Unregister the specified listener to not receive any more the Emergency State changes