improvements.

main_production_audio_video_call
Sikander Saleem 7 days ago
parent 957b6eddea
commit 5e93e12e2f

@ -4,17 +4,18 @@ class URLs {
static const String appReleaseBuildNumber = "48";
// static const host1 = "https://atomsm.hmg.com"; // production url
// static const host1 = "https://atomsmdev.hmg.com"; // local DEV url
static const host1 = "https://atomsmuat.hmg.com"; // local UAT url
static const host1 = "https://atomsmdev.hmg.com"; // local DEV url
// static const host1 = "https://atomsmuat.hmg.com"; // local UAT url
// static final String _baseUrl = "$_host/mobile"; // host local UAT
static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
static final String _baseUrl = "$_host/mobile"; // host local UAT
// static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
// static final String _baseUrl = "$_host/v3/mobile"; // v3 for production CM,PM,TM
// static final String _baseUrl = "$_host/v4/mobile"; // v4 for Demo module
// static final String _baseUrl = "$_host/v5/mobile"; // v5 for data segregation
// static final String _baseUrl = "$_host/v6/mobile"; // for asset delivery module
static const String chatHubUrl = "https://apiderichat.hmg.com/chathub";
// static const String chatHubUrl = "https://atomsmdev.hmg.com/chathub/api/DeriChat";
static const String chatHubUrl = "$host1/api/DeriChat";
static const String chatHubUrlApi = "$chatHubUrl/api"; // new V2 apis
static const String chatHubUrlChat = "$chatHubUrl/hubs/chat"; // new V2 apis

@ -53,6 +53,7 @@ Future<void> onBackgroundMessage(CallEvent event) async {
class FirebaseNotificationManger {
static FirebaseMessaging messaging = FirebaseMessaging.instance;
static String? token;
static String? voipToken;
static Future<void> getToken() async {
NotificationSettings settings = await messaging.requestPermission(alert: true, announcement: false, badge: true, carPlay: false, criticalAlert: false, provisional: false, sound: true);
@ -86,6 +87,7 @@ class FirebaseNotificationManger {
if (settings.authorizationStatus == AuthorizationStatus.authorized) {
try {
token = await messaging.getToken();
voipToken = await FlutterCallkitIncoming.getDevicePushTokenVoIP();
} catch (ex) {}
}
}

@ -69,7 +69,7 @@ class ChatApiClient {
"deviceToken": FirebaseNotificationManger.token,
"isHuaweiDevice": platform == "HUAWEI",
"platform": platform,
"voIPToken": null
"voIPToken": FirebaseNotificationManger.voipToken,
});
if (!kReleaseMode) {

Loading…
Cancel
Save