added fake location and chnaged color theme as well

enad-Q1-HMG
umasoodch 5 years ago
parent 09b133a394
commit 9128f4a524

@ -107,7 +107,7 @@
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
</platform>
<platform name="android">
<preference name="android-minSdkVersion" value="19" />
<preference name="android-minSdkVersion" value="21" />
<preference name="android-targetSdkVersion" value="28" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />

@ -24,7 +24,7 @@
"@ionic-native/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^5.18.0",
"@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/background-geolocation": "^5.30.0",
"@ionic-native/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0",
@ -161,7 +161,9 @@
"cordova-plugin-badge": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "true"
},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
@ -193,20 +195,38 @@
"call-number": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {},
"cordova-plugin-apprate": {
"PLAY_CORE_VERSION": "1.+"
},
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true"
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",
"ANDROID_PLAY_SERVICES_AUTH_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_FIREBASE_INAPPMESSAGING_VERSION": "19.0.3",
"ANDROID_FIREBASE_FIRESTORE_VERSION": "21.4.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1",
"ANDROID_GSON_VERSION": "2.8.6"
},
"cordova-plugin-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "+"
}
},
"platforms": [
"browser",
"android",
"ios"
"ios",
"android"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@ -1 +0,0 @@
1f488bbf4678f14e62f8bb82d7e4b0be

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 115 KiB

@ -1 +0,0 @@
b8fbf9d45bfbdf47560d99960bc65188

@ -257,7 +257,7 @@ ion-card-content.confirm-details{
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.confirmEitOkButton{
@ -266,7 +266,7 @@ ion-card-content.confirm-details{
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
--background: #65C399;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -57,7 +57,7 @@
.header-div {
background-color: #22C6B3;
background-color: #65C399;
text-transform: capitalize;
height: 160px;
/* position: relative; */
@ -66,7 +66,7 @@
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
@ -242,7 +242,7 @@ margin-top: -13px;
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
// background: #65C399;
height: 140px;
width: 100%;
left: 0;

@ -32,7 +32,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
--background:: #65C399;
width: 100% !important;
color: white!important;
border-radius: 16px !important;

@ -5,7 +5,7 @@
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.confirmEitOkButton{
@ -14,7 +14,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
--background: #65C399;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -1,3 +1,3 @@
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}

@ -75,7 +75,7 @@ header
.logout{
background-color:#22C6B3;
background-color:#65C399;
border: none;
color:white;
// padding: 20px;
@ -94,7 +94,7 @@ padding: 6px 24px;
}
.logout-ar{
background-color: #22C6B3;
background-color: #65C399;
border: none;
color: white;
text-align: center;

@ -130,15 +130,11 @@ export class HomeComponent implements OnInit {
openDialog() {
this.cs.confirmAlertDialogAttendance(
() => {
this.attendScanService.getDeviceLocation();
this.cs.confirmAlertDialogAttendance(() => {
this.attendScanService.getDeviceLocation();
}, this.ts.trPK('general', 'ok'),
() => {}, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.ts.trPK('attendance-tracking', 'confirm-alert3')
+ '<br/>' + '<br/>' + this.ts.trPK('attendance-tracking', 'confirm-alert1')
+ this.ts.trPK('attendance-tracking', 'confirm-alert2')
);
this.ts.trPK('attendance-tracking', 'confirm-alert1') + this.ts.trPK('attendance-tracking', 'confirm-alert2'));
}
}

@ -44,7 +44,7 @@
left: 79%;
bottom: 35px;
color: black;
background-color: #22c6b3;
background-color: #65C399;
width: 20%; height: 6px;">
</div>
<div style="position: relative;

@ -2,7 +2,7 @@
--background: #f0efef;
}
.header-div {
background: #22c6b3;
background: #65C399;
color: var(--light);
text-transform: capitalize;
display: block;
@ -24,7 +24,7 @@
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
--background: #65C399 !important;
color: aliceblue !important;
// margin-top: 10px !important;
@ -34,7 +34,7 @@
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
background: #65C399;
color: aliceblue;
margin-left: 0px !important;
@ -45,7 +45,7 @@
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
background: #65C399 !important;
color: aliceblue !important;
}
@ -139,7 +139,7 @@ height: 250px !important;
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
background: #65C399;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;

@ -50,7 +50,7 @@ public data = {
backgroundColor: [
'#22c6b3',
'#65C399',
'#094875',
],

@ -25,7 +25,7 @@ ion-label {
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.addEitOkButton{
white-space: normal !important;
@ -33,7 +33,7 @@ ion-label {
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
background-color: #65C399;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -227,7 +227,7 @@
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.title{
margin-top: -37px;
@ -243,7 +243,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
background-color: #65C399;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -69,7 +69,7 @@ h4 {
.header-div {
background-color: #22C6B3;
background-color: #65C399;
text-transform: capitalize;
height: 160px;
// position: relative;
@ -78,7 +78,7 @@ h4 {
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.addClass{
@ -99,7 +99,7 @@ h4 {
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
// background: #65C399;
height: 140px;
width: 100%;
left: 0;
@ -119,7 +119,7 @@ z-index: 1;
.content:before {
position: absolute;
content: "";
background: #22c6b3;
background: #65C399;
height: 140px;
width: 100%;
left: 0;
@ -221,7 +221,7 @@ z-index: 1;
}
.blue-dote{
background-color: #22C6B3;
background-color: #65C399;
width: 12px;
height: 12px;
border-radius: 50% !important;
@ -294,7 +294,7 @@ z-index: 1;
}
.child-dote{
background-color: #22C6B3;
background-color: #65C399;
width: 15px;
height: 15px;
border-radius: 50% !important;
@ -303,7 +303,7 @@ z-index: 1;
margin-right: 5px;
}
.child-dote-ar{
background-color: #22C6B3;
background-color: #65C399;
width: 15px;
height: 15px;
border-radius: 50% !important;

@ -100,7 +100,7 @@ export class EitListComponent implements OnInit {
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
'#22C6B3',
'#65C399',
'#3CB9D5', ],
borderWidth: 2
}

@ -4,7 +4,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
background-color: #65C399;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -13,7 +13,7 @@ ion-item.custCollabs.item.item-block.item-ios {
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
ion-item.item.item-block {

@ -32,7 +32,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
--background:: #65C399;
width: 100% !important;
color: white!important;
border-radius: 16px !important;

@ -118,7 +118,7 @@ import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart';
import { GenericHeaderComponent } from './ui/generic-header/generic-header.component';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
@NgModule({
imports: [
CommonModule,
@ -315,7 +315,8 @@ import { GenericHeaderComponent } from './ui/generic-header/generic-header.compo
// PaymentService,
MenuService,
OpenNativeSettings,
BarcodeScanner
BarcodeScanner,
BackgroundGeolocation
],
entryComponents: [DateInfoModalComponent],
})

@ -14,7 +14,8 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { Platform } from '@ionic/angular';
@Injectable({
providedIn: 'root'
@ -37,38 +38,50 @@ export class AttendScanService {
private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService,
public common: CommonService,
public ts: TranslatorService, ) {
public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform ) {
this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
}
public getDeviceLocation() {
const isVirtual = this.device.isVirtual;
// tslint:disable-next-line: triple-equals
if (isVirtual == true) {
if (isVirtual === true) {
alert('emulater>>>>>>>' + isVirtual);
alert('You are using virtual device');
return false;
}
this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.then(resp => {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
})
.catch(error => {
console.log('Error getting location', error);
});
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (this.platform.is('android')) {
if (resp && (resp.latitude && resp.longitude)) {
console.log(resp);
if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
} else {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
}
}
} else {
if (resp && (resp.latitude && resp.longitude)) {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
} else {
return false;
}
});
}
public attendance() {

@ -8,14 +8,14 @@
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
--background: #65C399 !important;
color: aliceblue !important;
}
.menu {
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
background: #65C399;
color: aliceblue;
margin-left: 0px !important;
@ -25,7 +25,7 @@
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
background: #65C399 !important;
color: aliceblue !important;
}
@ -92,7 +92,7 @@
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
background: #65C399;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;

@ -10,8 +10,8 @@
.btnImge{
// button{
border-color:transparent !important;
--background: #22C6B3 !important;
background: #22C6B3 !important;
--background: #65C399 !important;
background: #65C399 !important;
height: 57px !important;
width: 60px !important;
@ -21,7 +21,7 @@
}
//test
.changeIcon{
background: #22C6B3 !important;
background: #65C399 !important;
border-radius: 50% !important;
width: 73px;
height: 55px;

@ -22,5 +22,5 @@
line-height: 46px;
}
.header-toolbar-new {
--background: #22c6b3;
--background: #65C399;
}

@ -4,6 +4,6 @@
ion-menu-button {
font-size: 0.8cm;
color: white;
background: #22c6b3;
background: #65C399;
margin: 0 auto;
}

@ -4,7 +4,7 @@ ion-row {
}
.header-toolbar-new{
--background: #22c6b3;
--background: #65C399;
}
.profile-image-container{
position: relative;
@ -50,7 +50,7 @@ ion-label{
.contentBg:before {
position: absolute;
content: "";
background: #22c6b3;
background: #65C399;
height: 100px;
width: 100%;
left: 0;

@ -36,7 +36,7 @@ import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
@ -151,6 +151,7 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService,
public router: Router,
private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl(
@ -165,11 +166,6 @@ export class HomePage implements OnInit {
this.common.openHome();
}
});
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge;
// });
this.direction = TranslatorService.getCurrentLanguageName();
this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header');
this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule');
@ -189,14 +185,6 @@ export class HomePage implements OnInit {
this.getUserDetails();
}
// ionViewDidEnter() {
// // tslint:disable-next-line: only-arrow-functions
// document.addEventListener('backbutton', function(e) {
// e.preventDefault();
// e.stopPropagation();
// }, false);
// }
initTimer() {
this.runTimer = false;
this.hasStarted = false;
@ -256,26 +244,36 @@ export class HomePage implements OnInit {
this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({
maximumAge: 3000,
timeout: 10000,
enableHighAccuracy: true
})
.then(resp => {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
})
.catch(error => {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (this.platform.is('android')) {
if (resp && (resp.latitude && resp.longitude)) {
console.log(resp);
if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
} else {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
}
}
} else {
if (resp && (resp.latitude && resp.longitude)) {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
});
} else {
return false;
}
});
}
setServicesPrivilage() {
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save