This file contains 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
#!/bin/bash | |
## | |
# Use the script to install a pre-bundled RN app which won't require the development server | |
# | |
# Usage | |
# --------------------------------- | |
# $ ./bundle-install.sh | |
# |
This file contains 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
package com.transistorsoft.cordova.bggeo; | |
import org.greenrobot.eventbus.Subscribe; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import com.transistorsoft.locationmanager.adapter.BackgroundGeolocation; | |
import com.transistorsoft.locationmanager.adapter.callback.TSLocationCallback; | |
import com.transistorsoft.locationmanager.event.ActivityChangeEvent; | |
import com.transistorsoft.locationmanager.event.GeofenceEvent; |
This file contains 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
/** | |
* How to implement cordova-background-geolocation with Ionic 2 / 3 | |
* @see https://github.com/transistorsoft/cordova-background-geolocation-lt | |
* @author Chris Scott, Transistor Software <[email protected]> | |
*/ | |
import { Component } from '@angular/core'; | |
import { NavController, Platform } from 'ionic-angular'; |
This file contains 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
/// flutter_background_geolocation Hello World | |
/// https://github.com/transistorsoft/flutter_background_geolocation | |
//// | |
// For pretty-printing location JSON. Not a requirement of flutter_background_geolocation | |
// | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart' |
This file contains 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
/** | |
* How to implement cordova-background-geolocation with Ionic 2 / 3 | |
* https://github.com/transistorsoft/cordova-background-geolocation-lt | |
* Chris Scott, Transistor Software <[email protected]> | |
*/ | |
import { Component } from '@angular/core'; | |
import { NavController, Platform } from 'ionic-angular'; |
This file contains 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
// Listen for geofence events. | |
BackgroundGeolocation.onGeofence((params) => { | |
console.log('- Geofence event: ', params.identifier); | |
}); | |
// Add a geofence | |
await BackgroundGeolocation.addGeofence({ | |
identifier: 'HOME', | |
radius: 200, | |
latitude: 45.51818958022214, | |
longitude: -73.61409989192487, |
This file contains 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
// Listen to schedule events | |
BackgroundGeolocation.onSchedule((state) => { | |
console.log('- Schedule event, enabled:', state.enabled); | |
}); | |
BackgroundGeolocation.ready({ | |
startOnBoot: true, // Scheduler will start when device is rebooted. | |
stopOnTerminate: false, // Continue after app-terminate. | |
schedule: [ | |
'2,4 6:00-19:00', // Mon,Wed: 6:00am-7:00pm |
This file contains 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
bgGeo.configure({ | |
. | |
. | |
. | |
schedule: [ | |
'1 17:30-21:00', // Sunday: 5:30-9:00 | |
'2-6 9:00-17:00', // Mon-Fri: 9am to 5pm | |
'2,4,6 20:00-12:00',// Mon, Web, Fri: 8pm to midnight (next day) | |
'7 10:00-19:00' // Sun: 10am-7pm | |
] |
This file contains 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
public class MyView extends SimpleViewManager<MapView> { | |
public static final String TAG = "MyView"; | |
@Override | |
public String getName() { | |
return TAG; | |
} | |
@Override | |
protected MapView createViewInstance(ThemedReactContext context) { |
This file contains 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
{ | |
"device": { | |
"available": true, | |
"platform": "Android", | |
"version": "5.1.1", | |
"uuid": "125c663531f37f55", | |
"cordova": "4.1.1", | |
"model": "Nexus 5", | |
"manufacturer": "LGE" | |
}, |
NewerOlder