Compare commits
No commits in common. 'dev_v3.13.6' and 'fix_bugs_Mar' have entirely different histories.
dev_v3.13.
...
fix_bugs_M
@ -1,35 +0,0 @@
|
|||||||
//package com.cloud.diplomaticquarterapp
|
|
||||||
package com.ejada.hmg
|
|
||||||
|
|
||||||
import io.flutter.app.FlutterApplication
|
|
||||||
import io.flutter.plugin.common.PluginRegistry
|
|
||||||
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
|
|
||||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
|
||||||
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
|
|
||||||
|
|
||||||
class Application : FlutterApplication(), PluginRegistrantCallback {
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
FlutterFirebaseMessagingService.setPluginRegistrant(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun registerWith(registry: PluginRegistry) {
|
|
||||||
io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//import io.flutter.app.FlutterApplication
|
|
||||||
//import io.flutter.plugin.common.PluginRegistry
|
|
||||||
//import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
|
|
||||||
//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
|
|
||||||
//
|
|
||||||
//class Application : FlutterApplication(), PluginRegistrantCallback {
|
|
||||||
// override fun onCreate() {
|
|
||||||
// super.onCreate()
|
|
||||||
// FlutterFirebaseMessagingService.setPluginRegistrant(this)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun registerWith(registry: PluginRegistry?) {
|
|
||||||
// FirebaseCloudMessagingPluginRegistrant.registerWith(registry)
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE REQUEST-----
|
|
||||||
MIICajCCAVICAQAwJTEjMCEGCSqGSIb3DQEJARYUSGFyb29uNjEzOEBnbWFpbC5j
|
|
||||||
b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4E8y9zluekbsXX6+i
|
|
||||||
HLa0GrZE+r8rJsmcNyhiONDkpCTQuuidRb4PH+DWPpxwtndKpgzPemCXavaAPY8I
|
|
||||||
vSf5/aLTzClLvuX4OqNsb9Y8v8jlt7uYud6hPYK+VKZmIyynqeHldur0+RQScVY7
|
|
||||||
Z4MbgxWYAXd0K49o1Vj8KcYP1G37XIaUwOf+Ib3az4abnrsou7w9PSHnKREPU1A8
|
|
||||||
syBR56/Zcm3I9e+4nLyk2kjhkp6zR8KKW3s0teqHkW+V2nqd6eU+ZwOOmP3FVuwl
|
|
||||||
X+kfVabTc42Nb7toDaIvxEI+LlrNCUTCptE5uvY+vId0bwjcL88Ti9zshPETgLd8
|
|
||||||
F7mHAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAMTsBtXA79BL7aJoe87iHwCaR
|
|
||||||
lyOoeG5vUVJhQxhkb7pXD6TT00H3DEn43MCD+Nu9KNq3ZAARTsbnoB1MzYQ+Qs0w
|
|
||||||
uIx3K+sKKqzo3tKY78cjpKYW68qSY8QHPH8z0PJ/a18Mz1VGjhV9sanRc57fkf8Y
|
|
||||||
SfzG+jKB+y9AeC4R5PAVkv/EScZKVyb8+hFNZRMBOfnME7QRWm51MlnzfgavB/Sr
|
|
||||||
SSb9KrKzA65UKM9fv0JhNftiFVwsMDA42RuwSE7rVqzoejb47sFNnEBprt4Jel+5
|
|
||||||
FJt/C//NKspMlW2cdRbPek7adaBuZCvEO+b0TDnvMQXnJTO5K0LCzGb5MRuGUg==
|
|
||||||
-----END CERTIFICATE REQUEST-----
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE REQUEST-----
|
|
||||||
MIH6MIGfAgEAMD0xIzAhBgkqhkiG9w0BCQEWFEhhcm9vbjYxMzhAZ21haWwuY29t
|
|
||||||
MQkwBwYDVQQDDAAxCzAJBgNVBAYTAkFFMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD
|
|
||||||
QgAEiHGgNfm6LyD0k41YUNxGibQT5t2T9+QTVb6v5YrfCYslJIurcpeia8pzl/HJ
|
|
||||||
p1f4qxCR04cEYE3tcunyzkJd26AAMAwGCCqGSM49BAMCBQADSAAwRQIhAJWZqbmD
|
|
||||||
e9jyqPHW578V6xsf5Axgf64GBBFMpZ8+ZukDAiAYu0BbgeiU4RwCrezA71iH95yZ
|
|
||||||
ge9MoPuNHejpDKGeQQ==
|
|
||||||
-----END CERTIFICATE REQUEST-----
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf2758
|
|
||||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
||||||
{\colortbl;\red255\green255\blue255;}
|
|
||||||
{\*\expandedcolortbl;;}
|
|
||||||
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
|
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
|
||||||
|
|
||||||
\f0\fs24 \cf0 HMG@54321}
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
MIIQaQYJKoZIhvcNAQcCoIIQWjCCEFYCAQExCzAJBgUrDgMCGgUAMHgGCSqGSIb3DQEHAaBrBGl7
|
|
||||||
InRlYW1JZCI6IjNBMzU5RTg2WkYiLCJkb21haW4iOiJ1YXQuaG1nd2Vic2VydmljZXMuY29tIiwi
|
|
||||||
ZGF0ZUNyZWF0ZWQiOiIyMDI1LTA0LTA5LDA4OjUzOjAzIiwidmVyc2lvbiI6MX2ggg0_MIIENDCC
|
|
||||||
AxygAwIBAgIIPVn4N-rR2J8wDQYJKoZIhvcNAQELBQAwczEtMCsGA1UEAwwkQXBwbG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||||||
8YCDVn0Y+w9n2Vw/+kHiNY6P96qp/CfXZgMLFpUu0mqcmZl97htfmB9AH2tC45yh
|
|
||||||
mKxDJiKEnk69zVCh/bkc9tFE1tUDkkKblJTCEyWfdDUUYM4ET3t3fBqWB78F4J3m
|
|
||||||
XglByGZmHgY2+7nsSQBiq7k9tFN2c7FZ9BD3AgMBAAGgADANBgkqhkiG9w0BAQsF
|
|
||||||
AAOCAQEAJxqoyfEJ7V83ffCAqkYNNEcCQMIRi1Y4cTTm/5KZGA/UPeDeX48/bm4K
|
|
||||||
XIf2zbv88OGASInBrvMDp0x0zs13Dx2yXxofGN+iQSBwN6jPV/upmm0DjgTmgUGh
|
|
||||||
BJste70LaU228ADzWDw8UJm/GKjK8WvE0XOGpPKYq9cuVW3M+6QRoRHXy0eJc2PX
|
|
||||||
VgopsuhHUyA5trxM7k4yc6GgYVx+fAwMaplovTwn5U8XK6bDEIvCjImfat/u4Wp8
|
|
||||||
R31p0BQzQaeyWfpp9Ucn/fvQSeB+wtjhHuA1ukcyWY1kBYOyCMIHymFrJLaTpUj7
|
|
||||||
aQFYZDV28HYv0yWhWIAD9Pu+aDHWpA==
|
|
||||||
-----END CERTIFICATE REQUEST-----
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
Bag Attributes
|
|
||||||
friendlyName: VoIP Services: com.HMG.HMG-Smartphone
|
|
||||||
localKeyID: 70 4A 99 03 F8 D7 92 FA F7 2F DD 3B D8 BF 2C F0 BD CE 21 C8
|
|
||||||
subject=/UID=com.HMG.HMG-Smartphone.voip/CN=VoIP Services: com.HMG.HMG-Smartphone/OU=3A359E86ZF/O=Dr Sulaiman Al Habib Medical Center/C=SA
|
|
||||||
issuer=/CN=Apple Worldwide Developer Relations Certification Authority/OU=G4/O=Apple Inc./C=US
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIGkTCCBXmgAwIBAgIQFB+/PYFlrZ6SCzSX9cqOBDANBgkqhkiG9w0BAQsFADB1
|
|
||||||
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
|
|
||||||
7nGUPPEWFswL66xTt3GusHmeXkKDXG3ac+4jLk8yU7gunos77CNDm+9TkShdJ2Rg
|
|
||||||
tTRopK4ockqwoPrCeEVrooHR4e42YvmkB6AfYKJRnQZQVJIpW0OES7vrtoWVGoNj
|
|
||||||
ktHOV+wFIuAQPI9P4z0RFyRw85MHr+jFqxeLU/1500PwCxIiNHkIcUtzZgrnr22R
|
|
||||||
7rgkxav+RrjLjXVQvC4VJispKCU7yR69Xv1rsC5zc7OTCuCkbQ9FvnfsiUz5ZDzp
|
|
||||||
3D0gGojU9wmJ1yVk9HiZsuiVwmg/LbDHI3pSYbxz3n1UHB6Pu0jX3c3Uxkx674HD
|
|
||||||
/0uvHzg=
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
Bag Attributes
|
|
||||||
localKeyID: 70 4A 99 03 F8 D7 92 FA F7 2F DD 3B D8 BF 2C F0 BD CE 21 C8
|
|
||||||
Key Attributes: <No Attributes>
|
|
||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHadAER62mSf+w
|
|
||||||
OxPu9rF1EvifDxbAEv6znZIHvwimgShdPLLSrkFdN4VpSHMzrASqpHnlSL3wxO6e
|
|
||||||
ym9pATH3WfLvKIQxnn9OkO5fScjQi0RkFbe0JqTqN2LaFxrSFrhqQ/1p/izr690H
|
|
||||||
qjrfquRI8t8evatyTku67/xcCj6uSIVLfJoS8YCDVn0Y+w9n2Vw/+kHiNY6P96qp
|
|
||||||
/CfXZgMLFpUu0mqcmZl97htfmB9AH2tC45yhmKxDJiKEnk69zVCh/bkc9tFE1tUD
|
|
||||||
kkKblJTCEyWfdDUUYM4ET3t3fBqWB78F4J3mXglByGZmHgY2+7nsSQBiq7k9tFN2
|
|
||||||
c7FZ9BD3AgMBAAECggEBALTXH58SBcd86hS+rsgSDkJ2ruNIQsBzOWpYJjtCIi0l
|
|
||||||
ih5r0lu/TWWk2S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npr0vsE
|
|
||||||
dSkYXZ4KA3pq/3R2HyyWB2e/t0Vu6cwWJuuM/hAa8QKBgGNRStNVSMPvzx2X7mB6
|
|
||||||
EqdlWqVbfSTHJiZKyNPWHlSuZgdQ14BRwq7KZ0ysZy+kOX4rh1rIfqzrKc62xEXB
|
|
||||||
E+fmIpu+DUOM5ojEPCf9Om87r3fMJ54SjM7z1dtVc+Muy4TnFZ4UQcN9txWbnkAo
|
|
||||||
++H5gC9DBedOEXkwoCYjoeuM
|
|
||||||
-----END PRIVATE KEY-----
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
//package com.cloud.diplomaticquarterapp
|
|
||||||
package com.ejada.hmg
|
|
||||||
|
|
||||||
import io.flutter.plugin.common.PluginRegistry
|
|
||||||
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin
|
|
||||||
|
|
||||||
object FirebaseCloudMessagingPluginRegistrant {
|
|
||||||
fun registerWith(registry: PluginRegistry?) {
|
|
||||||
if (alreadyRegisteredWith(registry)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"))
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean {
|
|
||||||
val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName
|
|
||||||
if (registry?.hasPlugin(key)!!) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
registry.registrarFor(key)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CLIENT_ID</key>
|
||||||
|
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>864393916058</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>com.cloud.diplomaticquarterapp</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>diplomaticquarter-d2385</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>diplomaticquarter-d2385.appspot.com</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
|
||||||
|
<key>DATABASE_URL</key>
|
||||||
|
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -1,6 +0,0 @@
|
|||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgJ5XRSnefd1apSG/z
|
|
||||||
YJTQ55ffLMlPgKlGM9edg88mUZagCgYIKoZIzj0DAQehRANCAATSA2MbS+J0cQsc
|
|
||||||
uBU0xaoxOUgGvnHCQSEK4t22i8eeKPPhH6RHJhK1ugPvj+Eyadf7j6pn3QRonEJu
|
|
||||||
mIL+qvqC
|
|
||||||
-----END PRIVATE KEY-----
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
package io.flutter.plugins.firebase.messaging;
|
|
||||||
|
|
||||||
import android.content.BroadcastReceiver;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.TimerTask;
|
|
||||||
|
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
||||||
|
|
||||||
import com.google.firebase.messaging.RemoteMessage;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
public class FlutterFirebaseMessagingReceiver extends BroadcastReceiver {
|
|
||||||
private static final String TAG = "FLTFireMsgReceiver";
|
|
||||||
static HashMap<String, RemoteMessage> notifications = new HashMap<>();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
Log.d(TAG, "broadcast received for message");
|
|
||||||
if (ContextHolder.getApplicationContext() == null) {
|
|
||||||
ContextHolder.setApplicationContext(context.getApplicationContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (intent.getExtras() == null) {
|
|
||||||
Log.d(
|
|
||||||
TAG,
|
|
||||||
"broadcast received but intent contained no extras to process RemoteMessage. Operation cancelled.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RemoteMessage remoteMessage = new RemoteMessage(intent.getExtras());
|
|
||||||
|
|
||||||
// Store the RemoteMessage if the message contains a notification payload.
|
|
||||||
if (remoteMessage.getNotification() != null) {
|
|
||||||
notifications.put(remoteMessage.getMessageId(), remoteMessage);
|
|
||||||
FlutterFirebaseMessagingStore.getInstance().storeFirebaseMessage(remoteMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
// |-> ---------------------
|
|
||||||
// App in Foreground
|
|
||||||
// ------------------------
|
|
||||||
if (FlutterFirebaseMessagingUtils.isApplicationForeground(context)) {
|
|
||||||
Intent onMessageIntent = new Intent(FlutterFirebaseMessagingUtils.ACTION_REMOTE_MESSAGE);
|
|
||||||
onMessageIntent.putExtra(FlutterFirebaseMessagingUtils.EXTRA_REMOTE_MESSAGE, remoteMessage);
|
|
||||||
LocalBroadcastManager.getInstance(context).sendBroadcast(onMessageIntent);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// |-> ---------------------
|
|
||||||
// App in Background/Quit
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
|
|
||||||
if (remoteMessage.getData().containsKey("is_call")) {
|
|
||||||
Intent intent12 = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
|
||||||
context.startActivity(intent12);
|
|
||||||
try {
|
|
||||||
new Timer().schedule(new TimerTask() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Intent onMessageIntent = new Intent(FlutterFirebaseMessagingUtils.ACTION_REMOTE_MESSAGE);
|
|
||||||
onMessageIntent.putExtra(FlutterFirebaseMessagingUtils.EXTRA_REMOTE_MESSAGE, remoteMessage);
|
|
||||||
LocalBroadcastManager.getInstance(context).sendBroadcast(onMessageIntent);
|
|
||||||
}
|
|
||||||
}, 5000);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e("AppCallingException", e.getMessage());
|
|
||||||
}
|
|
||||||
// super.onMessageReceived(remoteMessage);
|
|
||||||
} //else
|
|
||||||
// super.onMessageReceived(remoteMessage);
|
|
||||||
//
|
|
||||||
// if (remoteMessage.getData().containsKey("is_call")) {
|
|
||||||
// Log.e("AppCalling", "started...");
|
|
||||||
// Intent intent12 = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
||||||
// intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
|
||||||
// context.startActivity(intent12);
|
|
||||||
// try {
|
|
||||||
// Log.e("AppCalling", "going to sleep...");
|
|
||||||
// TimeUnit.SECONDS.sleep(10);
|
|
||||||
// Log.e("AppCalling", "sendig to broadcast receiver...");
|
|
||||||
// Log.e("AppCalling:DAta", remoteMessage.getData().containsKey("is_call") + "");
|
|
||||||
// Intent onBackgroundMessageIntent =
|
|
||||||
// new Intent(context, FlutterFirebaseMessagingBackgroundService.class);
|
|
||||||
// onBackgroundMessageIntent.putExtra(
|
|
||||||
// FlutterFirebaseMessagingUtils.EXTRA_REMOTE_MESSAGE, remoteMessage);
|
|
||||||
// FlutterFirebaseMessagingBackgroundService.enqueueMessageProcessing(
|
|
||||||
// context, onBackgroundMessageIntent);
|
|
||||||
// //return;
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// Log.e("AppCallingException", e.getMessage());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
Intent onBackgroundMessageIntent =
|
|
||||||
new Intent(context, FlutterFirebaseMessagingBackgroundService.class);
|
|
||||||
onBackgroundMessageIntent.putExtra(
|
|
||||||
FlutterFirebaseMessagingUtils.EXTRA_REMOTE_MESSAGE, remoteMessage);
|
|
||||||
FlutterFirebaseMessagingBackgroundService.enqueueMessageProcessing(
|
|
||||||
context, onBackgroundMessageIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
"agcgw":{
|
|
||||||
"backurl":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"url":"connect-drcn.dbankcloud.cn",
|
|
||||||
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
|
|
||||||
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"agcgw_all":{
|
|
||||||
"CN":"connect-drcn.dbankcloud.cn",
|
|
||||||
"CN_back":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"DE":"connect-dre.dbankcloud.cn",
|
|
||||||
"DE_back":"connect-dre.hispace.hicloud.com",
|
|
||||||
"RU":"connect-drru.dbankcloud.cn",
|
|
||||||
"RU_back":"connect-drru.hispace.hicloud.com",
|
|
||||||
"SG":"connect-dra.dbankcloud.cn",
|
|
||||||
"SG_back":"connect-dra.hispace.hicloud.com"
|
|
||||||
},
|
|
||||||
"client":{
|
|
||||||
"cp_id":"2640966000002322881",
|
|
||||||
"product_id":"736430079244816567",
|
|
||||||
"client_id":"563735388191982656",
|
|
||||||
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
|
|
||||||
"project_id":"736430079244816567",
|
|
||||||
"app_id":"102857389",
|
|
||||||
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
|
|
||||||
"package_name":"com.ejada.hmg"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_id":"102857389",
|
|
||||||
"client_type":1
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"app_id":"102857389",
|
|
||||||
"package_name":"com.ejada.hmg"
|
|
||||||
},
|
|
||||||
"service":{
|
|
||||||
"analytics":{
|
|
||||||
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
|
|
||||||
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
|
|
||||||
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
|
|
||||||
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"resource_id":"p1",
|
|
||||||
"channel_id":""
|
|
||||||
},
|
|
||||||
"search":{
|
|
||||||
"url":"https://search-drcn.cloud.huawei.com"
|
|
||||||
},
|
|
||||||
"cloudstorage":{
|
|
||||||
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"ml":{
|
|
||||||
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"region":"CN",
|
|
||||||
"configuration_version":"3.0",
|
|
||||||
"appInfos":[
|
|
||||||
{
|
|
||||||
"package_name":"com.ejada.hmg",
|
|
||||||
"client":{
|
|
||||||
"app_id":"102857389"
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"package_name":"com.ejada.hmg",
|
|
||||||
"app_id":"102857389"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_type":1,
|
|
||||||
"client_id":"102857389"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
"agcgw":{
|
|
||||||
"backurl":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"url":"connect-drcn.dbankcloud.cn",
|
|
||||||
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
|
|
||||||
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"agcgw_all":{
|
|
||||||
"CN":"connect-drcn.dbankcloud.cn",
|
|
||||||
"CN_back":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"DE":"connect-dre.dbankcloud.cn",
|
|
||||||
"DE_back":"connect-dre.hispace.hicloud.com",
|
|
||||||
"RU":"connect-drru.dbankcloud.cn",
|
|
||||||
"RU_back":"connect-drru.hispace.hicloud.com",
|
|
||||||
"SG":"connect-dra.dbankcloud.cn",
|
|
||||||
"SG_back":"connect-dra.hispace.hicloud.com"
|
|
||||||
},
|
|
||||||
"client":{
|
|
||||||
"cp_id":"2640966000002322881",
|
|
||||||
"product_id":"736430079244816567",
|
|
||||||
"client_id":"563735388191982656",
|
|
||||||
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
|
|
||||||
"project_id":"736430079244816567",
|
|
||||||
"app_id":"102857389",
|
|
||||||
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
|
|
||||||
"package_name":"com.ejada.hmg"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_id":"102857389",
|
|
||||||
"client_type":1
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"app_id":"102857389",
|
|
||||||
"package_name":"com.ejada.hmg"
|
|
||||||
},
|
|
||||||
"service":{
|
|
||||||
"analytics":{
|
|
||||||
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
|
|
||||||
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
|
|
||||||
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
|
|
||||||
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"resource_id":"p1",
|
|
||||||
"channel_id":""
|
|
||||||
},
|
|
||||||
"search":{
|
|
||||||
"url":"https://search-drcn.cloud.huawei.com"
|
|
||||||
},
|
|
||||||
"cloudstorage":{
|
|
||||||
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"ml":{
|
|
||||||
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"region":"CN",
|
|
||||||
"configuration_version":"3.0",
|
|
||||||
"appInfos":[
|
|
||||||
{
|
|
||||||
"package_name":"com.ejada.hmg",
|
|
||||||
"client":{
|
|
||||||
"app_id":"102857389"
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"package_name":"com.ejada.hmg",
|
|
||||||
"app_id":"102857389"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_type":1,
|
|
||||||
"client_id":"102857389"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,273 +1,112 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
package="com.cloud.diplomaticquarterapp">
|
||||||
package="com.ejada.hmg">
|
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||||
<!--
|
|
||||||
io.flutter.app.FlutterApplication is an android.app.Application that
|
|
||||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||||
In most cases you can leave this as-is, but you if you want to provide
|
In most cases you can leave this as-is, but you if you want to provide
|
||||||
additional functionality it is fine to subclass or reimplement
|
additional functionality it is fine to subclass or reimplement
|
||||||
FlutterApplication and put your custom class here.
|
FlutterApplication and put your custom class here. -->
|
||||||
-->
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.ACTIVITY_RECOGNITION"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.READ_PHONE_STATE"
|
|
||||||
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/> -->
|
|
||||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> -->
|
|
||||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> -->
|
|
||||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> -->
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.BROADCAST_STICKY"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="com.google.android.gms.permission.AD_ID"
|
|
||||||
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"
|
|
||||||
tools:node="remove" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
||||||
<uses-permission
|
|
||||||
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
|
|
||||||
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
|
|
||||||
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
||||||
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
|
|
||||||
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.sensor.stepcounter"
|
|
||||||
android:required="false"
|
|
||||||
tools:node="replace" />
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.sensor.stepdetector"
|
|
||||||
android:required="false"
|
|
||||||
tools:node="replace" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
|
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.camera"
|
|
||||||
android:required="true" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||||
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-feature android:name="android.hardware.location.network" android:required="false" />
|
||||||
|
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
|
||||||
|
|
||||||
<uses-feature
|
<!-- Wifi Permissions-->
|
||||||
android:name="android.hardware.location.network"
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||||
android:required="false" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-feature
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||||
android:name="android.hardware.location.gps"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA" /> <!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" /> -->
|
|
||||||
<!-- Wifi Permissions -->
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> -->
|
|
||||||
<!-- Detect Reboot Permission -->
|
<!-- Detect Reboot Permission -->
|
||||||
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> -->
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||||
<queries>
|
|
||||||
<intent>
|
|
||||||
<action android:name="android.speech.RecognitionService" />
|
|
||||||
</intent>
|
|
||||||
|
|
||||||
<package android:name="com.whatsapp" />
|
|
||||||
<package android:name="com.whatsapp.w4b" />
|
|
||||||
</queries>
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".Application"
|
android:name="io.flutter.app.FlutterApplication"
|
||||||
android:allowBackup="false"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:extractNativeLibs="true"
|
|
||||||
android:icon="@mipmap/ic_launcher_local"
|
|
||||||
android:label="Dr. Alhabib"
|
|
||||||
android:screenOrientation="sensorPortrait"
|
|
||||||
android:showOnLockScreen="true"
|
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:replace="android:extractNativeLibs,android:label">
|
android:label="diplomaticquarterapp">
|
||||||
<activity
|
|
||||||
android:name="com.cloud.diplomaticquarterapp.whatsapp.WhatsAppCodeActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:enabled="true"
|
|
||||||
android:launchMode="standard"
|
|
||||||
>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="com.whatsapp.otp.OTP_RETRIEVED" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<meta-data
|
|
||||||
android:name="push_kit_auto_init_enabled"
|
|
||||||
android:value="true" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:enabled="true"
|
|
||||||
android:exported="true"
|
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:showOnLockScreen="true"
|
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="adjustResize">
|
||||||
tools:node="merge">
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
<meta-data
|
|
||||||
android:name="flutter_deeplinking_enabled"
|
|
||||||
android:value="true" />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Specifies an Android theme to apply to this Activity as soon as
|
|
||||||
the Android process has started. This theme is visible to the user
|
the Android process has started. This theme is visible to the user
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
to determine the Window background behind the Flutter UI.
|
to determine the Window background behind the Flutter UI. -->
|
||||||
-->
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="io.flutter.embedding.android.NormalTheme"
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
android:resource="@style/NormalTheme" />
|
android:resource="@style/NormalTheme" />
|
||||||
<!--
|
<!-- Displays an Android View that continues showing the launch screen
|
||||||
Displays an Android View that continues showing the launch screen
|
|
||||||
Drawable until Flutter paints its first frame, then this splash
|
Drawable until Flutter paints its first frame, then this splash
|
||||||
screen fades out. A splash screen is useful to avoid any visual
|
screen fades out. A splash screen is useful to avoid any visual
|
||||||
gap between the end of Android's launch screen and the painting of
|
gap between the end of Android's launch screen and the painting of
|
||||||
Flutter's first frame.
|
Flutter's first frame. -->
|
||||||
-->
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||||
android:resource="@drawable/launch_background" />
|
android:resource="@drawable/launch_background" />
|
||||||
|
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- <intent-filter android:autoVerify="true">-->
|
|
||||||
<!-- <action android:name="android.intent.action.VIEW" />-->
|
|
||||||
|
|
||||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
|
||||||
<!-- <category android:name="android.intent.category.BROWSABLE" />-->
|
|
||||||
|
|
||||||
<!-- <data-->
|
|
||||||
<!-- android:host="hmg.com"-->
|
|
||||||
<!-- android:scheme="http" />-->
|
|
||||||
<!-- <data-->
|
|
||||||
<!-- android:host="www.hmg.com"-->
|
|
||||||
<!-- android:scheme="http" />-->
|
|
||||||
<!-- <data android:scheme="https" />-->
|
|
||||||
<!-- </intent-filter>-->
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
|
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
</activity> <!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true"> -->
|
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
|
||||||
<!-- <intent-filter> -->
|
|
||||||
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"/> -->
|
|
||||||
<!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> -->
|
|
||||||
<!-- </intent-filter> -->
|
|
||||||
<!-- </receiver> -->
|
|
||||||
<!-- Geofencing -->
|
|
||||||
<service
|
|
||||||
android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService"
|
|
||||||
android:exported="true"
|
|
||||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
|
||||||
|
|
||||||
<receiver
|
|
||||||
android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver"
|
|
||||||
android:enabled="true"
|
|
||||||
android:exported="false" />
|
|
||||||
<receiver
|
|
||||||
android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver"
|
|
||||||
android:enabled="true"
|
|
||||||
android:exported="false">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
<receiver
|
|
||||||
android:name=".geofence.intent_receivers.LocationProviderChangeReceiver"
|
|
||||||
android:exported="false">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.location.PROVIDERS_CHANGED" />
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
|
||||||
|
|
||||||
<service
|
<!-- Geofencing -->
|
||||||
android:name=".geofence.intent_receivers.ReregisterGeofenceJobService"
|
<service android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||||
android:exported="true"
|
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" android:exported="true" />
|
||||||
android:permission="android.permission.BIND_JOB_SERVICE" /> <!-- Geofencing -->
|
<receiver android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true">
|
||||||
<!--
|
|
||||||
Huawei Push Notifications
|
|
||||||
Set push kit auto enable to true (for obtaining the token on initialize)
|
|
||||||
-->
|
|
||||||
<!-- <meta-data -->
|
|
||||||
<!-- android:name="push_kit_auto_init_enabled" -->
|
|
||||||
<!-- android:value="true" /> -->
|
|
||||||
<!-- These receivers are for sending scheduled local notifications -->
|
|
||||||
<receiver
|
|
||||||
android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver"
|
|
||||||
android:exported="false">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
|
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
<receiver
|
<receiver android:name=".geofence.intent_receivers.LocationProviderChangeReceiver">
|
||||||
android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationScheduledPublisher"
|
|
||||||
android:enabled="true"
|
|
||||||
android:exported="false" />
|
|
||||||
<receiver
|
|
||||||
android:name="com.huawei.hms.flutter.push.receiver.BackgroundMessageBroadcastReceiver"
|
|
||||||
android:enabled="true"
|
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" />
|
<action android:name="android.location.PROVIDERS_CHANGED"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver> <!-- Huawei Push Notifications -->
|
</receiver>
|
||||||
<meta-data
|
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||||
android:name="com.google.android.geo.API_KEY"
|
<!-- Geofencing -->
|
||||||
android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8" />
|
|
||||||
<!--
|
<meta-data android:name="com.google.android.geo.API_KEY"
|
||||||
Don't delete the meta-data below.
|
android:value="AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"/>
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
|
|
||||||
-->
|
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="flutterEmbedding"
|
android:name="flutterEmbedding"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||||
|
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
||||||
</manifest>
|
</manifest>
|
||||||
@ -1,59 +0,0 @@
|
|||||||
//package com.cloud.diplomaticquarterapp
|
|
||||||
package com.ejada.hmg
|
|
||||||
|
|
||||||
import com.facebook.stetho.Stetho
|
|
||||||
import io.flutter.app.FlutterApplication
|
|
||||||
import io.flutter.plugin.common.PluginRegistry
|
|
||||||
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
|
|
||||||
//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
|
|
||||||
|
|
||||||
class Application : FlutterApplication(), PluginRegistrantCallback {
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
// FlutterFirebaseMessagingService.setPluginRegistrant(this)
|
|
||||||
|
|
||||||
// Stetho.initializeWithDefaults(this);
|
|
||||||
// Create an InitializerBuilder
|
|
||||||
// Create an InitializerBuilder
|
|
||||||
val initializerBuilder = Stetho.newInitializerBuilder(this)
|
|
||||||
|
|
||||||
|
|
||||||
// Enable Chrome DevTools
|
|
||||||
initializerBuilder.enableWebKitInspector(
|
|
||||||
Stetho.defaultInspectorModulesProvider(this)
|
|
||||||
)
|
|
||||||
|
|
||||||
// Enable command line interface
|
|
||||||
initializerBuilder.enableDumpapp(
|
|
||||||
Stetho.defaultDumperPluginsProvider(this)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
// Use the InitializerBuilder to generate an Initializer
|
|
||||||
val initializer = initializerBuilder.build()
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize Stetho with the Initializer
|
|
||||||
Stetho.initialize(initializer)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun registerWith(registry: PluginRegistry) {
|
|
||||||
// io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//import io.flutter.app.FlutterApplication
|
|
||||||
//import io.flutter.plugin.common.PluginRegistry
|
|
||||||
//import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
|
|
||||||
//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
|
|
||||||
//
|
|
||||||
//class Application : FlutterApplication(), PluginRegistrantCallback {
|
|
||||||
// override fun onCreate() {
|
|
||||||
// super.onCreate()
|
|
||||||
// FlutterFirebaseMessagingService.setPluginRegistrant(this)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// override fun registerWith(registry: PluginRegistry?) {
|
|
||||||
// FirebaseCloudMessagingPluginRegistrant.registerWith(registry)
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
//package com.cloud.diplomaticquarterapp
|
|
||||||
package com.ejada.hmg
|
|
||||||
|
|
||||||
import io.flutter.plugin.common.PluginRegistry
|
|
||||||
//import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin
|
|
||||||
|
|
||||||
object FirebaseCloudMessagingPluginRegistrant {
|
|
||||||
fun registerWith(registry: PluginRegistry?) {
|
|
||||||
if (alreadyRegisteredWith(registry)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"))
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean {
|
|
||||||
val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName
|
|
||||||
if (key?.let { registry?.hasPlugin(it) }!!) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if (registry != null) {
|
|
||||||
registry.registrarFor(key)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp
|
|
||||||
|
|
||||||
import com.ejada.hmg.MainActivity
|
|
||||||
import android.os.Build
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import com.cloud.diplomaticquarterapp.penguin.PenguinView
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.plugin.common.MethodCall
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
|
|
||||||
class PenguinInPlatformBridge(
|
|
||||||
private var flutterEngine: FlutterEngine,
|
|
||||||
private var mainActivity: MainActivity
|
|
||||||
) {
|
|
||||||
|
|
||||||
private lateinit var channel: MethodChannel
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val CHANNEL = "launch_penguin_ui"
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
fun create() {
|
|
||||||
// openTok = OpenTok(mainActivity, flutterEngine)
|
|
||||||
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
|
||||||
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
|
|
||||||
when (call.method) {
|
|
||||||
"launchPenguin" -> {
|
|
||||||
print("the platform channel is being called")
|
|
||||||
val args = call.arguments as Map<String, Any>?
|
|
||||||
Log.d("TAG", "configureFlutterEngine: $args")
|
|
||||||
println("args")
|
|
||||||
args?.let {
|
|
||||||
PenguinView(
|
|
||||||
mainActivity,
|
|
||||||
100,
|
|
||||||
args,
|
|
||||||
flutterEngine.dartExecutor.binaryMessenger,
|
|
||||||
activity = mainActivity,
|
|
||||||
channel
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
result.notImplemented()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.PermissionManager
|
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.os.Build
|
|
||||||
|
|
||||||
object PermissionHelper {
|
|
||||||
|
|
||||||
fun getRequiredPermissions(): Array<String> {
|
|
||||||
val permissions = mutableListOf(
|
|
||||||
Manifest.permission.INTERNET,
|
|
||||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
|
||||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
|
||||||
Manifest.permission.ACCESS_NETWORK_STATE,
|
|
||||||
Manifest.permission.BLUETOOTH,
|
|
||||||
Manifest.permission.BLUETOOTH_ADMIN,
|
|
||||||
// Manifest.permission.ACTIVITY_RECOGNITION
|
|
||||||
)
|
|
||||||
|
|
||||||
// For Android 12 (API level 31) and above, add specific permissions
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // Android 12 (API 31) and above
|
|
||||||
permissions.add(Manifest.permission.BLUETOOTH_SCAN)
|
|
||||||
permissions.add(Manifest.permission.BLUETOOTH_CONNECT)
|
|
||||||
permissions.add(Manifest.permission.HIGH_SAMPLING_RATE_SENSORS)
|
|
||||||
}
|
|
||||||
|
|
||||||
return permissions.toTypedArray()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.PermissionManager
|
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.os.Build
|
|
||||||
import androidx.core.app.ActivityCompat
|
|
||||||
import androidx.core.content.ContextCompat
|
|
||||||
|
|
||||||
class PermissionManager(
|
|
||||||
private val context: Context,
|
|
||||||
val listener: PermissionListener,
|
|
||||||
private val requestCode: Int,
|
|
||||||
vararg permissions: String
|
|
||||||
) {
|
|
||||||
|
|
||||||
private val permissionsArray = permissions
|
|
||||||
|
|
||||||
interface PermissionListener {
|
|
||||||
fun onPermissionGranted()
|
|
||||||
fun onPermissionDenied()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun arePermissionsGranted(): Boolean {
|
|
||||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
permissionsArray.all {
|
|
||||||
ContextCompat.checkSelfPermission(context, it) == PackageManager.PERMISSION_GRANTED
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun requestPermissions(activity: Activity) {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
ActivityCompat.requestPermissions(activity, permissionsArray, requestCode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun handlePermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
|
|
||||||
if (this.requestCode == requestCode) {
|
|
||||||
val allGranted = grantResults.all { it == PackageManager.PERMISSION_GRANTED }
|
|
||||||
if (allGranted) {
|
|
||||||
listener.onPermissionGranted()
|
|
||||||
} else {
|
|
||||||
listener.onPermissionDenied()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.PermissionManager
|
|
||||||
|
|
||||||
// PermissionResultReceiver.kt
|
|
||||||
import android.content.BroadcastReceiver
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
|
|
||||||
class PermissionResultReceiver(
|
|
||||||
private val callback: (Boolean) -> Unit
|
|
||||||
) : BroadcastReceiver() {
|
|
||||||
override fun onReceive(context: Context?, intent: Intent?) {
|
|
||||||
val granted = intent?.getBooleanExtra("PERMISSION_GRANTED", false) ?: false
|
|
||||||
callback(granted)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* ---------------
|
|
||||||
* Note: Todo
|
|
||||||
* ---------------
|
|
||||||
* Need to be place in huawei_push (package com.huawei.hms.flutter.push.hms) and define in huawei_push manifest.xml
|
|
||||||
* */
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.huawei.hms.flutter.push.hms.FlutterHmsMessageService;
|
|
||||||
import com.huawei.hms.flutter.push.utils.ApplicationUtils;
|
|
||||||
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
//package com.huawei.hms.flutter.push.hms
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//import android.content.Context;
|
|
||||||
//import android.content.Intent;
|
|
||||||
//import android.content.SharedPreferences;
|
|
||||||
//
|
|
||||||
//import com.huawei.hms.flutter.push.hms.FlutterHmsMessageService;
|
|
||||||
//import com.huawei.hms.flutter.push.utils.ApplicationUtils;
|
|
||||||
//import com.huawei.hms.push.RemoteMessage;
|
|
||||||
//
|
|
||||||
//import org.json.JSONObject;
|
|
||||||
//
|
|
||||||
//public class CustomFlutterHmsMessageService extends FlutterHmsMessageService {
|
|
||||||
// @Override
|
|
||||||
// public void onMessageReceived(RemoteMessage remoteMessage) {
|
|
||||||
// super.onMessageReceived(remoteMessage);
|
|
||||||
// try {
|
|
||||||
// String jsonStr = remoteMessage.getData();
|
|
||||||
// JSONObject json_data = new JSONObject(jsonStr);
|
|
||||||
// JSONObject json_data_data = new JSONObject(json_data.getString("data"));
|
|
||||||
// if(json_data_data.getString("is_call").equalsIgnoreCase("true")){
|
|
||||||
// boolean isApplicationInForeground = ApplicationUtils.isApplicationInForeground(this);
|
|
||||||
// if(!isApplicationInForeground){
|
|
||||||
// SharedPreferences preferences = getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE);
|
|
||||||
// preferences.edit().putString("flutter.call_data", json_data.getString("data")).apply();
|
|
||||||
//
|
|
||||||
// Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
|
||||||
// intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
|
||||||
// startActivity(intent);
|
|
||||||
// Log.v("onMessageReceived", "startActivity(intent) called");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
package com.ejada.hmg.hmgwifi
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.Context
|
|
||||||
import android.net.ConnectivityManager
|
|
||||||
import android.net.Network
|
|
||||||
import android.net.NetworkCapabilities
|
|
||||||
import android.net.NetworkRequest
|
|
||||||
import android.net.wifi.*
|
|
||||||
import android.net.wifi.SupplicantState.ASSOCIATED
|
|
||||||
import android.net.wifi.SupplicantState.COMPLETED
|
|
||||||
import android.os.Build
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import com.ejada.hmg.MainActivity
|
|
||||||
import com.ejada.hmg.utils.HMGUtils
|
|
||||||
import java.security.cert.X509Certificate
|
|
||||||
|
|
||||||
class WpaEnterprise(private val mainActivity: MainActivity, private var SSID: String) {
|
|
||||||
private var TAG = "WpaEnterprise"
|
|
||||||
|
|
||||||
private lateinit var identity:String
|
|
||||||
private lateinit var password:String
|
|
||||||
private lateinit var completion:((status: Boolean, message: String) -> Unit)
|
|
||||||
|
|
||||||
fun connect(identity:String, password:String, completion: (status: Boolean, message: String) -> Unit) {
|
|
||||||
this.password = password
|
|
||||||
this.identity = identity
|
|
||||||
this.completion = completion
|
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){
|
|
||||||
apiGreaterThen28()
|
|
||||||
}else if(Build.VERSION.SDK_INT < Build.VERSION_CODES.Q){
|
|
||||||
apiLessThen29()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
fun apiLessThen29(){
|
|
||||||
val wifiManager = mainActivity.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
|
||||||
|
|
||||||
val wifi = WifiConfiguration()
|
|
||||||
wifi.SSID = """"$SSID""""
|
|
||||||
wifi.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP)
|
|
||||||
wifi.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X)
|
|
||||||
wifi.enterpriseConfig = enterpriseConfig()
|
|
||||||
wifi.networkId = ssidToNetworkId(wifi.SSID, wifiManager)
|
|
||||||
if (wifi.networkId == -1) {
|
|
||||||
wifiManager.addNetwork(wifi)
|
|
||||||
} else {
|
|
||||||
Log.v(TAG, "WiFi found - updating it.\n")
|
|
||||||
wifiManager.updateNetwork(wifi)
|
|
||||||
}
|
|
||||||
Log.v(TAG, "saving config.\n")
|
|
||||||
wifiManager.saveConfiguration()
|
|
||||||
wifi.networkId = ssidToNetworkId(wifi.SSID, wifiManager)
|
|
||||||
|
|
||||||
Log.v(TAG, "wifi ID in device = " + wifi.networkId)
|
|
||||||
|
|
||||||
var supState: SupplicantState
|
|
||||||
val networkIdToConnect = wifi.networkId
|
|
||||||
if (networkIdToConnect >= 0) {
|
|
||||||
Log.v(TAG, "Start connecting...\n")
|
|
||||||
|
|
||||||
// We disable the network before connecting, because if this was the last connection before
|
|
||||||
// a disconnect(), this will not reconnect.
|
|
||||||
wifiManager.disableNetwork(networkIdToConnect)
|
|
||||||
wifiManager.enableNetwork(networkIdToConnect, true)
|
|
||||||
|
|
||||||
val wifiInfo: WifiInfo = wifiManager.connectionInfo
|
|
||||||
|
|
||||||
HMGUtils.timer(5000,false){
|
|
||||||
supState = wifiInfo.supplicantState
|
|
||||||
Log.i(TAG, "Done connect to network : status = $supState")
|
|
||||||
val successStates = listOf(COMPLETED, ASSOCIATED)
|
|
||||||
if (successStates.contains(supState))
|
|
||||||
completion(true,"Connected to internet Wifi")
|
|
||||||
else
|
|
||||||
completion(false,"errorConnectingHmgNetwork")
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Log.v(TAG, "WifiWizard: cannot connect to network")
|
|
||||||
completion(false,"errorConnectingHmgNetwork")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method takes a given String, searches the current list of configured WiFi
|
|
||||||
* networks, and returns the networkId for the network if the SSID matches. If not,
|
|
||||||
* it returns -1.
|
|
||||||
*/
|
|
||||||
@SuppressLint("MissingPermission")
|
|
||||||
private fun ssidToNetworkId(ssid: String, wifiManager: WifiManager): Int {
|
|
||||||
val currentNetworks = wifiManager.configuredNetworks
|
|
||||||
var networkId = -1
|
|
||||||
// For each network in the list, compare the SSID with the given one
|
|
||||||
for (test in currentNetworks) {
|
|
||||||
if (test.SSID == ssid) {
|
|
||||||
networkId = test.networkId
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return networkId
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.Q)
|
|
||||||
fun apiGreaterThen28(){
|
|
||||||
val connectivityManager = mainActivity.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
|
||||||
|
|
||||||
Log.e(TAG, "connection wifi with Android Q+")
|
|
||||||
val wifiNetworkSpecifier: WifiNetworkSpecifier = WifiNetworkSpecifier.Builder()
|
|
||||||
.setSsid(SSID)
|
|
||||||
.setWpa2EnterpriseConfig(enterpriseConfig())
|
|
||||||
.build()
|
|
||||||
|
|
||||||
val networkRequest: NetworkRequest = NetworkRequest.Builder()
|
|
||||||
.addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
|
|
||||||
.setNetworkSpecifier(wifiNetworkSpecifier)
|
|
||||||
.removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) //removeCapability added for hotspots without internet
|
|
||||||
.build()
|
|
||||||
|
|
||||||
val networkCallback = object : ConnectivityManager.NetworkCallback() {
|
|
||||||
override fun onAvailable(network: Network) {
|
|
||||||
super.onAvailable(network)
|
|
||||||
connectivityManager.bindProcessToNetwork(network)
|
|
||||||
completion(true, "200")
|
|
||||||
Log.e(TAG, "onAvailable")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onLosing(network: Network, maxMsToLive: Int) {
|
|
||||||
super.onLosing(network, maxMsToLive)
|
|
||||||
Log.e(TAG, "onLosing")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onLost(network: Network) {
|
|
||||||
super.onLost(network)
|
|
||||||
Log.e(TAG, "onLosing")
|
|
||||||
Log.e(TAG, "losing active connection")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onUnavailable() {
|
|
||||||
super.onUnavailable()
|
|
||||||
completion(false, "401")
|
|
||||||
Log.e(TAG, "onUnavailable")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//timeout add because "No devices found" wasn't handled correct and doesn't throw Unavailable
|
|
||||||
connectivityManager.requestNetwork(networkRequest, networkCallback, 30000)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun enterpriseConfig() : WifiEnterpriseConfig{
|
|
||||||
// Initialize the WifiConfiguration object
|
|
||||||
val enterpriseConfig = WifiEnterpriseConfig()
|
|
||||||
enterpriseConfig.eapMethod = WifiEnterpriseConfig.Eap.PEAP
|
|
||||||
enterpriseConfig.identity = identity
|
|
||||||
enterpriseConfig.password = password
|
|
||||||
enterpriseConfig.phase2Method = WifiEnterpriseConfig.Phase2.NONE
|
|
||||||
// enterpriseConfig.caCertificates = WifiEnterpriseConfig.Phase2.
|
|
||||||
return enterpriseConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package com.ejada.hmg.opentok
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.FrameLayout
|
|
||||||
import android.widget.LinearLayout
|
|
||||||
import com.ejada.hmg.R
|
|
||||||
import io.flutter.plugin.common.StandardMessageCodec
|
|
||||||
import io.flutter.plugin.platform.PlatformView
|
|
||||||
import io.flutter.plugin.platform.PlatformViewFactory
|
|
||||||
|
|
||||||
class LocalVideoFactory : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private lateinit var view: LocalVideoPlatformView
|
|
||||||
|
|
||||||
fun getViewInstance(context: Context): LocalVideoPlatformView {
|
|
||||||
if(!this::view.isInitialized) {
|
|
||||||
view = LocalVideoPlatformView(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
return view
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun create(context: Context, viewId: Int, args: Any?): PlatformView {
|
|
||||||
return getViewInstance(context)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class LocalVideoPlatformView(context: Context) : PlatformView {
|
|
||||||
private val videoContainer: LocalVideoContainer = LocalVideoContainer(context)
|
|
||||||
|
|
||||||
val container get() = videoContainer.publisherContainer
|
|
||||||
|
|
||||||
override fun getView(): View {
|
|
||||||
return videoContainer
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun dispose() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
class LocalVideoContainer @JvmOverloads constructor(
|
|
||||||
context: Context,
|
|
||||||
attrs: AttributeSet? = null,
|
|
||||||
defStyle: Int = 0,
|
|
||||||
defStyleRes: Int = 0
|
|
||||||
) : LinearLayout(context, attrs, defStyle, defStyleRes) {
|
|
||||||
|
|
||||||
var publisherContainer: FrameLayout private set
|
|
||||||
|
|
||||||
init {
|
|
||||||
val view = LayoutInflater.from(context).inflate(R.layout.local_video, this, true)
|
|
||||||
publisherContainer = view.findViewById(R.id.publisher_container)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,181 +0,0 @@
|
|||||||
package com.ejada.hmg.opentok
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.os.Handler
|
|
||||||
import android.os.Looper
|
|
||||||
import android.util.Log
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import com.facebook.stetho.urlconnection.StethoURLConnectionManager
|
|
||||||
import com.opentok.android.*
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister
|
|
||||||
import io.flutter.plugin.common.MethodCall
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
|
|
||||||
|
|
||||||
enum class OpenTokSDKState {
|
|
||||||
LOGGED_OUT,
|
|
||||||
LOGGED_IN,
|
|
||||||
WAIT,
|
|
||||||
ERROR
|
|
||||||
}
|
|
||||||
|
|
||||||
class OpenTok(private var context: Context, private var flutterEngine: FlutterEngine){
|
|
||||||
private lateinit var remoteVideoPlatformView: RemoteVideoPlatformView
|
|
||||||
private lateinit var localVideoPlatformView: LocalVideoPlatformView
|
|
||||||
|
|
||||||
init {
|
|
||||||
remoteVideoPlatformView = RemoteVideoFactory.getViewInstance(context)
|
|
||||||
flutterEngine
|
|
||||||
.platformViewsController
|
|
||||||
.registry
|
|
||||||
.registerViewFactory("remote-video-container", RemoteVideoFactory())
|
|
||||||
|
|
||||||
localVideoPlatformView = LocalVideoFactory.getViewInstance(context)
|
|
||||||
flutterEngine
|
|
||||||
.platformViewsController
|
|
||||||
.registry
|
|
||||||
.registerViewFactory("local-video-container", LocalVideoFactory())
|
|
||||||
}
|
|
||||||
|
|
||||||
private var session: Session? = null
|
|
||||||
private var publisher: Publisher? = null
|
|
||||||
private var subscriber: Subscriber? = null
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private val sessionListener: Session.SessionListener = object: Session.SessionListener {
|
|
||||||
override fun onConnected(session: Session) {
|
|
||||||
// Connected to session
|
|
||||||
Log.d("MainActivity", "Connected to session ${session.sessionId}")
|
|
||||||
|
|
||||||
publisher = Publisher.Builder(context).build().apply {
|
|
||||||
setPublisherListener(publisherListener)
|
|
||||||
renderer?.setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL)
|
|
||||||
|
|
||||||
view.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
|
||||||
localVideoPlatformView.container.addView(view)
|
|
||||||
}
|
|
||||||
|
|
||||||
notifyFlutter(OpenTokSDKState.LOGGED_IN)
|
|
||||||
session.publish(publisher)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDisconnected(session: Session) {
|
|
||||||
notifyFlutter(OpenTokSDKState.LOGGED_OUT)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStreamReceived(session: Session, stream: Stream) {
|
|
||||||
Log.d(
|
|
||||||
"MainActivity",
|
|
||||||
"onStreamReceived: New Stream Received " + stream.streamId + " in session: " + session.sessionId
|
|
||||||
)
|
|
||||||
if (subscriber == null) {
|
|
||||||
subscriber = Subscriber.Builder(context, stream).build().apply {
|
|
||||||
renderer?.setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL)
|
|
||||||
setSubscriberListener(subscriberListener)
|
|
||||||
session.subscribe(this)
|
|
||||||
|
|
||||||
remoteVideoPlatformView.container.addView(view)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStreamDropped(session: Session, stream: Stream) {
|
|
||||||
Log.d(
|
|
||||||
"MainActivity",
|
|
||||||
"onStreamDropped: Stream Dropped: " + stream.streamId + " in session: " + session.sessionId
|
|
||||||
)
|
|
||||||
|
|
||||||
if (subscriber != null) {
|
|
||||||
subscriber = null
|
|
||||||
|
|
||||||
remoteVideoPlatformView.container.removeAllViews()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onError(session: Session, opentokError: OpentokError) {
|
|
||||||
Log.d("MainActivity", "Session error: " + opentokError.message)
|
|
||||||
notifyFlutter(OpenTokSDKState.ERROR)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private val publisherListener: PublisherKit.PublisherListener = object : PublisherKit.PublisherListener {
|
|
||||||
override fun onStreamCreated(publisherKit: PublisherKit, stream: Stream) {
|
|
||||||
Log.d("MainActivity", "onStreamCreated: Publisher Stream Created. Own stream " + stream.streamId)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStreamDestroyed(publisherKit: PublisherKit, stream: Stream) {
|
|
||||||
Log.d("MainActivity", "onStreamDestroyed: Publisher Stream Destroyed. Own stream " + stream.streamId)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onError(publisherKit: PublisherKit, opentokError: OpentokError) {
|
|
||||||
Log.d("MainActivity", "PublisherKit onError: " + opentokError.message)
|
|
||||||
notifyFlutter(OpenTokSDKState.ERROR)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var subscriberListener: SubscriberKit.SubscriberListener = object : SubscriberKit.SubscriberListener {
|
|
||||||
override fun onConnected(subscriberKit: SubscriberKit) {
|
|
||||||
Log.d("MainActivity", "onConnected: Subscriber connected. Stream: " + subscriberKit.stream.streamId)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDisconnected(subscriberKit: SubscriberKit) {
|
|
||||||
Log.d("MainActivity", "onDisconnected: Subscriber disconnected. Stream: " + subscriberKit.stream.streamId)
|
|
||||||
notifyFlutter(OpenTokSDKState.LOGGED_OUT)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onError(subscriberKit: SubscriberKit, opentokError: OpentokError) {
|
|
||||||
Log.d("MainActivity", "SubscriberKit onError: " + opentokError.message)
|
|
||||||
notifyFlutter(OpenTokSDKState.ERROR)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun initSession(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
|
|
||||||
val apiKey = requireNotNull(call.argument<String>("apiKey"))
|
|
||||||
val sessionId = requireNotNull(call.argument<String>("sessionId"))
|
|
||||||
val token = requireNotNull(call.argument<String>("token"))
|
|
||||||
|
|
||||||
notifyFlutter(OpenTokSDKState.WAIT)
|
|
||||||
session = Session.Builder(context, apiKey, sessionId).build()
|
|
||||||
session?.setSessionListener(sessionListener)
|
|
||||||
session?.connect(token)
|
|
||||||
result.success("")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun swapCamera(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
publisher?.cycleCamera()
|
|
||||||
result.success(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun toggleAudio(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
if (publisher != null) {
|
|
||||||
publisher?.publishAudio = !(publisher!!.publishAudio)
|
|
||||||
result.success(true)
|
|
||||||
}else{
|
|
||||||
result.success(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun toggleVideo(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
if (publisher != null) {
|
|
||||||
publisher?.publishVideo = !(publisher!!.publishVideo)
|
|
||||||
result.success(true)
|
|
||||||
}else{
|
|
||||||
result.success(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun hangupCall(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
session?.disconnect()
|
|
||||||
result.success(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun notifyFlutter(state: OpenTokSDKState) {
|
|
||||||
Handler(Looper.getMainLooper()).post {
|
|
||||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "OpenTok-Platform-Bridge")
|
|
||||||
.invokeMethod("updateState", state.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package com.ejada.hmg.opentok
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.FrameLayout
|
|
||||||
import android.widget.LinearLayout
|
|
||||||
import com.ejada.hmg.R
|
|
||||||
import io.flutter.plugin.common.StandardMessageCodec
|
|
||||||
import io.flutter.plugin.platform.PlatformView
|
|
||||||
import io.flutter.plugin.platform.PlatformViewFactory
|
|
||||||
|
|
||||||
class RemoteVideoFactory : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private lateinit var view: RemoteVideoPlatformView
|
|
||||||
|
|
||||||
fun getViewInstance(context: Context): RemoteVideoPlatformView {
|
|
||||||
if(!this::view.isInitialized) {
|
|
||||||
view = RemoteVideoPlatformView(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
return view
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun create(context: Context, viewId: Int, args: Any?): PlatformView {
|
|
||||||
return getViewInstance(context)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class RemoteVideoPlatformView(context: Context) : PlatformView {
|
|
||||||
private val videoContainer: RemoteVideoContainer = RemoteVideoContainer(context)
|
|
||||||
|
|
||||||
val container get() = videoContainer.subscriberContainer
|
|
||||||
|
|
||||||
override fun getView(): View {
|
|
||||||
return videoContainer
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun dispose() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
class RemoteVideoContainer @JvmOverloads constructor(
|
|
||||||
context: Context,
|
|
||||||
attrs: AttributeSet? = null,
|
|
||||||
defStyle: Int = 0,
|
|
||||||
defStyleRes: Int = 0
|
|
||||||
) : LinearLayout(context, attrs, defStyle, defStyleRes) {
|
|
||||||
|
|
||||||
var subscriberContainer: FrameLayout private set
|
|
||||||
|
|
||||||
init {
|
|
||||||
val view = LayoutInflater.from(context).inflate(R.layout.remote_video, this, true)
|
|
||||||
subscriberContainer = view.findViewById(R.id.subscriber_container)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.penguin
|
|
||||||
|
|
||||||
enum class PenguinMethod {
|
|
||||||
// initializePenguin("initializePenguin"),
|
|
||||||
// configurePenguin("configurePenguin"),
|
|
||||||
// showPenguinUI("showPenguinUI"),
|
|
||||||
// onPenNavUIDismiss("onPenNavUIDismiss"),
|
|
||||||
// onReportIssue("onReportIssue"),
|
|
||||||
// onPenNavSuccess("onPenNavSuccess"),
|
|
||||||
onPenNavInitializationError // onLocationOffCampus("onLocationOffCampus"),
|
|
||||||
// navigateToPOI("navigateToPOI"),
|
|
||||||
// openSharedLocation("openSharedLocation");
|
|
||||||
}
|
|
||||||
@ -1,97 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.penguin
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import com.google.gson.Gson
|
|
||||||
import com.peng.pennavmap.PlugAndPlaySDK
|
|
||||||
import com.peng.pennavmap.connections.ApiController
|
|
||||||
import com.peng.pennavmap.interfaces.RefIdDelegate
|
|
||||||
import com.peng.pennavmap.models.TokenModel
|
|
||||||
import com.peng.pennavmap.models.postmodels.PostToken
|
|
||||||
import com.peng.pennavmap.utils.AppSharedData
|
|
||||||
import okhttp3.ResponseBody
|
|
||||||
import retrofit2.Call
|
|
||||||
import retrofit2.Callback
|
|
||||||
import retrofit2.Response
|
|
||||||
import android.util.Log
|
|
||||||
|
|
||||||
|
|
||||||
class PenguinNavigator() {
|
|
||||||
|
|
||||||
fun navigateTo(mContext: Context, refID: String, delegate: RefIdDelegate,clientID : String,clientKey : String ) {
|
|
||||||
val postToken = PostToken(clientID, clientKey)
|
|
||||||
getToken(mContext, postToken, object : RefIdDelegate {
|
|
||||||
override fun onRefByIDSuccess(PoiId: String?) {
|
|
||||||
Log.e("navigateTo", "PoiId is+++++++ $PoiId")
|
|
||||||
|
|
||||||
PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate {
|
|
||||||
override fun onRefByIDSuccess(PoiId: String?) {
|
|
||||||
Log.e("navigateTo", "PoiId 2is+++++++ $PoiId")
|
|
||||||
|
|
||||||
delegate.onRefByIDSuccess(refID)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onGetByRefIDError(error: String?) {
|
|
||||||
delegate.onRefByIDSuccess(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onGetByRefIDError(error: String?) {
|
|
||||||
delegate.onRefByIDSuccess(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getToken(mContext: Context, postToken: PostToken?, apiTokenCallBack: RefIdDelegate) {
|
|
||||||
try {
|
|
||||||
// Create the API call
|
|
||||||
val purposesCall: Call<ResponseBody> = ApiController.getInstance(mContext)
|
|
||||||
.apiMethods
|
|
||||||
.getToken(postToken)
|
|
||||||
|
|
||||||
// Enqueue the call for asynchronous execution
|
|
||||||
purposesCall.enqueue(object : Callback<ResponseBody?> {
|
|
||||||
override fun onResponse(
|
|
||||||
call: Call<ResponseBody?>,
|
|
||||||
response: Response<ResponseBody?>
|
|
||||||
) {
|
|
||||||
if (response.isSuccessful() && response.body() != null) {
|
|
||||||
try {
|
|
||||||
response.body()?.use { responseBody ->
|
|
||||||
val responseBodyString: String = responseBody.string() // Use `string()` to get the actual response content
|
|
||||||
if (responseBodyString.isNotEmpty()) {
|
|
||||||
val tokenModel = Gson().fromJson(responseBodyString, TokenModel::class.java)
|
|
||||||
if (tokenModel != null && tokenModel.token != null) {
|
|
||||||
AppSharedData.apiToken = tokenModel.token
|
|
||||||
apiTokenCallBack.onRefByIDSuccess(tokenModel.token)
|
|
||||||
} else {
|
|
||||||
apiTokenCallBack.onGetByRefIDError("Failed to parse token model")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
apiTokenCallBack.onGetByRefIDError("Response body is empty")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
apiTokenCallBack.onGetByRefIDError("An error occurred: ${e.message}")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
apiTokenCallBack.onGetByRefIDError("Unsuccessful response: " + response.code())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFailure(call: Call<ResponseBody?>, t: Throwable) {
|
|
||||||
apiTokenCallBack.onGetByRefIDError(t.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (error: Exception) {
|
|
||||||
apiTokenCallBack.onGetByRefIDError("Exception during API call: $error")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,321 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.penguin
|
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Context.RECEIVER_EXPORTED
|
|
||||||
import android.content.IntentFilter
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.os.Build
|
|
||||||
import android.util.Log
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.RelativeLayout
|
|
||||||
import android.widget.Toast
|
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import com.cloud.diplomaticquarterapp.PermissionManager.PermissionHelper
|
|
||||||
import com.cloud.diplomaticquarterapp.PermissionManager.PermissionManager
|
|
||||||
import com.cloud.diplomaticquarterapp.PermissionManager.PermissionResultReceiver
|
|
||||||
import com.ejada.hmg.MainActivity
|
|
||||||
import com.peng.pennavmap.PlugAndPlayConfiguration
|
|
||||||
import com.peng.pennavmap.PlugAndPlaySDK
|
|
||||||
import com.peng.pennavmap.enums.InitializationErrorType
|
|
||||||
import com.peng.pennavmap.interfaces.PenNavUIDelegate
|
|
||||||
import com.peng.pennavmap.utils.Languages
|
|
||||||
import io.flutter.plugin.common.BinaryMessenger
|
|
||||||
import io.flutter.plugin.common.MethodCall
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
import io.flutter.plugin.platform.PlatformView
|
|
||||||
import com.cloud.diplomaticquarterapp.penguin.PenguinNavigator
|
|
||||||
import com.peng.pennavmap.interfaces.PIEventsDelegate
|
|
||||||
import com.peng.pennavmap.interfaces.PILocationDelegate
|
|
||||||
import com.peng.pennavmap.interfaces.RefIdDelegate
|
|
||||||
import com.peng.pennavmap.models.PIReportIssue
|
|
||||||
/**
|
|
||||||
* Custom PlatformView for displaying Penguin UI components within a Flutter app.
|
|
||||||
* Implements `PlatformView` for rendering the view, `MethodChannel.MethodCallHandler` for handling method calls,
|
|
||||||
* and `PenNavUIDelegate` for handling SDK events.
|
|
||||||
*/
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
internal class PenguinView(
|
|
||||||
context: Context,
|
|
||||||
id: Int,
|
|
||||||
val creationParams: Map<String, Any>,
|
|
||||||
messenger: BinaryMessenger,
|
|
||||||
activity: MainActivity,
|
|
||||||
val channel: MethodChannel
|
|
||||||
) : PlatformView, MethodChannel.MethodCallHandler, PenNavUIDelegate {
|
|
||||||
// The layout for displaying the Penguin UI
|
|
||||||
private val mapLayout: RelativeLayout = RelativeLayout(context)
|
|
||||||
private val _context: Context = context
|
|
||||||
|
|
||||||
private val permissionResultReceiver: PermissionResultReceiver
|
|
||||||
private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION")
|
|
||||||
|
|
||||||
private companion object {
|
|
||||||
const val PERMISSIONS_REQUEST_CODE = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
private lateinit var permissionManager: PermissionManager
|
|
||||||
|
|
||||||
// Reference to the main activity
|
|
||||||
private var _activity: Activity = activity
|
|
||||||
|
|
||||||
private lateinit var mContext: Context
|
|
||||||
|
|
||||||
lateinit var navigator: PenguinNavigator
|
|
||||||
|
|
||||||
init {
|
|
||||||
// Set layout parameters for the mapLayout
|
|
||||||
mapLayout.layoutParams = ViewGroup.LayoutParams(
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT
|
|
||||||
)
|
|
||||||
|
|
||||||
mContext = context
|
|
||||||
|
|
||||||
|
|
||||||
permissionResultReceiver = PermissionResultReceiver { granted ->
|
|
||||||
if (granted) {
|
|
||||||
onPermissionsGranted()
|
|
||||||
} else {
|
|
||||||
onPermissionsDenied()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
||||||
mContext.registerReceiver(
|
|
||||||
permissionResultReceiver,
|
|
||||||
permissionIntentFilter,
|
|
||||||
RECEIVER_EXPORTED
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
mContext.registerReceiver(
|
|
||||||
permissionResultReceiver,
|
|
||||||
permissionIntentFilter,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the background color of the layout
|
|
||||||
mapLayout.setBackgroundColor(Color.RED)
|
|
||||||
|
|
||||||
permissionManager = PermissionManager(
|
|
||||||
context = mContext,
|
|
||||||
listener = object : PermissionManager.PermissionListener {
|
|
||||||
override fun onPermissionGranted() {
|
|
||||||
// Handle permissions granted
|
|
||||||
onPermissionsGranted()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPermissionDenied() {
|
|
||||||
// Handle permissions denied
|
|
||||||
onPermissionsDenied()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
requestCode = PERMISSIONS_REQUEST_CODE,
|
|
||||||
*PermissionHelper.getRequiredPermissions()
|
|
||||||
)
|
|
||||||
|
|
||||||
if (!permissionManager.arePermissionsGranted()) {
|
|
||||||
permissionManager.requestPermissions(_activity)
|
|
||||||
} else {
|
|
||||||
// Permissions already granted
|
|
||||||
permissionManager.listener.onPermissionGranted()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun onPermissionsGranted() {
|
|
||||||
// Handle the actions when permissions are granted
|
|
||||||
Log.d("PermissionsResult", "onPermissionsGranted")
|
|
||||||
// Register the platform view factory for creating custom views
|
|
||||||
|
|
||||||
// Initialize the Penguin SDK
|
|
||||||
initPenguin()
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun onPermissionsDenied() {
|
|
||||||
// Handle the actions when permissions are denied
|
|
||||||
Log.d("PermissionsResult", "onPermissionsDenied")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the view associated with this PlatformView.
|
|
||||||
*
|
|
||||||
* @return The main view for this PlatformView.
|
|
||||||
*/
|
|
||||||
override fun getView(): View {
|
|
||||||
return mapLayout
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cleans up resources associated with this PlatformView.
|
|
||||||
*/
|
|
||||||
override fun dispose() {
|
|
||||||
// Cleanup code if needed
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles method calls from Dart code.
|
|
||||||
*
|
|
||||||
* @param call The method call from Dart.
|
|
||||||
* @param result The result callback to send responses back to Dart.
|
|
||||||
*/
|
|
||||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
|
||||||
// Handle method calls from Dart code here
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the Penguin SDK with custom configuration and delegates.
|
|
||||||
*/
|
|
||||||
private fun initPenguin() {
|
|
||||||
navigator = PenguinNavigator()
|
|
||||||
// Configure the PlugAndPlaySDK
|
|
||||||
val language = when (creationParams["languageCode"] as String) {
|
|
||||||
"ar" -> Languages.ar
|
|
||||||
"en" -> Languages.en
|
|
||||||
else -> {
|
|
||||||
Languages.en
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Log.d(
|
|
||||||
"TAG",
|
|
||||||
"initPenguin: ${Languages.getLanguageEnum(creationParams["languageCode"] as String)}"
|
|
||||||
)
|
|
||||||
PlugAndPlaySDK.configuration = PlugAndPlayConfiguration.Builder()
|
|
||||||
.setBaseUrl(
|
|
||||||
creationParams["dataURL"] as String,
|
|
||||||
creationParams["positionURL"] as String
|
|
||||||
)
|
|
||||||
.setServiceName(
|
|
||||||
creationParams["dataServiceName"] as String,
|
|
||||||
creationParams["positionServiceName"] as String
|
|
||||||
)
|
|
||||||
.setClientData(
|
|
||||||
creationParams["clientID"] as String,
|
|
||||||
creationParams["clientKey"] as String
|
|
||||||
)
|
|
||||||
.setUserName(creationParams["username"] as String)
|
|
||||||
// .setLanguageID(Languages.en)
|
|
||||||
.setLanguageID(language)
|
|
||||||
.setSimulationModeEnabled(creationParams["isSimulationModeEnabled"] as Boolean)
|
|
||||||
.setEnableBackButton(true)
|
|
||||||
// .setDeepLinkData("deeplink")
|
|
||||||
.setCustomizeColor("#2CA0AF")
|
|
||||||
.setDeepLinkSchema("")
|
|
||||||
.setIsEnableReportIssue(true)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
// Set location delegate to handle location updates
|
|
||||||
// PlugAndPlaySDK.setPiLocationDelegate {
|
|
||||||
// Example code to handle location updates
|
|
||||||
// Uncomment and modify as needed
|
|
||||||
// if (location.size() > 0)
|
|
||||||
// Toast.makeText(_context, "Location Info Latitude: ${location[0]}, Longitude: ${location[1]}", Toast.LENGTH_SHORT).show()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Set events delegate for reporting issues
|
|
||||||
// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() {
|
|
||||||
// @Override
|
|
||||||
// public void onReportIssue(PIReportIssue issue) {
|
|
||||||
// Log.e("Issue Reported: ", issue.getReportType());
|
|
||||||
// }
|
|
||||||
// // Implement issue reporting logic here }
|
|
||||||
// @Override
|
|
||||||
// public void onSharedLocation(String link) {
|
|
||||||
// // Implement Shared location logic here
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// Start the Penguin SDK
|
|
||||||
PlugAndPlaySDK.start(mContext, this)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigates to the specified reference ID.
|
|
||||||
*
|
|
||||||
* @param refID The reference ID to navigate to.
|
|
||||||
*/
|
|
||||||
fun navigateTo(refID: String) {
|
|
||||||
try {
|
|
||||||
if (refID.isBlank()) {
|
|
||||||
Log.e("navigateTo", "Invalid refID: The reference ID is blank.")
|
|
||||||
}
|
|
||||||
// referenceId = refID
|
|
||||||
navigator.navigateTo(mContext, refID,object : RefIdDelegate {
|
|
||||||
override fun onRefByIDSuccess(PoiId: String?) {
|
|
||||||
Log.e("navigateTo", "PoiId is penguin view+++++++ $PoiId")
|
|
||||||
|
|
||||||
// channelFlutter.invokeMethod(
|
|
||||||
// PenguinMethod.navigateToPOI.name,
|
|
||||||
// "navigateTo Success"
|
|
||||||
// )
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onGetByRefIDError(error: String?) {
|
|
||||||
Log.e("navigateTo", "error is penguin view+++++++ $error")
|
|
||||||
|
|
||||||
// channelFlutter.invokeMethod(
|
|
||||||
// PenguinMethod.navigateToPOI.name,
|
|
||||||
// "navigateTo Failed: Invalid refID"
|
|
||||||
// )
|
|
||||||
}
|
|
||||||
} , creationParams["clientID"] as String, creationParams["clientKey"] as String )
|
|
||||||
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e("navigateTo", "Exception occurred during navigation: ${e.message}", e)
|
|
||||||
// channelFlutter.invokeMethod(
|
|
||||||
// PenguinMethod.navigateToPOI.name,
|
|
||||||
// "Failed: Exception - ${e.message}"
|
|
||||||
// )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when Penguin UI setup is successful.
|
|
||||||
*
|
|
||||||
* @param warningCode Optional warning code received from the SDK.
|
|
||||||
*/
|
|
||||||
override fun onPenNavSuccess(warningCode: String?) {
|
|
||||||
val clinicId = creationParams["clinicID"] as String
|
|
||||||
|
|
||||||
if(clinicId.isEmpty()) return
|
|
||||||
|
|
||||||
navigateTo(clinicId)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when there is an initialization error with Penguin UI.
|
|
||||||
*
|
|
||||||
* @param description Description of the error.
|
|
||||||
* @param errorType Type of initialization error.
|
|
||||||
*/
|
|
||||||
override fun onPenNavInitializationError(
|
|
||||||
description: String?,
|
|
||||||
errorType: InitializationErrorType?
|
|
||||||
) {
|
|
||||||
val arguments: Map<String, Any?> = mapOf(
|
|
||||||
"description" to description,
|
|
||||||
"type" to errorType?.name
|
|
||||||
)
|
|
||||||
|
|
||||||
channel.invokeMethod(PenguinMethod.onPenNavInitializationError.name, arguments)
|
|
||||||
Toast.makeText(mContext, "Navigation Error: $description", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when Penguin UI is dismissed.
|
|
||||||
*/
|
|
||||||
override fun onPenNavUIDismiss() {
|
|
||||||
// Handle UI dismissal if needed
|
|
||||||
try {
|
|
||||||
mContext.unregisterReceiver(permissionResultReceiver)
|
|
||||||
dispose();
|
|
||||||
} catch (e: IllegalArgumentException) {
|
|
||||||
Log.e("PenguinView", "Receiver not registered: $e")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
package com.ejada.hmg.utils
|
|
||||||
|
|
||||||
import com.ejada.hmg.MainActivity
|
|
||||||
import com.ejada.hmg.opentok.OpenTok
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.plugin.common.MethodCall
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
|
|
||||||
class OpenTokPlatformBridge(private var flutterEngine: FlutterEngine, private var mainActivity: MainActivity) {
|
|
||||||
|
|
||||||
private lateinit var channel: MethodChannel
|
|
||||||
private lateinit var openTok: OpenTok
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val CHANNEL = "OpenTok-Platform-Bridge"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun create(){
|
|
||||||
openTok = OpenTok(mainActivity, flutterEngine)
|
|
||||||
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
|
||||||
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
|
|
||||||
when (call.method) {
|
|
||||||
"initSession" -> {
|
|
||||||
openTok.initSession(call, result)
|
|
||||||
}
|
|
||||||
"swapCamera" -> {
|
|
||||||
openTok.swapCamera(call, result)
|
|
||||||
}
|
|
||||||
"toggleAudio" -> {
|
|
||||||
openTok.toggleAudio(call, result)
|
|
||||||
}
|
|
||||||
"toggleVideo" -> {
|
|
||||||
openTok.toggleVideo(call, result)
|
|
||||||
}
|
|
||||||
"hangupCall" -> {
|
|
||||||
openTok.hangupCall(call, result)
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
result.notImplemented()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.cloud.diplomaticquarterapp.whatsapp;
|
|
||||||
|
|
||||||
import static java.sql.DriverManager.println;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.ContextWrapper;
|
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.content.pm.Signature;
|
|
||||||
import android.util.Base64;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class AppSignatureRetriever {
|
|
||||||
|
|
||||||
private static final String HASH_TYPE = "SHA-256";
|
|
||||||
public static final int NUM_HASHED_BYTES = 9;
|
|
||||||
public static final int NUM_BASE64_CHAR = 11;
|
|
||||||
|
|
||||||
|
|
||||||
public void logSignatures(Context context) {
|
|
||||||
Collection<String> appSignatures = getAppSignatures(context);
|
|
||||||
appSignatures.forEach(signature -> println("Signature: " + signature));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all the app signatures for the current package.
|
|
||||||
*
|
|
||||||
* @return signatures for current app
|
|
||||||
*/
|
|
||||||
public Collection<String> getAppSignatures(Context context) {
|
|
||||||
try {
|
|
||||||
// Get all package signatures for the current package
|
|
||||||
String packageName = context.getPackageName();
|
|
||||||
println("Package name: " + packageName);
|
|
||||||
PackageManager packageManager = context.getPackageManager();
|
|
||||||
Signature[] signatures = packageManager.getPackageInfo(packageName,
|
|
||||||
PackageManager.GET_SIGNATURES).signatures;
|
|
||||||
|
|
||||||
// For each signature create a compatible hash
|
|
||||||
Collection<String> appCodes = Arrays.stream(signatures)
|
|
||||||
.map(signature -> hash(packageName, signature.toCharsString()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
return appCodes;
|
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
|
||||||
println("Unable to find package to obtain hash.");
|
|
||||||
throw new RuntimeException("Unable to find package to obtain hash.", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String hash(String packageName, String signature) {
|
|
||||||
String appInfo = packageName + " " + signature;
|
|
||||||
try {
|
|
||||||
MessageDigest messageDigest = MessageDigest.getInstance(HASH_TYPE);
|
|
||||||
messageDigest.update(appInfo.getBytes(StandardCharsets.UTF_8));
|
|
||||||
byte[] hashSignature = messageDigest.digest();
|
|
||||||
|
|
||||||
// truncated into NUM_HASHED_BYTES
|
|
||||||
hashSignature = Arrays.copyOfRange(hashSignature, 0, NUM_HASHED_BYTES);
|
|
||||||
// encode into Base64
|
|
||||||
String base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING | Base64.NO_WRAP);
|
|
||||||
base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR);
|
|
||||||
|
|
||||||
println(String.format("pkg: %s -- hash: %s", packageName, base64Hash));
|
|
||||||
return base64Hash;
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
throw new RuntimeException("Unable to generate hash for application", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
package com.cloud.diplomaticquarterapp.whatsapp
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import com.whatsapp.otp.android.sdk.WhatsAppOtpHandler
|
|
||||||
import com.whatsapp.otp.android.sdk.WhatsAppOtpIncomingIntentHandler
|
|
||||||
import java.lang.ref.WeakReference
|
|
||||||
|
|
||||||
object WhatsApp {
|
|
||||||
val whatsAppOtpHandler = WhatsAppOtpHandler()
|
|
||||||
inline fun handleOTP ( intent: Intent, crossinline validateOTP:(code: String )-> Unit) =
|
|
||||||
WhatsAppOtpIncomingIntentHandler().processOtpCode(
|
|
||||||
intent,
|
|
||||||
// call your function to validate
|
|
||||||
{code -> validateOTP(code) },
|
|
||||||
{error,exception->
|
|
||||||
println("the error is ${error.name}")
|
|
||||||
println("the exception stacktrace is ${exception.message}")
|
|
||||||
println("the exception is cause ${exception.cause}")
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
fun performHandShake(context : WeakReference<Context>) = whatsAppOtpHandler.sendOtpIntentToWhatsApp(context.get()!!)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fun isWhatsAppInstalled(context : WeakReference<Context>) : Boolean = whatsAppOtpHandler.isWhatsAppInstalled(context.get()!!)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.whatsapp
|
|
||||||
import android.app.PendingIntent
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp
|
|
||||||
import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge
|
|
||||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
|
||||||
|
|
||||||
class WhatsAppCodeActivity : FlutterFragmentActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
WhatsApp.handleOTP(intent){code ->
|
|
||||||
WhatsAppOtpPlatformBridge.result?.success(code);
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package com.cloud.diplomaticquarterapp.whatsapp
|
|
||||||
|
|
||||||
import com.ejada.hmg.MainActivity
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.plugin.common.MethodCall
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
import java.lang.ref.WeakReference
|
|
||||||
|
|
||||||
class WhatsAppOtpPlatformBridge(
|
|
||||||
private var flutterEngine: FlutterEngine,
|
|
||||||
private var mainActivity: MainActivity
|
|
||||||
) {
|
|
||||||
|
|
||||||
|
|
||||||
private lateinit var channel: MethodChannel
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val CHANNEL = "whats_app_otp"
|
|
||||||
var result: MethodChannel.Result? = null
|
|
||||||
}
|
|
||||||
|
|
||||||
fun invoke() {
|
|
||||||
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
|
||||||
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
|
|
||||||
when (call.method) {
|
|
||||||
"isWhatsAppInstalled" -> {
|
|
||||||
val isAppInstalled =
|
|
||||||
WhatsApp.isWhatsAppInstalled(WeakReference(mainActivity))
|
|
||||||
result.success(isAppInstalled)
|
|
||||||
}
|
|
||||||
|
|
||||||
"performHandShake" -> {
|
|
||||||
WhatsApp.performHandShake(WeakReference(mainActivity))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
"startListening" -> {
|
|
||||||
WhatsAppOtpPlatformBridge.result = result
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
result.notImplemented()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
tools:context="com.cloud.diplomaticquarterapp.whatsapp.WhatsAppCodeActivity">
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:layout_gravity="center_horizontal">
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/publisher_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#FF9800" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:layout_gravity="center_horizontal">
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/subscriber_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#3F51B5" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="Remote"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
@ -1,8 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx4096m
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
#android.enableR8=true
|
android.enableR8=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.suppressUnsupportedCompileSdk=33
|
|
||||||
MAPBOX_USER_NAME = "mapbox"
|
|
||||||
MAPBOX_DOWNLOADS_TOKEN="sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
|
|
||||||
#MAPBOX_DOWNLOADS_TOKEN="pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
#Wed Jul 14 15:55:18 AST 2021
|
#Thu Sep 03 16:26:30 EEST 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"provider": "apple_pay",
|
|
||||||
"data": {
|
|
||||||
"merchantIdentifier": "merchant.com.hmgwebservices",
|
|
||||||
"displayName": "Sulaiman Al Habib",
|
|
||||||
"merchantCapabilities": [
|
|
||||||
"3DS",
|
|
||||||
"debit",
|
|
||||||
"credit"
|
|
||||||
],
|
|
||||||
"supportedNetworks": [
|
|
||||||
"amex",
|
|
||||||
"visa",
|
|
||||||
"discover",
|
|
||||||
"masterCard"
|
|
||||||
],
|
|
||||||
"countryCode": "SA",
|
|
||||||
"currencyCode": "SAR",
|
|
||||||
"requiredBillingContactFields": null,
|
|
||||||
"requiredShippingContactFields": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"provider": "apple_pay",
|
|
||||||
"data": {
|
|
||||||
"merchantIdentifier": "merchant.com.hmgwebservices",
|
|
||||||
"displayName": "Sulaiman Al Habib",
|
|
||||||
"merchantCapabilities": [
|
|
||||||
"3DS",
|
|
||||||
"debit",
|
|
||||||
"credit"
|
|
||||||
],
|
|
||||||
"supportedNetworks": [
|
|
||||||
"visa",
|
|
||||||
"masterCard",
|
|
||||||
"mada"
|
|
||||||
],
|
|
||||||
"countryCode": "SA",
|
|
||||||
"currencyCode": "SAR",
|
|
||||||
"requiredBillingContactFields": null,
|
|
||||||
"requiredShippingContactFields": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||