transistorsoft / flutter_background_geolocation_firebase

Firebase proxy for Flutter Background Geolocation SDK
MIT License
21 stars 7 forks source link

How to turn updating firebase OFF #6

Closed fne00 closed 4 years ago

fne00 commented 5 years ago

Chris, Sorry if I've missed this in the documentation. In some cases, I want the full functionality, ie "live" updating to Firebase, and in other cases I want to allow the user to switch off the http/Firebase part of the package, and still use the flutter_background_geolocation to provide locations to the logic of my App. What's the best way to switch the http/Firebase part on/off?

Your Environment

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-AU)
    • Flutter version 1.5.4-hotfix.2 at /Users/peffeney/flutter
    • Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/peffeney/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 34.0.4
    • Dart plugin version 191.7019

[✓] Connected device (2 available)
    • Android SDK built for x86 • emulator-5554                        • android-x86 • Android 8.1.0 (API 27) (emulator)
    • iPhone Xʀ                 • 44E00CBE-E1D8-4F83-8618-B64DFF4B5B02 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!

Expected Behavior

My App is for the sport of Orienteering. The App takes the runners location and has the logic for start/finish/timing/rules re sequence of sites to visit/calculation of scores etc. This is all done within the App (ie not the backend). The sending of runners' location to the cloud, would enable us to display runners locations in near-real-time for officials and spectators (what we would call a "Live Display" of runners in the event).

Not all users, and not all occasions, do we want runners' locations to be sent to the cloud. (Firebase). I don't need to allow this to switched on/off mid-way through a run.

Actual Behavior

Design question - not implemented yet.

Steps to Reproduce

If "Live Display" is needed - All is working fine as I have it setup.

If "Live Display" is NOT needed. I'm thinking:

Any advice would be appreciated.

Context

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```