This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.platform.ready().then(() => { | |
| // Ativando backgroundMode | |
| cordova.plugins.backgroundMode.enable(); | |
| // BackgroundMode em segundo plano | |
| cordova.plugins.backgroundMode.on('activate', () => { | |
| this.backgroundMode.disableWebViewOptimizations(); | |
| setInterval(() => { | |
| // Iniciando leitura da Position do usuario enquanto estiver em backgroundMode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable, NgZone } from '@angular/core'; | |
| import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation'; | |
| import { Geolocation, Geoposition } from '@ionic-native/geolocation'; | |
| import { LocalNotifications } from '@ionic-native/local-notifications'; | |
| import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult, NativeGeocoderOptions } from '@ionic-native/native-geocoder'; | |
| import { BackgroundMode } from '@ionic-native/background-mode'; | |
| import 'rxjs/add/operator/map'; | |
| import 'rxjs/add/operator/filter'; | |
| import { isEmpty } from 'lodash' | |
| import * as moment from 'moment' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| head: { | |
| title: 'Plataforma', | |
| meta: [ | |
| { charset: 'utf-8' }, | |
| { name: 'viewport', content: 'width=device-width, initial-scale=1' }, | |
| { hid: 'description', name: 'description', content: 'Conteúdos' } | |
| ], | |
| link: [ | |
| { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, |