diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts
index 8de622b0..b2f97ee4 100644
--- a/Mohem/src/app/home/attendance-options/attendance-options.component.ts
+++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts
@@ -19,7 +19,9 @@ import { DevicePermissionsService } from 'src/app/hmg-common/services/device-per
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
+import { HMGUtils } from 'src/app/hmg-common/hmg_utils';
+declare var cordova: any;
@Component({
selector: "app-attendance-options",
@@ -47,6 +49,7 @@ export class AttendanceOptionsComponent implements OnInit {
public firebasex: FirebaseX
public isDocumentAvailable = false;
public document: any;
+ public check: any;
constructor(
@@ -63,7 +66,8 @@ export class AttendanceOptionsComponent implements OnInit {
private openNativeSettings: OpenNativeSettings,
private devicePermissionsService:DevicePermissionsService,
private geolocation: Geolocation,
- public backgroundGeolocation: BackgroundGeolocation
+ public backgroundGeolocation: BackgroundGeolocation,
+ public hmgUtils: HMGUtils
) {}
ngOnInit() {
@@ -76,6 +80,22 @@ export class AttendanceOptionsComponent implements OnInit {
this.priviligeList = AuthenticationService.servicePrivilage;
this.setServicesPrivilage();
this.checkNFCStatus("one");
+ this.test();
+ }
+
+ async test () {
+ const test = await this.hmgUtils.isHuaweiDevice();
+ if (test) {
+ this.check = 'this device is huawei device :' + test;
+ console.log('this device is huawei device :' + test);
+ } else {
+ this.check = 'this device is not huawei device :' + test;
+ console.log('this device is non-huawei device :' + test);
+ }
+
+ this.hmgUtils.getCurrentLocation((data) => {
+ console.log(data);
+ });
}
public checkFirebaseDocument() {
diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html
index 7b87ba62..96b8ea1b 100644
--- a/Mohem/src/app/profile/home/home.component.html
+++ b/Mohem/src/app/profile/home/home.component.html
@@ -142,7 +142,7 @@
-
+
diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss
index 8ea8bfd1..97bbfbb6 100644
--- a/Mohem/src/app/profile/home/home.component.scss
+++ b/Mohem/src/app/profile/home/home.component.scss
@@ -1209,6 +1209,8 @@ $actionBtnSize: 36px;
height: 35px;
color: white;
border-radius: 50%;
+ position: absolute;
+ right: 30px;
}
.name{
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json
index d79c02b4..a5bf2e8e 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -209,6 +209,14 @@
}
},
"general": {
+ "invalid-huawei-location": {
+ "en": "Error while getting location from Huawei HMS services",
+ "ar": "خطأ أثناء الحصول على الموقع من خدمات Huawei HMS"
+ },
+ "huawei-hms-gms-error": {
+ "en": "Error checking device HMS/GMS availability",
+ "ar": "خطأ في التحقق من توفر جهاز HMS / GMS"
+ },
"location-permission-dialog": {
"en": "Allow the Mohemm app to access your location for marking your attendance",
"ar": "اسمح لتطبيق مهم بالوصول إلى موقعك لتحديد حضورك"