Compare commits
5 Commits
main
...
live_activ
| Author | SHA1 | Date |
|---|---|---|
|
|
48dfddada9 | 2 weeks ago |
|
|
0fc057fd7d | 4 weeks ago |
|
|
5e93423dac | 4 weeks ago |
|
|
1f40644806 | 1 month ago |
|
|
e083cbc82b | 1 month ago |
@ -1,14 +0,0 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
.cxx/
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/to/reference-keystore
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
@ -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,188 +0,0 @@
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("com.google.gms.google-services") version "4.4.1" // Add the version here
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
id("com.huawei.agconnect")
|
||||
// id("com.mapbox.gradle.application")
|
||||
// id("com.mapbox.gradle.plugins.ndk")
|
||||
}
|
||||
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.ejada.hmg"
|
||||
compileSdk = 36
|
||||
ndkVersion = "28.2.13676358"
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.ejada.hmg"
|
||||
// minSdk = 24
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
compileSdk = 35
|
||||
// targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
multiDexEnabled = true
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
dataBinding = true
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
// getByName("main") {
|
||||
// java.srcDirs += "src/main/kotlin"
|
||||
// jniLibs.srcDir("src/main/libs")
|
||||
// jni.srcDirs = listOf() // disables automatic ndk-build
|
||||
// }
|
||||
getByName("main") {
|
||||
java.srcDir("src/main/kotlin")
|
||||
jniLibs.srcDir("src/main/libs")
|
||||
// To disable automatic ndk-build, do not set jni.srcDirs
|
||||
// If you need to clear jni.srcDirs:
|
||||
// set("jni.srcDirs", emptyList<String>())
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties.getProperty("keyAlias")
|
||||
keyPassword = keystoreProperties.getProperty("keyPassword")
|
||||
storeFile = keystoreProperties.getProperty("storeFile")?.let { file(it) }
|
||||
storePassword = keystoreProperties.getProperty("storePassword")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
isDebuggable = true
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
}
|
||||
getByName("release") {
|
||||
isDebuggable = false
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
create("staging") {
|
||||
matchingFallbacks += listOf("debug", "qa", "release")
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
pickFirsts += listOf(
|
||||
"lib/x86/libc++_shared.so",
|
||||
"lib/x86_64/libc++_shared.so",
|
||||
"lib/armeabi-v7a/libc++_shared.so",
|
||||
"lib/arm64-v8a/libc++_shared.so",
|
||||
"**/*.so"
|
||||
)
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
resources {
|
||||
excludes += listOf("META-INF/proguard/androidx-annotations.pro")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
// kotlinOptions {
|
||||
// jvmTarget = "17"
|
||||
// }
|
||||
|
||||
lint {
|
||||
disable += "MissingTranslation"
|
||||
checkReleaseBuilds = false
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20")
|
||||
implementation("com.google.firebase:firebase-messaging:24.1.2")
|
||||
implementation("pub.devrel:easypermissions:3.0.0")
|
||||
implementation("com.google.guava:guava:33.4.0-android")
|
||||
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"), "exclude" to listOf("bcprov-jdk16-1.46.jar"))))
|
||||
implementation("com.google.code.gson:gson:2.12.0")
|
||||
|
||||
// Zoom SDKs
|
||||
implementation("us.zoom.videosdk:zoomvideosdk-core:1.12.10")
|
||||
implementation("us.zoom.videosdk:zoomvideosdk-annotation:1.12.10")
|
||||
implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:1.12.10")
|
||||
|
||||
// Networking
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11")
|
||||
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.11")
|
||||
implementation("com.squareup.retrofit2:retrofit:2.11.0")
|
||||
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
|
||||
implementation("com.squareup.retrofit2:adapter-java8:2.11.0")
|
||||
|
||||
// Google Services
|
||||
implementation("com.google.android.gms:play-services-location:21.3.0")
|
||||
implementation("com.google.android.gms:play-services-basement:18.7.0")
|
||||
|
||||
implementation("com.android.volley:volley:1.2.1")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.9.0")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:2.9.0")
|
||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||
|
||||
// val room_version = "2.6.1"
|
||||
// implementation("androidx.room:room-runtime:$room_version")
|
||||
// annotationProcessor("androidx.room:room-compiler:$room_version")
|
||||
|
||||
implementation("net.zetetic:android-database-sqlcipher:4.5.4")
|
||||
implementation("com.intuit.ssp:ssp-android:1.1.0")
|
||||
implementation("com.intuit.sdp:sdp-android:1.1.0")
|
||||
|
||||
// implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
// annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
|
||||
|
||||
implementation("com.mapbox.maps:android:11.5.0")
|
||||
// implementation("com.mapbox.maps:android:11.4.0")
|
||||
|
||||
// AARs
|
||||
// implementation(files("libs/PenNavUI.aar"))
|
||||
// implementation(files("libs/Penguin.aar"))
|
||||
// implementation(files("libs/PenguinRenderer.aar"))
|
||||
|
||||
implementation("com.github.kittinunf.fuel:fuel:2.3.1")
|
||||
implementation("com.github.kittinunf.fuel:fuel-android:2.3.1")
|
||||
|
||||
// implementation("com.opentok.android:opentok-android-sdk:2.25.2")
|
||||
|
||||
// implementation("com.facebook.stetho:stetho:1.6.0")
|
||||
// implementation("com.facebook.stetho:stetho-urlconnection:1.6.0")
|
||||
|
||||
implementation("androidx.core:core-ktx:1.16.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
|
||||
implementation("pl.droidsonroids.gif:android-gif-drawable:1.2.25")
|
||||
|
||||
androidTestImplementation("androidx.test:core:1.6.1")
|
||||
implementation("com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||
// implementation(project(":vitalSignEngine"))
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "815750722565",
|
||||
"firebase_url": "https://api-project-815750722565.firebaseio.com",
|
||||
"project_id": "api-project-815750722565",
|
||||
"storage_bucket": "api-project-815750722565.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
|
||||
"android_client_info": {
|
||||
"package_name": "com.ejada.hmg"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDZDeWcBlRE3YfJWYt_DCiToVnANfaj8qg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "815750722565-0cq9366orvsk5ipivq6lijcj56u03fr7.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.void.demo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
-keep class tvi.webrtc.** { *; }
|
||||
-keep class com.twilio.video.** { *; }
|
||||
-keep class com.twilio.common.** { *; }
|
||||
-keepattributes InnerClasses
|
||||
|
||||
-keep class com.ejada.** { *; }
|
||||
-keep class org.webrtc.** { *; }
|
||||
|
||||
-keep class com.builttoroam.devicecalendar.** { *; }
|
||||
|
||||
-ignorewarnings
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes Signature
|
||||
-keep class com.hianalytics.android.**{*;}
|
||||
-keep class com.huawei.updatesdk.**{*;}
|
||||
-keep class com.huawei.hms.**{*;}
|
||||
|
||||
## Flutter wrapper
|
||||
-keep class io.flutter.app.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
-keep class io.flutter.util.** { *; }
|
||||
-keep class io.flutter.view.** { *; }
|
||||
-keep class io.flutter.** { *; }
|
||||
-keep class io.flutter.plugins.** { *; }
|
||||
-dontwarn io.flutter.embedding.**
|
||||
-keep class com.huawei.hms.flutter.** { *; }
|
||||
-repackageclasses
|
||||
|
||||
## Flutter WebRTC
|
||||
-keep class com.cloudwebrtc.webrtc.** { *; }
|
||||
-keep class org.webrtc.** { *; }
|
||||
|
||||
## Flutter OpenTok
|
||||
-keep class com.opentok.android.** { *; }
|
||||
-keep class com.opentok.otc.** { *; }
|
||||
-keep class org.otwebrtc.** { *; }
|
||||
|
||||
|
||||
##Flutter Zoom
|
||||
-keep class us.zoom**{
|
||||
*;
|
||||
}
|
||||
-keep interface us.zoom**{
|
||||
*;
|
||||
}
|
||||
-keep class org.webrtc**{
|
||||
*;
|
||||
}
|
||||
-keep class com.zipow**{
|
||||
*;
|
||||
}
|
||||
|
||||
-dontwarn com.opentok.android.**
|
||||
-dontwarn com.opentok.otc.**
|
||||
|
||||
-dontwarn penguin.com.pennav.Model.Navigation.NearLandmark
|
||||
|
||||
-keep,includedescriptorclasses class net.sqlcipher.** { *; }
|
||||
-keep,includedescriptorclasses interface net.sqlcipher.** { *; }
|
||||
|
||||
-keep class retrofit2.** { *; }
|
||||
-keep class okhttp3.** { *; }
|
||||
-dontwarn retrofit2.**
|
||||
|
||||
-keep class com.google.gson.** { *; }
|
||||
-dontwarn com.google.gson.**
|
||||
|
||||
# Penguin classes
|
||||
-keep class com.peng.pennavmap.models.** { *; }
|
||||
-keep class com.peng.pennavmap.db.** { *; }
|
||||
|
||||
-keep class com.hiennv.flutter_callkit_incoming.** { *; }
|
||||
-keepattributes Signature, Annotation, InnerClasses, EnclosingMethod
|
||||
@ -1,7 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@ -1,264 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.ejada.hmg">
|
||||
<!--
|
||||
io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
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
|
||||
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_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" tools:node="remove" />
|
||||
|
||||
<!-- Added by open_filex -->
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" tools:node="remove" />
|
||||
|
||||
<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_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<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.RECEIVE_BOOT_COMPLETED" />
|
||||
<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.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.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.READ_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.WRITE_CALENDAR" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
|
||||
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.location.network"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
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 -->
|
||||
<!-- <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
|
||||
android:foregroundServiceType="mediaPlayback|connectedDevice|dataSync"
|
||||
android:name=".Application"
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/ic_launcher_local"
|
||||
android:label="Dr. Alhabib"
|
||||
android:screenOrientation="sensorPortrait"
|
||||
android:showOnLockScreen="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:label">
|
||||
<activity
|
||||
android:name="com.cloud.hmg_patient_app.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
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:showOnLockScreen="true"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
tools:node="merge">
|
||||
|
||||
<!--
|
||||
Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI.
|
||||
-->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
<!--
|
||||
Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
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
|
||||
Flutter's first frame.
|
||||
-->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background" />
|
||||
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity> <!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true"> -->
|
||||
<!-- <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>-->
|
||||
<!-- <action android:name="android.intent.action.BOOT_COMPLETED" />-->
|
||||
<!-- <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>-->
|
||||
<!-- </receiver>-->
|
||||
|
||||
<!-- <service-->
|
||||
<!-- android:name=".geofence.intent_receivers.ReregisterGeofenceJobService"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:permission="android.permission.BIND_JOB_SERVICE" /> <!– Geofencing –>-->
|
||||
<!--
|
||||
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>-->
|
||||
<!-- <action android:name="android.intent.action.BOOT_COMPLETED" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
<!-- <receiver-->
|
||||
<!-- 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>-->
|
||||
<!-- <action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver> <!– Huawei Push Notifications –>-->
|
||||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
android:value="AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng" />
|
||||
<!--
|
||||
Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
|
||||
-->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -1,27 +0,0 @@
|
||||
//package com.cloud.diplomaticquarterapp
|
||||
package com.ejada.hmg
|
||||
|
||||
|
||||
import io.flutter.app.FlutterApplication
|
||||
|
||||
class Application : FlutterApplication() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
//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,6 +0,0 @@
|
||||
package com.ejada.hmg
|
||||
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
|
||||
class MainActivity : FlutterFragmentActivity()
|
||||
@ -0,0 +1,95 @@
|
||||
package com.ejada.hmg.live_activity
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content. Intent
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.widget.RemoteViews
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.drawable.IconCompat
|
||||
import com. example.live_activities.LiveActivityManager
|
||||
import com.ejada. hmg.MainActivity
|
||||
import com. ejada.hmg.R
|
||||
|
||||
class CustomLiveActivityManager(context: Context) :
|
||||
LiveActivityManager(context) {
|
||||
private val context: Context = context.applicationContext
|
||||
|
||||
private val pendingIntent = PendingIntent.getActivity(
|
||||
context, 200, Intent(context, MainActivity::class.java).apply {
|
||||
flags = Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
|
||||
}, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||
)
|
||||
|
||||
private val remoteViews = RemoteViews(
|
||||
context. packageName, R.layout.live_activity
|
||||
)
|
||||
|
||||
private val collapesView = RemoteViews(
|
||||
context.packageName, R.layout.live_activity_collapsed
|
||||
)
|
||||
|
||||
private suspend fun updateRemoteViews(data: Map<String, Any>) {
|
||||
val (background, textColor, containerBackground) = when (data["nextStepBackground"] as? Int) {
|
||||
0 -> Triple(R. drawable.grey_rounded_corner_widget, R.color.text_color, R.drawable.whitebg_yellow_border_rounded_corner_widget)
|
||||
1 -> Triple(R.drawable.dark_red_rounded_corner_widget, R.color.colorWhite, R.drawable.whitebg_red_border_rounded_corner_widget)
|
||||
2 -> Triple(R.drawable.green_rounded_corner_widget, R. color.colorWhite, R. drawable.whitebg_green_border_rounded_corner_widget)
|
||||
else -> Triple(R. drawable.grey_rounded_corner_widget, R.color.text_color, R.drawable.whitebg_yellow_border_rounded_corner_widget)
|
||||
}
|
||||
|
||||
remoteViews.setInt(R.id.nextStep, "setBackgroundResource", background)
|
||||
remoteViews.setInt(R.id.container, "setBackgroundResource", containerBackground)
|
||||
remoteViews.setTextColor(R.id.nextStep, ContextCompat.getColor(context, textColor))
|
||||
remoteViews.setTextViewText(R.id.countvalue, data["currentTicket"] as? String ?: "")
|
||||
remoteViews.setTextViewText(R.id.status, data["status"] as? String ?: "")
|
||||
remoteViews.setTextViewText(R. id.currentlyserving, data["currentlyServing"] as? String ?: "")
|
||||
remoteViews.setTextViewText(R.id.nextStep, data["nextStep"] as? String ?: "")
|
||||
}
|
||||
|
||||
private suspend fun updateCollapsedView(data: Map<String, Any>) {
|
||||
Log.d("updateCollapsedView", "current ticket is ${data["currentTicket"] as? String ?: ""}")
|
||||
|
||||
val containerBackground = when (data["nextStepBackground"] as? Int) {
|
||||
0 -> R.drawable.whitebg_yellow_border_rounded_corner_widget
|
||||
1 -> R. drawable.whitebg_red_border_rounded_corner_widget
|
||||
2 -> R.drawable. whitebg_green_border_rounded_corner_widget
|
||||
else -> R.drawable.whitebg_yellow_border_rounded_corner_widget
|
||||
}
|
||||
collapesView.setInt(R.id.container, "setBackgroundResource", containerBackground)
|
||||
collapesView.setTextViewText(R.id.countvalue_collapsed, data["currentTicket"] as? String ?: "")
|
||||
}
|
||||
|
||||
override suspend fun buildNotification(
|
||||
notification: Notification.Builder,
|
||||
event: String,
|
||||
data: Map<String, Any>
|
||||
): Notification {
|
||||
collapesView.apply {
|
||||
updateCollapsedView(data)
|
||||
}
|
||||
remoteViews.apply {
|
||||
updateRemoteViews(data)
|
||||
}
|
||||
|
||||
return notification
|
||||
.setSmallIcon(R.drawable.hmg)
|
||||
.setContentTitle(data["title"] as? String ?: "Patient Queue")
|
||||
.setContentIntent(pendingIntent)
|
||||
.setContentText(data["content"] as? String ?: "Patient Queue")
|
||||
.setStyle(Notification.DecoratedCustomViewStyle())
|
||||
.setCustomContentView(collapesView)
|
||||
.setCustomBigContentView(remoteViews)
|
||||
.setAutoCancel(false)
|
||||
.setOngoing(true)
|
||||
.setPriority(Notification.PRIORITY_LOW)
|
||||
.setCategory(Notification.CATEGORY_EVENT)
|
||||
.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="@color/red_color_text" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_4sdp" />
|
||||
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="@color/success_color" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_4sdp" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="@color/inactive_color" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_4sdp" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="34dp" android:viewportHeight="14" android:viewportWidth="14" android:width="34dp">
|
||||
|
||||
<path android:fillColor="#0B85F7" android:pathData="M3,0L11,0A3,3 0,0 1,14 3L14,11A3,3 0,0 1,11 14L3,14A3,3 0,0 1,0 11L0,3A3,3 0,0 1,3 0z"/>
|
||||
|
||||
<path android:fillColor="#ffffff" android:pathData="M2.548,11.447C2.548,11.447 2.985,11.444 3.292,11.444L5.624,11.455C5.903,11.455 6.134,11.163 6.147,10.742L6.15,8.822C6.15,8.413 6.336,8.093 6.624,8.074L7.339,8.069C7.627,8.086 7.825,8.41 7.825,8.817L7.823,10.747C7.836,11.168 8.03,11.443 8.31,11.443L11.449,11.452L11.455,9.079C11.455,8.671 11.255,8.354 10.965,8.335L9.704,8.329C9.425,8.329 9.206,8.039 9.194,7.617L9.189,6.976C9.203,6.554 9.423,6.265 9.703,6.265L10.971,6.269C11.259,6.25 11.446,5.915 11.446,5.508L11.45,2.546C11.346,2.713 11.204,2.854 11.036,2.958C10.867,3.062 10.676,3.126 10.478,3.144L8.346,3.142C8.068,3.142 7.836,3.441 7.823,3.862L7.823,5.764C7.81,6.184 7.592,6.481 7.313,6.481L6.668,6.476C6.388,6.476 6.164,6.189 6.152,5.77L6.153,3.847C6.141,3.426 5.919,3.143 5.64,3.143L2.546,3.145L2.546,5.51C2.546,5.919 2.739,6.246 3.028,6.265L4.296,6.259C4.583,6.278 4.786,6.615 4.786,7.021L4.782,7.569C4.782,7.977 4.586,8.304 4.298,8.322L3.028,8.319C2.739,8.339 2.545,8.661 2.545,9.069L2.548,11.447Z"/>
|
||||
|
||||
<path android:fillColor="#ffffff" android:pathData="M2.548,11.447C2.548,11.447 2.985,11.444 3.292,11.444L5.624,11.455C5.903,11.455 6.134,11.163 6.147,10.742L6.15,8.822C6.15,8.413 6.336,8.093 6.624,8.074L7.339,8.069C7.627,8.086 7.825,8.41 7.825,8.817L7.823,10.747C7.836,11.168 8.03,11.443 8.31,11.443L11.449,11.452L11.455,9.079C11.455,8.671 11.255,8.354 10.965,8.335L9.704,8.329C9.425,8.329 9.206,8.039 9.194,7.617L9.189,6.976C9.203,6.554 9.423,6.265 9.703,6.265L10.971,6.269C11.259,6.25 11.446,5.915 11.446,5.508L11.45,2.546C11.346,2.713 11.204,2.854 11.036,2.958C10.867,3.062 10.676,3.126 10.478,3.144L8.346,3.142C8.068,3.142 7.836,3.441 7.823,3.862L7.823,5.764C7.81,6.184 7.592,6.481 7.313,6.481L6.668,6.476C6.388,6.476 6.164,6.189 6.152,5.77L6.153,3.847C6.141,3.426 5.919,3.143 5.64,3.143L2.546,3.145L2.546,5.51C2.546,5.919 2.739,6.246 3.028,6.265L4.296,6.259C4.583,6.278 4.786,6.615 4.786,7.021L4.782,7.569C4.782,7.977 4.586,8.304 4.298,8.322L3.028,8.319C2.739,8.339 2.545,8.661 2.545,9.069L2.548,11.447Z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="14" android:viewportWidth="14" android:width="24dp">
|
||||
|
||||
<path android:fillColor="#ED1C2B" android:pathData="M3,0L11,0A3,3 0,0 1,14 3L14,11A3,3 0,0 1,11 14L3,14A3,3 0,0 1,0 11L0,3A3,3 0,0 1,3 0z"/>
|
||||
|
||||
<path android:fillColor="#ffffff" android:pathData="M2.548,11.447C2.548,11.447 2.985,11.444 3.292,11.444L5.624,11.455C5.903,11.455 6.134,11.163 6.147,10.742L6.15,8.822C6.15,8.413 6.336,8.093 6.624,8.074L7.339,8.069C7.627,8.086 7.825,8.41 7.825,8.817L7.823,10.747C7.836,11.168 8.03,11.443 8.31,11.443L11.449,11.452L11.455,9.079C11.455,8.671 11.255,8.354 10.965,8.335L9.704,8.329C9.425,8.329 9.206,8.039 9.194,7.617L9.189,6.976C9.203,6.554 9.423,6.265 9.703,6.265L10.971,6.269C11.259,6.25 11.446,5.915 11.446,5.508L11.45,2.546C11.346,2.713 11.204,2.854 11.036,2.958C10.867,3.062 10.676,3.126 10.478,3.144L8.346,3.142C8.068,3.142 7.836,3.441 7.823,3.862L7.823,5.764C7.81,6.184 7.592,6.481 7.313,6.481L6.668,6.476C6.388,6.476 6.164,6.189 6.152,5.77L6.153,3.847C6.141,3.426 5.919,3.143 5.64,3.143L2.546,3.145L2.546,5.51C2.546,5.919 2.739,6.246 3.028,6.265L4.296,6.259C4.583,6.278 4.786,6.615 4.786,7.021L4.782,7.569C4.782,7.977 4.586,8.304 4.298,8.322L3.028,8.319C2.739,8.339 2.545,8.661 2.545,9.069L2.548,11.447Z"/>
|
||||
|
||||
<path android:fillColor="#ffffff" android:pathData="M2.548,11.447C2.548,11.447 2.985,11.444 3.292,11.444L5.624,11.455C5.903,11.455 6.134,11.163 6.147,10.742L6.15,8.822C6.15,8.413 6.336,8.093 6.624,8.074L7.339,8.069C7.627,8.086 7.825,8.41 7.825,8.817L7.823,10.747C7.836,11.168 8.03,11.443 8.31,11.443L11.449,11.452L11.455,9.079C11.455,8.671 11.255,8.354 10.965,8.335L9.704,8.329C9.425,8.329 9.206,8.039 9.194,7.617L9.189,6.976C9.203,6.554 9.423,6.265 9.703,6.265L10.971,6.269C11.259,6.25 11.446,5.915 11.446,5.508L11.45,2.546C11.346,2.713 11.204,2.854 11.036,2.958C10.867,3.062 10.676,3.126 10.478,3.144L8.346,3.142C8.068,3.142 7.836,3.441 7.823,3.862L7.823,5.764C7.81,6.184 7.592,6.481 7.313,6.481L6.668,6.476C6.388,6.476 6.164,6.189 6.152,5.77L6.153,3.847C6.141,3.426 5.919,3.143 5.64,3.143L2.546,3.145L2.546,5.51C2.546,5.919 2.739,6.246 3.028,6.265L4.296,6.259C4.583,6.278 4.786,6.615 4.786,7.021L4.782,7.569C4.782,7.977 4.586,8.304 4.298,8.322L3.028,8.319C2.739,8.339 2.545,8.661 2.545,9.069L2.548,11.447Z"/>
|
||||
|
||||
</vector>
|
||||
|
After Width: | Height: | Size: 855 B |
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 1021 B |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="#1AED1C2B" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_4sdp" />
|
||||
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="#FFFF" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_8sdp" />
|
||||
|
||||
<stroke android:width="@dimen/_2sdp" android:color="@color/success_color"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="#FFFF" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_8sdp" />
|
||||
|
||||
<stroke android:width="@dimen/_2sdp" android:color="@color/red_color_text"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- Set the background color -->
|
||||
<solid android:color="#FFFF" />
|
||||
|
||||
<!-- Set the corner radius -->
|
||||
<corners android:radius="@dimen/_8sdp" />
|
||||
|
||||
<stroke android:width="@dimen/_2sdp" android:color="@color/yellow"/>
|
||||
|
||||
</shape>
|
||||
@ -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>
|
||||
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- 1. Changed root to a RemoteViews-compatible layout like RelativeLayout -->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/whitebg_red_border_rounded_corner_widget"
|
||||
android:padding="@dimen/_12sdp">
|
||||
<LinearLayout
|
||||
android:id="@+id/nextStep_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
<TextView
|
||||
android:id="@+id/countvalue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/nextStep_ll"
|
||||
android:layout_alignParentStart="true"
|
||||
android:paddingEnd="@dimen/_10sdp"
|
||||
android:text="it is a status"
|
||||
android:fontFamily="@font/poppins_medium"
|
||||
android:textColor="@color/black_text"
|
||||
android:gravity="top"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/hmg" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/currentlyserving_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Currently Serving:"
|
||||
android:textColor="@color/black_text"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/poppins_medium"
|
||||
|
||||
android:layout_below="@id/nextStep_ll"
|
||||
android:layout_alignParentStart="true"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/currentlyserving_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/currentlyserving_header"
|
||||
android:layout_alignParentStart="true"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/currentlyserving"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="it is a status"
|
||||
android:textColor="@color/black_text"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_vertical"
|
||||
android:fontFamily="@font/poppins_medium"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/red_rounded_corner_widget"
|
||||
android:paddingStart="@dimen/_10sdp"
|
||||
android:paddingTop="@dimen/_4sdp"
|
||||
android:paddingEnd="@dimen/_10sdp"
|
||||
android:paddingBottom="@dimen/_4sdp"
|
||||
android:text="it is a status"
|
||||
android:fontFamily="@font/poppins_medium"
|
||||
android:layout_gravity="end"
|
||||
android:textColor="@color/red_color_text" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextStep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/currentlyserving_ll"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@drawable/red_rounded_corner_widget"
|
||||
android:fontFamily="@font/poppins_medium"
|
||||
android:gravity="bottom"
|
||||
android:layout_marginTop="@dimen/_12sdp"
|
||||
android:paddingStart="@dimen/_10sdp"
|
||||
android:paddingTop="@dimen/_4sdp"
|
||||
android:paddingEnd="@dimen/_10sdp"
|
||||
android:paddingBottom="@dimen/_4sdp"
|
||||
android:text="it is a status" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 1. Changed root to a RemoteViews-compatible layout like RelativeLayout -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/container"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/_12sdp"
|
||||
android:background="@drawable/whitebg_red_border_rounded_corner_widget">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/countvalue_collapsed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/img"
|
||||
android:layout_alignBottom="@+id/img"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="it is a status"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black_text"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="@dimen/_34sdp"
|
||||
android:layout_height="@dimen/_34sdp"
|
||||
android:src="@drawable/hmg"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -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>
|
||||
|
Before Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:keep="@drawable/*,@raw/slow_spring_board" />
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="red_color_text">#ED1C2B</color>
|
||||
<color name="yellow">#FFAF15</color>
|
||||
<color name="success_color">#18C273</color>
|
||||
<color name="inactive_color">#332E3039</color>
|
||||
<color name="text_color">#A2A2A2</color>
|
||||
<color name="colorWhite">#FFFF</color>
|
||||
</resources>
|
||||
@ -1,3 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="mapbox_access_token" translatable="false" tools:ignore="UnusedResources">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>
|
||||
</resources>
|
||||
@ -1,23 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">HMG Patient App</string>
|
||||
|
||||
<string name="geofence_unknown_error">
|
||||
Unknown error: the Geofence service is not available now.
|
||||
</string>
|
||||
<string name="geofence_not_available">
|
||||
Geofence service is not available now. Go to Settings>Location>Mode and choose High accuracy.
|
||||
</string>
|
||||
<string name="geofence_too_many_geofences">
|
||||
Your app has registered too many geofences.
|
||||
</string>
|
||||
<string name="geofence_too_many_pending_intents">
|
||||
You have provided too many PendingIntents to the addGeofences() call.
|
||||
</string>
|
||||
<string name="GEOFENCE_INSUFFICIENT_LOCATION_PERMISSION">
|
||||
App do not have permission to access location service.
|
||||
</string>
|
||||
<string name="GEOFENCE_REQUEST_TOO_FREQUENT">
|
||||
Geofence requests happened too frequently.
|
||||
</string>
|
||||
<string name="mapbox_access_token" translatable="false">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>
|
||||
</resources>
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -1,7 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@ -1,104 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url = uri("https://developer.huawei.com/repo/") }
|
||||
maven {
|
||||
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
|
||||
credentials {
|
||||
username = "mapbox"
|
||||
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
|
||||
if (password.isNullOrEmpty()) {
|
||||
throw GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
|
||||
}
|
||||
}
|
||||
authentication {
|
||||
create<BasicAuthentication>("basic")
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.1.0")
|
||||
classpath("com.huawei.agconnect:agcp:1.9.1.304")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://developer.huawei.com/repo/") }
|
||||
maven { url = uri("https://artifactory.ess-dev.com/artifactory/gradle-dev-local") }
|
||||
maven {
|
||||
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
|
||||
credentials {
|
||||
username = "mapbox"
|
||||
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
|
||||
if (password.isNullOrEmpty()) {
|
||||
throw GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
|
||||
}
|
||||
}
|
||||
authentication {
|
||||
create<BasicAuthentication>("basic")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
exclude(group = "org.bouncycastle", module = "bcprov-jdk16")
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = JavaVersion.VERSION_21.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_21.toString()
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "21"
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
afterEvaluate {
|
||||
if (project.hasProperty("android")) {
|
||||
project.extensions.findByName("android")?.let { androidExt ->
|
||||
val android = androidExt as com.android.build.gradle.BaseExtension
|
||||
if (android.namespace == null) {
|
||||
android.namespace = project.group.toString()
|
||||
}
|
||||
android.buildFeatures.apply {
|
||||
if (buildConfig == null) {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
android.compileOptions.apply {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
}
|
||||
project.tasks.withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = JavaVersion.VERSION_21.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_21.toString()
|
||||
}
|
||||
project.tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "21"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = File("../build")
|
||||
subprojects {
|
||||
project.buildDir = File("${rootProject.buildDir}/${project.name}")
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "815750722565",
|
||||
"firebase_url": "https://api-project-815750722565.firebaseio.com",
|
||||
"project_id": "api-project-815750722565",
|
||||
"storage_bucket": "api-project-815750722565.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
|
||||
"android_client_info": {
|
||||
"package_name": "com.ejada.hmg"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDZDeWcBlRE3YfJWYt_DCiToVnANfaj8qg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "815750722565-0cq9366orvsk5ipivq6lijcj56u03fr7.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.void.demo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@ -1,5 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
|
||||
@ -1,25 +0,0 @@
|
||||
pluginManagement {
|
||||
val flutterSdkPath = run {
|
||||
val properties = java.util.Properties()
|
||||
file("local.properties").inputStream().use { properties.load(it) }
|
||||
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
||||
flutterSdkPath
|
||||
}
|
||||
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.7.3" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
@ -0,0 +1 @@
|
||||
this is a match
|
||||
@ -0,0 +1,16 @@
|
||||
//
|
||||
// AppWidgetBundle.swift
|
||||
// AppWidget
|
||||
//
|
||||
// Created by Cloud Solutions on 15/12/2025.
|
||||
//
|
||||
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct AppWidgetBundle: WidgetBundle {
|
||||
var body: some Widget {
|
||||
AppWidgetLiveActivity()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,601 @@
|
||||
//
|
||||
// AppWidgetLiveActivity.swift
|
||||
// AppWidget
|
||||
//
|
||||
// Created by Cloud Solutions on 15/12/2025.
|
||||
//
|
||||
|
||||
import ActivityKit
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
|
||||
public typealias LiveDeliveryData = ContentState // don't forget to add this line, otherwise, live activity will not display it.
|
||||
|
||||
public struct ContentState: Codable, Hashable { }
|
||||
|
||||
var id = UUID()
|
||||
}
|
||||
|
||||
|
||||
let sharedDefault = UserDefaults(suiteName: "group.alhabib.patientApp")!
|
||||
struct AppWidgetAttributes: ActivityAttributes {
|
||||
public struct ContentState: Codable, Hashable {
|
||||
// Dynamic stateful properties about your activity go here!
|
||||
var emoji: String
|
||||
}
|
||||
|
||||
// Fixed non-changing properties about your activity go here!
|
||||
var name: String
|
||||
}
|
||||
|
||||
extension Color {
|
||||
static let redColorText = Color(hex: "#ED1C2B")
|
||||
static let yellowColor = Color(hex: "#FFAF15")
|
||||
static let successColor = Color(hex: "#18C273")
|
||||
static let inactiveColor = Color(hex: "#ED1C2B")
|
||||
static let textColor = Color(hex: "#A2A2A2")
|
||||
static let colorWhite = Color(hex: "#FFFFFF")
|
||||
|
||||
// Helper initializer for hex colors
|
||||
init(hex: String) {
|
||||
let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
|
||||
var int: UInt64 = 0
|
||||
Scanner(string: hex).scanHexInt64(&int)
|
||||
let a, r, g, b: UInt64
|
||||
switch hex.count {
|
||||
case 3: // RGB (12-bit)
|
||||
(a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
|
||||
case 6: // RGB (24-bit)
|
||||
(a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
|
||||
case 8: // ARGB (32-bit)
|
||||
(a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
|
||||
default:
|
||||
(a, r, g, b) = (255, 0, 0, 0)
|
||||
}
|
||||
self.init(
|
||||
.sRGB,
|
||||
red: Double(r) / 255,
|
||||
green: Double(g) / 255,
|
||||
blue: Double(b) / 255,
|
||||
opacity: Double(a) / 255
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Widget Configuration based on nextStepBackground
|
||||
struct WidgetColorConfig {
|
||||
let nextStepBackground: Color
|
||||
let nextStepTextColor: Color
|
||||
let containerBorderColor: Color
|
||||
|
||||
static func config(for value: Int) -> WidgetColorConfig {
|
||||
switch value {
|
||||
case 0:
|
||||
return WidgetColorConfig(
|
||||
nextStepBackground: .inactiveColor,
|
||||
nextStepTextColor: .textColor,
|
||||
containerBorderColor: .yellowColor
|
||||
)
|
||||
case 1:
|
||||
return WidgetColorConfig(
|
||||
nextStepBackground: .redColorText,
|
||||
nextStepTextColor: .colorWhite,
|
||||
containerBorderColor: .redColorText
|
||||
)
|
||||
case 2:
|
||||
return WidgetColorConfig(
|
||||
nextStepBackground: .successColor,
|
||||
nextStepTextColor: .colorWhite,
|
||||
containerBorderColor: .successColor
|
||||
)
|
||||
default:
|
||||
return WidgetColorConfig(
|
||||
nextStepBackground: .inactiveColor,
|
||||
nextStepTextColor: .textColor,
|
||||
containerBorderColor: .yellowColor
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Widget Data Model
|
||||
struct NotificationWidgetData {
|
||||
let currentTicket: String
|
||||
let currentlyServingHeader: String
|
||||
let currentlyServing: String
|
||||
let status: String
|
||||
let nextStep: String
|
||||
let imageName: String
|
||||
let colorConfig: WidgetColorConfig
|
||||
}
|
||||
struct NotificationWidgetView: View {
|
||||
private let data: NotificationWidgetData
|
||||
|
||||
init(data: NotificationWidgetData) {
|
||||
self.data = data
|
||||
}
|
||||
|
||||
|
||||
var body : some View{
|
||||
// ZStack(){
|
||||
body2
|
||||
// .frame(width: .infinity, height: 400 )
|
||||
// .padding(.top, 340)
|
||||
// .cornerRadius(20)
|
||||
// }.background(data.colorConfig.containerBorderColor)
|
||||
// .cornerRadius(20)
|
||||
|
||||
}
|
||||
|
||||
var body2: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
// Top section with current ticket and image
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
// Current ticket value
|
||||
Text(data.currentTicket)
|
||||
.font(.custom("Poppins-Medium", size: 28))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.black)
|
||||
.padding(.trailing, 10)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
Image(data.imageName)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 34, height: 34)
|
||||
}
|
||||
.padding(.top, 16)
|
||||
.padding(.horizontal, 16)
|
||||
|
||||
// Currently Serving Header
|
||||
Text(data.currentlyServingHeader)
|
||||
.font(.custom("Poppins-Medium", size: 14))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.black)
|
||||
.padding(.trailing, 12)
|
||||
.padding(.bottom, 10)
|
||||
.padding(.horizontal, 16)
|
||||
|
||||
// Currently Serving section with status
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
// Currently serving text
|
||||
Text(data.currentlyServing)
|
||||
.font(.custom("Poppins-Medium", size: 16))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.black)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
// Status badge
|
||||
Text(data.status)
|
||||
.font(.custom("Poppins-Medium", size: 12))
|
||||
.foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 8)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(Color.inactiveColor.opacity(0.2))
|
||||
)
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
Spacer()
|
||||
// Next Step badge
|
||||
Text(data.nextStep)
|
||||
.font(.custom("Poppins-Medium", size: 12))
|
||||
.foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 8)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(data.colorConfig.nextStepBackground)
|
||||
)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 16)
|
||||
}
|
||||
.background(Color.black.opacity(0.01))
|
||||
.cornerRadius(20)
|
||||
|
||||
// .border(width: 10, edges: [.top, .bottom], color: data.colorConfig.containerBorderColor)
|
||||
// .border(width: 2, edges: [.leading, .trailing], color: data.colorConfig.containerBorderColor)
|
||||
// .overlay(
|
||||
// RoundedRectangle(cornerRadius: 20)
|
||||
// .stroke(data.colorConfig.containerBorderColor, lineWidth: 20)
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
func border(width: CGFloat, edges: [Edge], color: Color) -> some View {
|
||||
overlay(EdgeBorder(width: width, edges: edges).foregroundColor(color))
|
||||
.cornerRadius(20)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct EdgeBorder: Shape {
|
||||
var width: CGFloat
|
||||
var edges: [Edge]
|
||||
|
||||
func path(in rect: CGRect) -> Path {
|
||||
edges.map { edge -> Path in
|
||||
switch edge {
|
||||
case .top: return Path(.init(x: rect.minX, y: rect.minY, width: rect.width, height: width))
|
||||
case .bottom: return Path(.init(x: rect.minX, y: rect.maxY - width, width: rect.width, height: width))
|
||||
case .leading: return Path(.init(x: rect.minX, y: rect.minY, width: width, height: rect.height))
|
||||
case .trailing: return Path(.init(x: rect.maxX - width, y: rect.minY, width: width, height: rect.height))
|
||||
}
|
||||
}.reduce(into: Path()) { $0.addPath($1) }
|
||||
}
|
||||
}
|
||||
// MARK: - Main Widget View
|
||||
//working widget but the border is not appearing
|
||||
// struct NotificationWidgetView: View {
|
||||
// private let data: NotificationWidgetData
|
||||
//
|
||||
// init(data: NotificationWidgetData) {
|
||||
// self.data = data
|
||||
// }
|
||||
//
|
||||
// var body: some View {
|
||||
// VStack(alignment: .leading, spacing: 0) {
|
||||
//
|
||||
// VStack(alignment: .leading, spacing: 0) {
|
||||
// // Top section with current ticket and image
|
||||
// HStack(alignment: .top, spacing: 0) {
|
||||
// // Current ticket value
|
||||
// Text(data.currentTicket)
|
||||
// .font(.custom("Poppins-Medium", size: 28))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
// .padding(.trailing, 10)
|
||||
//
|
||||
// .frame(maxWidth: .infinity, alignment: .leading)
|
||||
//
|
||||
// Image(data.imageName)
|
||||
// .resizable()
|
||||
// .scaledToFit()
|
||||
// .frame(width: 34, height: 34)
|
||||
// }
|
||||
//
|
||||
// // Currently Serving Header
|
||||
// Text(data.currentlyServingHeader)
|
||||
// .font(.custom("Poppins-Medium", size: 14))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
// .padding(.trailing, 12)
|
||||
// .padding(.bottom, 10)
|
||||
//
|
||||
// // Currently Serving section with status
|
||||
// HStack(alignment: .center, spacing: 0) {
|
||||
// // Currently serving text
|
||||
// Text(data.currentlyServing)
|
||||
// .font(.custom("Poppins-Medium", size: 16))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
// .frame(maxWidth: .infinity, alignment: .leading)
|
||||
//
|
||||
// // Status badge
|
||||
// Text(data.status)
|
||||
// .font(.custom("Poppins-Medium", size: 12))
|
||||
// .foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
// .padding(.horizontal, 12)
|
||||
// .padding(.vertical, 8)
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 8)
|
||||
// .fill(Color.inactiveColor.opacity(0.2))
|
||||
// )
|
||||
// }
|
||||
//
|
||||
// // Next Step badge
|
||||
// Text(data.nextStep)
|
||||
// .font(.custom("Poppins-Medium", size: 12))
|
||||
// .foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
// .padding(.horizontal, 12)
|
||||
// .padding(.vertical, 8)
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 8)
|
||||
// .fill(data.colorConfig.nextStepBackground)
|
||||
// )
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }.padding()
|
||||
// .background( RoundedRectangle(cornerRadius: 20)
|
||||
//
|
||||
// .fill(Color.white)
|
||||
// )
|
||||
// // .border(data.colorConfig.containerBorderColor, width: 2)
|
||||
//
|
||||
// .overlay(
|
||||
// RoundedRectangle(cornerRadius: 20)
|
||||
// .stroke(data.colorConfig.containerBorderColor, lineWidth: 1)
|
||||
// // RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
// // .stroke(data.colorConfig.containerBorderColor, lineWidth: 5)
|
||||
// )
|
||||
//
|
||||
// // .padding(12)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// MARK: - Main Widget View
|
||||
// struct NotificationWidgetView: View {
|
||||
// private let data: NotificationWidgetData
|
||||
//
|
||||
// init(data: NotificationWidgetData) {
|
||||
// self.data = data
|
||||
// }
|
||||
//
|
||||
// var body: some View {
|
||||
// // Use a ZStack as the base to layer the background and content
|
||||
// ZStack {
|
||||
// // Layer 1: Glass effect background with border on all sides
|
||||
// RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
// .strokeBorder(data.colorConfig.containerBorderColor, lineWidth: 3)
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
//
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
// .fill(Color.white)
|
||||
// )
|
||||
// )
|
||||
// .shadow(color: Color.black.opacity(0.1), radius: 8, x: 0, y: 4)
|
||||
//
|
||||
//
|
||||
// // Layer 2: Your content, padded from the edges
|
||||
// VStack(alignment: .leading, spacing: 0) {
|
||||
// // Top section with current ticket and image
|
||||
// HStack(alignment: .top, spacing: 0) {
|
||||
// Text(data.currentTicket)
|
||||
// .font(.custom("Poppins-Medium", size: 28))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
// .padding(.trailing, 10)
|
||||
//
|
||||
// Spacer() // Pushes the image to the trailing edge
|
||||
//
|
||||
// Image(systemName: data.imageName)
|
||||
// .resizable()
|
||||
// .scaledToFit()
|
||||
// .frame(width: 24, height: 24)
|
||||
// .foregroundColor(.gray)
|
||||
// }
|
||||
//
|
||||
// // Currently Serving Header
|
||||
// Text(data.currentlyServingHeader)
|
||||
// .font(.custom("Poppins-Medium", size: 14))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
// .padding(.top, 4) // Adjusted padding
|
||||
// .padding(.bottom, 10)
|
||||
//
|
||||
// // Currently Serving section with status
|
||||
// HStack(alignment: .center, spacing: 0) {
|
||||
// Text(data.currentlyServing)
|
||||
// .font(.custom("Poppins-Medium", size: 16))
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(.black)
|
||||
//
|
||||
// Spacer() // Pushes status to the trailing edge
|
||||
//
|
||||
// Text(data.status)
|
||||
// .font(.custom("Poppins-Medium", size: 12))
|
||||
// .foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
// .padding(.horizontal, 12)
|
||||
// .padding(.vertical, 8)
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 8)
|
||||
// .fill(Color.inactiveColor.opacity(0.2))
|
||||
// )
|
||||
// }
|
||||
//
|
||||
// // Next Step badge
|
||||
// Text(data.nextStep)
|
||||
// .font(.custom("Poppins-Medium", size: 12))
|
||||
// .foregroundColor(data.colorConfig.nextStepTextColor)
|
||||
// .padding(.horizontal, 12)
|
||||
// .padding(.vertical, 8)
|
||||
// .background(
|
||||
// RoundedRectangle(cornerRadius: 8)
|
||||
// .fill(data.colorConfig.nextStepBackground)
|
||||
// )
|
||||
// .padding(.top, 10)
|
||||
//
|
||||
// // **CRITICAL FIX**: Pushes all content to the top
|
||||
// // and makes the VStack fill the available height.
|
||||
// Spacer(minLength: 0)
|
||||
// }
|
||||
// .padding(15) // Apply padding to the content VStack instead
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// MARK: - Live Activity Widget
|
||||
struct AppWidgetLiveActivity: Widget {
|
||||
|
||||
var body: some WidgetConfiguration {
|
||||
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
|
||||
// Extract parameters from Flutter
|
||||
let title = sharedDefault.string(forKey: context.attributes.prefixedKey("title")) ?? "test"
|
||||
let contentText = sharedDefault.string(forKey: context.attributes.prefixedKey("contentText")) ?? "test"
|
||||
let currentTicket = sharedDefault.string(forKey: context.attributes.prefixedKey("currentTicket")) ?? "test"
|
||||
let status = sharedDefault.string(forKey: context.attributes.prefixedKey("status")) ?? "test"
|
||||
let currentlyServing = sharedDefault.string(forKey: context.attributes.prefixedKey("currentlyServing")) ?? "test"
|
||||
let nextStep = sharedDefault.string(forKey: context.attributes.prefixedKey("nextStep")) ?? "test"
|
||||
let nextStepBackground = sharedDefault.integer(forKey: context.attributes.prefixedKey("nextStepBackground"))
|
||||
|
||||
// Get color configuration based on nextStepBackground
|
||||
let colorConfig = WidgetColorConfig.config(for: nextStepBackground)
|
||||
|
||||
// Create widget data
|
||||
let widgetData = NotificationWidgetData(
|
||||
currentTicket: currentTicket,
|
||||
currentlyServingHeader: "Currently Serving:",
|
||||
currentlyServing: currentlyServing,
|
||||
status: status,
|
||||
nextStep: nextStep,
|
||||
imageName:"hmg",
|
||||
colorConfig: colorConfig
|
||||
)
|
||||
|
||||
// Lock screen/banner UI
|
||||
NotificationWidgetView(data: widgetData)
|
||||
.activityBackgroundTint(Color.clear)
|
||||
.activitySystemActionForegroundColor(Color.black)
|
||||
|
||||
} dynamicIsland: { context in
|
||||
|
||||
let currentTicket = sharedDefault.string(forKey: context.attributes.prefixedKey("currentTicket")) ?? ""
|
||||
let status = sharedDefault.string(forKey: context.attributes.prefixedKey("status")) ?? ""
|
||||
let currentlyServing = sharedDefault.string(forKey: context.attributes.prefixedKey("currentlyServing")) ?? ""
|
||||
let nextStep = sharedDefault.string(forKey: context.attributes.prefixedKey("nextStep")) ?? ""
|
||||
let nextStepBackground = sharedDefault.integer(forKey: context.attributes.prefixedKey("nextStepBackground"))
|
||||
|
||||
let colorConfig = WidgetColorConfig.config(for: nextStepBackground)
|
||||
|
||||
return DynamicIsland {
|
||||
// Expanded UI
|
||||
DynamicIslandExpandedRegion(.leading) {
|
||||
VStack(alignment: .leading) {
|
||||
Text(currentTicket)
|
||||
.font(.system(size: 24, weight: .bold))
|
||||
.foregroundColor(.primary)
|
||||
}
|
||||
}
|
||||
|
||||
DynamicIslandExpandedRegion(.trailing) {
|
||||
Image("hmg")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 34, height: 34)
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
|
||||
DynamicIslandExpandedRegion(.center) {
|
||||
VStack(spacing: 4) {
|
||||
Text("Currently Serving:")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
Text(currentlyServing)
|
||||
.font(.caption)
|
||||
.fontWeight(.semibold)
|
||||
}
|
||||
}
|
||||
|
||||
DynamicIslandExpandedRegion(.bottom) {
|
||||
HStack {
|
||||
Text(status)
|
||||
.font(.caption2)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 4)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(colorConfig.nextStepBackground.opacity(0.2))
|
||||
)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(nextStep)
|
||||
.font(.caption2)
|
||||
.foregroundColor(colorConfig.nextStepTextColor)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 4)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(colorConfig.nextStepBackground)
|
||||
)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
|
||||
} compactLeading: {
|
||||
// Compact leading view
|
||||
Text(currentTicket)
|
||||
.font(.caption2)
|
||||
.fontWeight(.bold)
|
||||
} compactTrailing: {
|
||||
// Compact trailing view
|
||||
Image("hmg")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 12, height: 12)
|
||||
.foregroundColor(colorConfig.containerBorderColor).padding(4)
|
||||
} minimal: {
|
||||
// Minimal view
|
||||
HStack{
|
||||
Text(currentTicket)
|
||||
.font(.caption2)
|
||||
.fontWeight(.bold)
|
||||
Spacer()
|
||||
Image("hmg")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 4, height: 4)
|
||||
.foregroundColor(colorConfig.containerBorderColor)
|
||||
}.padding(2)
|
||||
|
||||
}
|
||||
.contentMargins(.all, 20,for: .expanded)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension LiveActivitiesAppAttributes {
|
||||
func prefixedKey(_ key: String) -> String {
|
||||
return "\(id)_\(key)"
|
||||
}
|
||||
}
|
||||
// MARK: - Preview for Testing
|
||||
struct NotificationWidgetView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
// Preview with nextStepBackground = 0 (Yellow border)
|
||||
NotificationWidgetView(
|
||||
data: NotificationWidgetData(
|
||||
currentTicket: "42",
|
||||
currentlyServingHeader: "Currently Serving:",
|
||||
currentlyServing: "Customer #15",
|
||||
status: "Pending",
|
||||
nextStep: "Next: Prepare Order",
|
||||
imageName: "bell.fill",
|
||||
colorConfig: .config(for: 0)
|
||||
)
|
||||
)
|
||||
.previewDisplayName("Yellow Border (0)")
|
||||
|
||||
// Preview with nextStepBackground = 1 (Red border)
|
||||
NotificationWidgetView(
|
||||
data: NotificationWidgetData(
|
||||
currentTicket: "89",
|
||||
currentlyServingHeader: "Currently Serving:",
|
||||
currentlyServing: "Customer #67",
|
||||
status: "Active",
|
||||
nextStep: "Next: Quality Check",
|
||||
imageName: "bell.fill",
|
||||
colorConfig: .config(for: 1)
|
||||
)
|
||||
)
|
||||
.previewDisplayName("Red Border (1)")
|
||||
|
||||
// Preview with nextStepBackground = 2 (Green border)
|
||||
NotificationWidgetView(
|
||||
data: NotificationWidgetData(
|
||||
currentTicket: "125",
|
||||
currentlyServingHeader: "Currently Serving:",
|
||||
currentlyServing: "Customer #98",
|
||||
status: "Completed",
|
||||
nextStep: "Next: Ready for Pickup",
|
||||
imageName: "bell.fill",
|
||||
colorConfig: .config(for: 2)
|
||||
)
|
||||
)
|
||||
.previewDisplayName("Green Border (2)")
|
||||
}
|
||||
.padding()
|
||||
.previewLayout(.sizeThatFits)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "hmg.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "hmg 1.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "hmg 2.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"preserves-vector-representation" : true
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="14" height="14" rx="3" fill="#ED1C2B"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="14" height="14" rx="3" fill="#ED1C2B"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="14" height="14" rx="3" fill="#ED1C2B"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
<path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,10 @@
|
||||
<?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>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.alhabib.patientApp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,258 +1,258 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_zoom_videosdk/flutter_zoom_view.dart' as FlutterZoomView;
|
||||
import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
|
||||
|
||||
const SHOW_TALKING_ICON_DURATION = 2000;
|
||||
|
||||
class VideoView extends FlutterZoomView.ZoomView {
|
||||
const VideoView({
|
||||
super.key,
|
||||
required super.user,
|
||||
required super.sharing,
|
||||
required super.preview,
|
||||
required super.focused,
|
||||
required super.hasMultiCamera,
|
||||
required super.multiCameraIndex,
|
||||
required super.videoAspect,
|
||||
required super.fullScreen,
|
||||
required super.resolution,
|
||||
required super.isPiPView,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var isVideoOn = useState(false);
|
||||
var isTalking = useState(false);
|
||||
var isMuted = useState(false);
|
||||
var isMounted = useIsMounted();
|
||||
var zoom = ZoomVideoSdk();
|
||||
var isSharing = useState(false);
|
||||
user?.audioStatus?.isMuted().then((muted) => isMuted.value = muted);
|
||||
|
||||
useEffect(() {
|
||||
updateVideoStatus() {
|
||||
if (user == null) return;
|
||||
Future<void>.microtask(() async {
|
||||
if (isMounted()) {
|
||||
isVideoOn.value = (await user!.videoStatus!.isOn());
|
||||
isSharing.value = sharing;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
resetAudioStatus() {
|
||||
isTalking.value = false;
|
||||
isMuted.value = false;
|
||||
}
|
||||
|
||||
updateAudioStatus() async {
|
||||
if (!isMounted()) return;
|
||||
var talking = await user?.audioStatus?.isTalking();
|
||||
var muted = await user?.audioStatus?.isMuted();
|
||||
isMuted.value = muted!;
|
||||
isTalking.value = talking!;
|
||||
if (talking) {
|
||||
Timer(
|
||||
const Duration(milliseconds: SHOW_TALKING_ICON_DURATION),
|
||||
() => {
|
||||
if (isMounted())
|
||||
{
|
||||
isTalking.value = false,
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updateVideoStatus();
|
||||
return null;
|
||||
}, [zoom, user]);
|
||||
|
||||
ImageIcon audioStatusIcon;
|
||||
if (isTalking.value) {
|
||||
audioStatusIcon = const ImageIcon(
|
||||
AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
);
|
||||
} else if (isMuted.value) {
|
||||
audioStatusIcon = const ImageIcon(
|
||||
AssetImage("assets/images/png/zoom/muted@2x.png"),
|
||||
);
|
||||
}
|
||||
// Pass parameters to the platform side.
|
||||
final Map<String, dynamic> creationParams = <String, dynamic>{};
|
||||
creationParams.putIfAbsent("userId", () => user?.userId);
|
||||
creationParams.putIfAbsent("sharing", () => sharing);
|
||||
creationParams.putIfAbsent("preview", () => preview);
|
||||
creationParams.putIfAbsent("focused", () => focused);
|
||||
creationParams.putIfAbsent("hasMultiCamera", () => hasMultiCamera);
|
||||
if (videoAspect.isEmpty) {
|
||||
creationParams.putIfAbsent("videoAspect", () => VideoAspect.PanAndScan);
|
||||
} else {
|
||||
creationParams.putIfAbsent("videoAspect", () => videoAspect);
|
||||
}
|
||||
creationParams.putIfAbsent("fullScreen", () => fullScreen);
|
||||
if (resolution.isNotEmpty) {
|
||||
creationParams.putIfAbsent("videoAspect", () => videoAspect);
|
||||
}
|
||||
|
||||
if (fullScreen) {
|
||||
if (sharing) {
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
alignment: Alignment.center,
|
||||
child: FlutterZoomView.View(creationParams: creationParams),
|
||||
);
|
||||
} else if (isVideoOn.value) {
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
alignment: Alignment.center,
|
||||
child: FlutterZoomView.View(creationParams: creationParams),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 0),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: const Image(
|
||||
image: AssetImage("assets/images/png/zoom/default-avatar.png"),
|
||||
)),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (isVideoOn.value || sharing) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
height: 110,
|
||||
width: 110,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 110,
|
||||
width: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff232323),
|
||||
border: Border.all(
|
||||
color: const Color(0xff666666),
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: FlutterZoomView.View(creationParams: creationParams),
|
||||
),
|
||||
Container(
|
||||
height: 110,
|
||||
width: 110,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 110,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.black26,
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomLeft,
|
||||
margin: const EdgeInsets.only(left: 5),
|
||||
child: Text(
|
||||
user!.userName,
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
margin: const EdgeInsets.only(right: 5, bottom: 5),
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
child: Image(
|
||||
height: 12,
|
||||
width: 12,
|
||||
image: isMuted.value ? const AssetImage("assets/images/png/zoom/muted@2x.png") : const AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
height: 110,
|
||||
width: 110,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 110,
|
||||
width: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff232323),
|
||||
border: Border.all(
|
||||
color: const Color(0xff666666),
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: const Image(
|
||||
height: 60,
|
||||
width: 60,
|
||||
image: AssetImage("assets/images/png/zoom/default-avatar.png"),
|
||||
)),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 110,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.black26,
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomLeft,
|
||||
margin: const EdgeInsets.only(left: 5),
|
||||
child: Text(
|
||||
user!.userName,
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
margin: const EdgeInsets.only(right: 5, bottom: 5),
|
||||
child: Image(
|
||||
height: 12,
|
||||
width: 12,
|
||||
image: isMuted.value ? const AssetImage("assets/images/png/zoom/muted@2x.png") : const AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// import 'dart:async';
|
||||
//
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
// import 'package:flutter_zoom_videosdk/flutter_zoom_view.dart' as FlutterZoomView;
|
||||
// import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
|
||||
//
|
||||
// const SHOW_TALKING_ICON_DURATION = 2000;
|
||||
//
|
||||
// class VideoView extends FlutterZoomView.ZoomView {
|
||||
// const VideoView({
|
||||
// super.key,
|
||||
// required super.user,
|
||||
// required super.sharing,
|
||||
// required super.preview,
|
||||
// required super.focused,
|
||||
// required super.hasMultiCamera,
|
||||
// required super.multiCameraIndex,
|
||||
// required super.videoAspect,
|
||||
// required super.fullScreen,
|
||||
// required super.resolution,
|
||||
// required super.isPiPView,
|
||||
// });
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// var isVideoOn = useState(false);
|
||||
// var isTalking = useState(false);
|
||||
// var isMuted = useState(false);
|
||||
// var isMounted = useIsMounted();
|
||||
// var zoom = ZoomVideoSdk();
|
||||
// var isSharing = useState(false);
|
||||
// user?.audioStatus?.isMuted().then((muted) => isMuted.value = muted);
|
||||
//
|
||||
// useEffect(() {
|
||||
// updateVideoStatus() {
|
||||
// if (user == null) return;
|
||||
// Future<void>.microtask(() async {
|
||||
// if (isMounted()) {
|
||||
// isVideoOn.value = (await user!.videoStatus!.isOn());
|
||||
// isSharing.value = sharing;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// resetAudioStatus() {
|
||||
// isTalking.value = false;
|
||||
// isMuted.value = false;
|
||||
// }
|
||||
//
|
||||
// updateAudioStatus() async {
|
||||
// if (!isMounted()) return;
|
||||
// var talking = await user?.audioStatus?.isTalking();
|
||||
// var muted = await user?.audioStatus?.isMuted();
|
||||
// isMuted.value = muted!;
|
||||
// isTalking.value = talking!;
|
||||
// if (talking) {
|
||||
// Timer(
|
||||
// const Duration(milliseconds: SHOW_TALKING_ICON_DURATION),
|
||||
// () => {
|
||||
// if (isMounted())
|
||||
// {
|
||||
// isTalking.value = false,
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// updateVideoStatus();
|
||||
// return null;
|
||||
// }, [zoom, user]);
|
||||
//
|
||||
// ImageIcon audioStatusIcon;
|
||||
// if (isTalking.value) {
|
||||
// audioStatusIcon = const ImageIcon(
|
||||
// AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
// );
|
||||
// } else if (isMuted.value) {
|
||||
// audioStatusIcon = const ImageIcon(
|
||||
// AssetImage("assets/images/png/zoom/muted@2x.png"),
|
||||
// );
|
||||
// }
|
||||
// // Pass parameters to the platform side.
|
||||
// final Map<String, dynamic> creationParams = <String, dynamic>{};
|
||||
// creationParams.putIfAbsent("userId", () => user?.userId);
|
||||
// creationParams.putIfAbsent("sharing", () => sharing);
|
||||
// creationParams.putIfAbsent("preview", () => preview);
|
||||
// creationParams.putIfAbsent("focused", () => focused);
|
||||
// creationParams.putIfAbsent("hasMultiCamera", () => hasMultiCamera);
|
||||
// if (videoAspect.isEmpty) {
|
||||
// creationParams.putIfAbsent("videoAspect", () => VideoAspect.PanAndScan);
|
||||
// } else {
|
||||
// creationParams.putIfAbsent("videoAspect", () => videoAspect);
|
||||
// }
|
||||
// creationParams.putIfAbsent("fullScreen", () => fullScreen);
|
||||
// if (resolution.isNotEmpty) {
|
||||
// creationParams.putIfAbsent("videoAspect", () => videoAspect);
|
||||
// }
|
||||
//
|
||||
// if (fullScreen) {
|
||||
// if (sharing) {
|
||||
// return Container(
|
||||
// height: MediaQuery.of(context).size.height,
|
||||
// width: MediaQuery.of(context).size.width,
|
||||
// alignment: Alignment.center,
|
||||
// child: FlutterZoomView.View(creationParams: creationParams),
|
||||
// );
|
||||
// } else if (isVideoOn.value) {
|
||||
// return Container(
|
||||
// height: MediaQuery.of(context).size.height,
|
||||
// width: MediaQuery.of(context).size.width,
|
||||
// alignment: Alignment.center,
|
||||
// child: FlutterZoomView.View(creationParams: creationParams),
|
||||
// );
|
||||
// } else {
|
||||
// return Container(
|
||||
// margin: const EdgeInsets.symmetric(vertical: 0),
|
||||
// child: Container(
|
||||
// alignment: Alignment.center,
|
||||
// child: const Image(
|
||||
// image: AssetImage("assets/images/png/zoom/default-avatar.png"),
|
||||
// )),
|
||||
// );
|
||||
// }
|
||||
// } else {
|
||||
// if (isVideoOn.value || sharing) {
|
||||
// return Container(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
// decoration: BoxDecoration(
|
||||
// color: const Color(0xff232323),
|
||||
// border: Border.all(
|
||||
// color: const Color(0xff666666),
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
// ),
|
||||
// alignment: Alignment.center,
|
||||
// child: FlutterZoomView.View(creationParams: creationParams),
|
||||
// ),
|
||||
// Container(
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
// decoration: const BoxDecoration(
|
||||
// borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// child: Container(
|
||||
// height: 20,
|
||||
// width: 110,
|
||||
// decoration: const BoxDecoration(
|
||||
// color: Colors.black26,
|
||||
// borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// alignment: Alignment.bottomLeft,
|
||||
// margin: const EdgeInsets.only(left: 5),
|
||||
// child: Text(
|
||||
// user!.userName,
|
||||
// textAlign: TextAlign.left,
|
||||
// style: const TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// alignment: Alignment.bottomRight,
|
||||
// margin: const EdgeInsets.only(right: 5, bottom: 5),
|
||||
// // height: 110,
|
||||
// // width: 110,
|
||||
// child: Image(
|
||||
// height: 12,
|
||||
// width: 12,
|
||||
// image: isMuted.value ? const AssetImage("assets/images/png/zoom/muted@2x.png") : const AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// } else {
|
||||
// return Container(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 110,
|
||||
// width: 110,
|
||||
// decoration: BoxDecoration(
|
||||
// color: const Color(0xff232323),
|
||||
// border: Border.all(
|
||||
// color: const Color(0xff666666),
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
// ),
|
||||
// alignment: Alignment.center,
|
||||
// child: Container(
|
||||
// alignment: Alignment.center,
|
||||
// child: const Image(
|
||||
// height: 60,
|
||||
// width: 60,
|
||||
// image: AssetImage("assets/images/png/zoom/default-avatar.png"),
|
||||
// )),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// child: Container(
|
||||
// height: 20,
|
||||
// width: 110,
|
||||
// decoration: const BoxDecoration(
|
||||
// color: Colors.black26,
|
||||
// borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// alignment: Alignment.bottomLeft,
|
||||
// margin: const EdgeInsets.only(left: 5),
|
||||
// child: Text(
|
||||
// user!.userName,
|
||||
// textAlign: TextAlign.left,
|
||||
// style: const TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// alignment: Alignment.bottomRight,
|
||||
// margin: const EdgeInsets.only(right: 5, bottom: 5),
|
||||
// child: Image(
|
||||
// height: 12,
|
||||
// width: 12,
|
||||
// image: isMuted.value ? const AssetImage("assets/images/png/zoom/muted@2x.png") : const AssetImage("assets/images/png/zoom/talking@2x.png"),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||