Skip to content

Instantly share code, notes, and snippets.

View ednilsonamaral's full-sized avatar

Ednilson Amaral ednilsonamaral

  • Sao Paulo - SP - Brazil
View GitHub Profile
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
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'
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' },