Skip to content

add data limit fetch implementation #815

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

Conversation

followthemoney1
Copy link

Why are we making this pull request?

Original problem described: #581

Updates

Such as original plugins already contain limit parameter in ios native files, we could basically try to add this parameter to getHealthDataFromTypes function.

How to use

 ///This is only answer does the user requested permission or not
  ///It's doesent mean that he allow to read\write
  ///[https://stackoverflow.com/a/33021234]
  Future<HealthDataPermission> requestAccessToHealthDataGranted() async {
    final bool accessWasGranted = await _health.requestAuthorization(_allTypes);

    localDataSource.saveHealthAccess(accessWasGranted ? HealthDataPermission.granted : HealthDataPermission.forbidden);

    return accessWasGranted ? HealthDataPermission.granted : HealthDataPermission.forbidden;
  }

Callout: #706

@hoffmatteo hoffmatteo self-assigned this Jan 22, 2024
Copy link
Contributor

@hoffmatteo hoffmatteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently unable to test on iOS so I am not sure if I will be able to include this in the upcoming release until I am able to test, but this is a great feature.

final args = <String, dynamic>{
'dataTypeKey': dataType.name,
'dataUnitKey': _dataTypeToUnit[dataType]!.name,
'startTime': startTime.millisecondsSinceEpoch,
'endTime': endTime.millisecondsSinceEpoch
'endTime': endTime.millisecondsSinceEpoch,
if (limit != null && limit > -1) 'limit': limit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is already implemented on the iOS side this is a great change!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hoffmatteo thanks mate 💖

@SlimShadyIAm
Copy link
Contributor

Hi @followthemoney1, apologies for the delay in reviewing this PR.

There have been some changes on master - could you please resolve the merge conflicts?

@SlimShadyIAm SlimShadyIAm added the awaiting feedback Waiting for the user to respond to the latest comment label Jul 30, 2024
@followthemoney1
Copy link
Author

@SlimShadyIAm it's probably year passed already from those time. sorry not gonna do this to wait one more year. You can close this pr if you want

@SlimShadyIAm
Copy link
Contributor

I'm sorry about that, we appreciate the effort regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Waiting for the user to respond to the latest comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants