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

[Question] [ANDROID/IOS] parallel counter stream #5

Open
arashmidos opened this issue Aug 25, 2024 · 2 comments
Open

[Question] [ANDROID/IOS] parallel counter stream #5

arashmidos opened this issue Aug 25, 2024 · 2 comments
Assignees
Labels

Comments

@arashmidos
Copy link

Describe the bug
I need to have two separate counter streams. But when I create the second one, the other stops updating.

To Reproduce
Consider this snippet code:

...
final stream1 = Pedometer().stepCountStreamFrom(from: today);
final subscription1 = stream1.listen( onStepCount1 )..onError( logError1 );
// stream1 works correctly 
...
final stream2 = Pedometer().stepCountStreamFrom(from: specificDate);
final subscription2 = stream2.listen( onStepCount2 )..onError( logError2 );
// now stream1 stops updating.

I'm unsure if it's a bug or if I was doing something wrong. Each stream belongs to a separate screen and has its conditions to start/stop. So I can not take the difference and use one of them.
I would greatly appreciate any help.

Platforms & Versions:

  • Plugin version: [5.0.4]
  • Platforms OS: [iOS]
  • Flutter version: [3.22.3]
@arashmidos arashmidos added the help wanted Extra attention is needed label Aug 25, 2024
@Flucadetena
Copy link
Owner

Hi @arashmidos I'm not sure the native API supports it.

I'm going to try and see what I can come up with to try and help.

Nevertheless, wouldn't it be easier to just have one stream from the oldest date. Then get the steps between that date and today and get the difference?

@Flucadetena
Copy link
Owner

Hey @arashmidos where you able to do it the way I recommend it?

@Flucadetena Flucadetena reopened this Oct 7, 2024
@Flucadetena Flucadetena added enhancement New feature or request blocked: user-response and removed help wanted Extra attention is needed labels Oct 7, 2024
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

2 participants