merge-requests/598/head
haroon amjad 4 years ago
parent 643763764d
commit 887303fcde

@ -27,6 +27,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
android {
compileSdkVersion 31
@ -55,7 +61,7 @@ android {
signingConfigs {
config{
storeFile file('key')
keyAlias 'HMG'
keyAlias 'hmg'
storePassword 'HmGsa123'
keyPassword 'HmGsa123'
}
@ -63,9 +69,11 @@ android {
buildTypes {
debug {
debuggable true
signingConfig signingConfigs.config
}
release {
debuggable false
signingConfig signingConfigs.config
minifyEnabled true
shrinkResources true

@ -24,4 +24,16 @@
-keep class io.flutter.plugins.** { *; }
-dontwarn io.flutter.embedding.**
-keep class com.huawei.hms.flutter.** { *; }
-repackageclasses
-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.** { *; }
-dontwarn com.opentok.android.**
-dontwarn com.opentok.otc.**

@ -1,4 +1,5 @@
<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.
@ -49,6 +50,7 @@
android:usesCleartextTraffic="true"
android:showOnLockScreen="true"
android:screenOrientation="sensorPortrait"
android:allowBackup="false"
android:label="Dr. Alhabib">
<meta-data android:name="push_kit_auto_init_enabled" android:value="true" />
@ -57,7 +59,10 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:showOnLockScreen="true"
android:theme="@style/LaunchTheme"
android:exported="true"
tools:node="merge"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
@ -85,29 +90,29 @@
</intent-filter>
</activity>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<!-- 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="true" />
<receiver android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true">
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" />
<receiver android:exported="true" android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true">
<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">
<receiver android:exported="true" android:name=".geofence.intent_receivers.LocationProviderChangeReceiver">
<intent-filter>
<action android:name="android.location.PROVIDERS_CHANGED"/>
</intent-filter>
</receiver>
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:permission="android.permission.BIND_JOB_SERVICE" />
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- Geofencing -->
<!--
@ -118,15 +123,15 @@
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">
<receiver android:exported="true" android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver">
<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="true" />
android:exported="true"
android:enabled="true" />
<receiver
android:name="com.huawei.hms.flutter.push.receiver.BackgroundMessageBroadcastReceiver"

@ -1,4 +1,9 @@
package com.ejada.hmg
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.ContentResolver
import android.media.AudioAttributes
import android.net.Uri
import android.os.Bundle
import android.util.Log
import android.os.Build
@ -19,15 +24,24 @@ class MainActivity: FlutterFragmentActivity() {
PlatformBridge(flutterEngine, this).create()
OpenTokPlatformBridge(flutterEngine, this).create()
val time = timeToMillis("04:00:00", "HH:mm:ss")
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH)
// val soundUri = Uri.parse("android.resource://" + getApplicationContext()
// .getPackageName() + "/" + R.raw.alert)
// System.out.println("soundUri");
// System.out.println("soundUri: $soundUri");
// System.out.println("soundUri : ${soundUri.path}");
// val att = AudioAttributes.Builder()
// .setUsage(AudioAttributes.USAGE_NOTIFICATION)
// .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
// .build();
// mChannel.setSound(soundUri , att)
// mChannel.description = "Video Call Notifications"
// val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
// notificationManager.createNotificationChannel(mChannel)
// }
// val d1 = Logs.list(this)
// val d2 = Logs.raw(this)
// val d3 = Logs.RegisterGeofence.list(this)
// val d4 = Logs.RegisterGeofence.raw(this)
// val d5 = Logs.GeofenceEvent.list(this)
// val d6 = Logs.GeofenceEvent.raw(this)
// val time = timeToMillis("04:00:00", "HH:mm:ss")
}

@ -145,6 +145,12 @@ class ShowChart extends StatelessWidget {
interval: _fetchLeftTileInterval(),
margin: 12,
),
topTitles: SideTitles(
showTitles: false
),
rightTitles: SideTitles(
showTitles: false
),
),
borderData: FlBorderData(
show: true,
@ -156,12 +162,12 @@ class ShowChart extends StatelessWidget {
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
// right: BorderSide(
// color: Colors.black,
// ),
// top: BorderSide(
// color: Colors.transparent,
// ),
),
),
minX: minX,

Loading…
Cancel
Save