Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine State of Motion & Fitness API #153

Closed
brandonhub opened this issue Nov 23, 2019 · 4 comments
Closed

Determine State of Motion & Fitness API #153

brandonhub opened this issue Nov 23, 2019 · 4 comments
Labels

Comments

@brandonhub
Copy link

brandonhub commented Nov 23, 2019

My Environment

  • Version: 1.3.2
  • Platform: iOS or Android iOS
  • OS version: Latest (13.1)
  • Device manufacturer / model: iPhone 8
  • Flutter info (flutter doctor):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.40.1)
[!] Connected device
    ! No devices available
  • Plugin config:
Config(
      desiredAccuracy: Config.DESIRED_ACCURACY_HIGH,
      stopOnTerminate: false,
      startOnBoot: true,
      logLevel: Config.LOG_LEVEL_VERBOSE,
      url: serverUrl,
      autoSyncThreshold: 25,
      batchSync: true,
      preventSuspend: true,
      params: {'userID': <userID goes here>})

Expected Behavior

For there to be some way to tell if the Motion/Fitness API is enabled.

Actual Behavior

There is no way to tell if the Motion/Fitness API is enabled.

Context

This plugin's documentation stipulates a strong emphasis on the Motion/Fitness API to allow for battery-efficient location tracking. It would be great if there was a way we could get the status of this permission so that we can report to the user if is not enabled. I know that the plugin will request the permission the first time BackgroundGeolocation.start (or an equivalent) is called but that isn't enough to determine if the API is enabled or not.

Awesome plugin btw!

@christocracy
Copy link
Member

Initially, Apple didn’t make it easy to determine this. You actually had to attempt to turn on updates and check for an error ref != nil.

I think they added an api to determine permission in iOS 11 or 12.

@robrichardson13
Copy link

robrichardson13 commented Jan 19, 2020

In iOS this function should work to check if they have motion enabled or not. It would be great to get this into the plugin!

image

EDIT: Looks like the CMSensorRecorder was implemented in iOS 9.

@stale
Copy link

stale bot commented Mar 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

@stale stale bot added the stale label Mar 20, 2020
@stale
Copy link

stale bot commented Mar 27, 2020

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

@stale stale bot closed this as completed Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants