GithubHelp home page GithubHelp logo

cph-cachet / flutter-plugins Goto Github PK

View Code? Open in Web Editor NEW
521.0 20.0 621.0 221.29 MB

A collection of Flutter plugins developed by CACHET

Java 10.28% Ruby 3.05% Swift 10.43% Objective-C 0.62% Dart 42.44% Shell 0.11% Kotlin 33.08%
flutter flutter-plugins flutter-package dart android ios

flutter-plugins's Introduction

CACHET Flutter plugins

This repo contains the source code for Flutter first-party plugins developed by developers at the Copenhagen Center for Health Technology (CACHET) at The Technical University of Denmark. Check the packages directory for all plugins.

Flutter plugins enable access to platform-specific APIs using a platform channel. For more information about plugins, and how to use them, see https://flutter.io/platform-plugins/.

Plugins

These are the available plugins in this repository.

Plugin Description Android iOS http://pub.dev/
screen_state Track screen state changes ✔️ pub package
light Track light sensor readings ✔️ pub package
pedometer Track step count ✔️ ✔️ pub package
noise_meter Read noise level in Decibel ✔️ ✔️ pub package
app_usage Track usage of all applications on phone. ✔️ pub package
weather Get current weather, as well as forecasting using the OpenWeatherMap API. ✔️ ✔️ pub package
air_quality Get the air quality index using the WAQI API. ✔️ ✔️ pub package
notifications Track device notifications. ✔️ pub package
movisens_flutter Movisens sensor communication. ✔️ ✔️ pub package
esense_flutter eSense ear sensor plugin. ✔️ ✔️ pub package
health Apple HealthKit and Google Fit interface plugin. ✔️ ✔️ pub package
activity_recognition Activity Recognition ✔️ ✔️ pub package
audio_streamer Stream audio as PCM from mic ✔️ ✔️ pub package
mobility_features Compute daily mobility features from location data ✔️ ✔️ pub package
carp_background_location Track location, even when app is in the background ✔️ ✔️ pub package
flutter_foreground_service Foreground service for Android ✔️ pub package

Issues

Please check existing issues and file any new issues, bugs, or feature requests in the flutter-plugin issue list.

Contributing

As part of the open-source Flutter ecosystem, we would welcome any help in maintaining and enhancing these plugins. We (i.e., CACHET) have limited resources for maintaining these plugins and we rely on your help in this. We welcome any contribution -- from small error corrections in the documentation, to bug fixes, to large features enhacements, or even new features in a plugin. If you wish to contribute to any of the plugins in this repo, please review our contribution guide, and send a pull request.

In general, if you wish to contribute a new plugin to the Flutter ecosystem, please see the documentation for developing packages and platform channels. You can store your plugin source code in any GitHub repository (the present repo is only intended for plugins developed by the core CARP team). Once your plugin is ready you can publish to the pub repository.

flutter-plugins's People

Contributors

alexanderzenner avatar bakatsuyuki avatar bardram avatar bruce3x avatar ciriousjoker avatar drakmail avatar eliasteeny avatar hoffmatteo avatar ikoamu avatar jpiris88 avatar kingdarboja avatar koenniem avatar larsrefsgaard avatar madsvschristensen avatar marinat avatar penkzhou avatar pierrebresson avatar pinkyuni avatar rafaellop avatar rexios80 avatar ristiisa avatar sc00n avatar sensirex avatar sztyr avatar thomasnilsson avatar tiloc avatar vmalyi avatar w-rui avatar xelahalo avatar xjodoin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-plugins's Issues

[pedometer]: pedometer device no counting

[√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.18363.778], locale ko-KR)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.5)
[√] Connected device (1 available)

device -model: SM-J530K
android version: 9
package version : 1.0.0

I applied a sample source
The step count number does not go up.

No dependency link for ios podspec file. version 0.0.6

Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

=== BUILD TARGET cloud_firestore OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/chenbin/development/flutter/.pub-cache/hosted/pub.dartlang.org/weather-0.0.6/ios/Classes/WeatherPlugin.m:2:9: fatal error: 'weather/weather-Swift.h' file not found
#import <weather/weather-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Plugin crashed.

Hi,
PLugin crashed on emulator due to location plugin crashing. I have seen it before.
Is there a way to provide location to Weather plugin instead of plugin using current location? I am using diffrent location plugin(paid) which is much more stable.
Thanks
Michal

[pedometer]android build faild,but debug run is ok

** pedometer & 1.0.0**

[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.6 18G3020, locale zh-Hans-CN)
• Flutter version 1.12.13+hotfix.8 at /Users/iosappjingda/Documents/flutter
• Framework revision 0b8abb4724 (13 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

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

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
• SM G9500 • 9889db424651533259 • android-arm64 • Android 9 (API 28)

• No issues found!

Describe the bug
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 179.0s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
✏️ Creating android/settings_aar.gradle...
[!] Flutter tried to create the file android/settings_aar.gradle, but failed.
To manually update settings.gradle, follow these steps:

1. Copy `settings.gradle` as `settings_aar.gradle`
2. Remove the following code from `settings_aar.gradle`:

        def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

        def plugins = new Properties()
        def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
        if (pluginsFile.exists()) {
            pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
        }

        plugins.each { name, path ->
            def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
            include ":$name"
            project(":$name").projectDir = pluginDirectory
        }

Please create the file and run this command again.

Issue with light

Plugin name & version
light ^0.1.1

When I run Gradle on Android Studio I get the following exception:

  • What went wrong:
    Execution failed for task ':noise_meter:parseDebugLibraryResources'.

Could not resolve all files for configuration ':noise_meter:androidApis'.
Failed to transform file 'android.jar' to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}

Would you have an idea how to fix this. Thanks.

Audio Record can't initialize (Noise Meter)

Trying to run the example for the noise meter I am getting the following at runtime and on my android device (not emulator):

E/AudioRecord(32370): AudioFlinger could not create record track, status: -1
E/AudioRecord-JNI(32370): Error creating AudioRecord instance: initialization check failed with status -1.
E/android.media.AudioRecord(32370): Error code -20 when initializing native AudioRecord object.
E/NoiseCalibration(32370): Audio Record can't initialize!

I have installed according to the documentation (android manifiest, and the dependencies). Any ideas on how to fix this, thank you for your plugins! awesome work.

notifications v 0.0.2

I tried to implement the notifications package as a dependency in a Flutter project and followed the sparse documentation provided in the ReadMe. I might have the wrong expectation for this dependency, but to my surprise I am no longer presented with the notification when the application is in the background or terminated.
I am receiving the notifications as the content is printed in my terminal. Furthermore, I can see my app is highlighting the desired card (the payload of the notification contains a id to act upon).

Depending on whether this is the intended behaviour or a feature that needs to be implemented I would ask you to update the ReadMe and clarify your intension with this plugin 😊

trouble installing 'pedometer' plugin

I'm having trouble getting the 'pedometer' v0.0.5 installed.

I added:

    pedometer: ^0.0.5

to the dependencies section of my flutter project's pubspec.yaml.

Then I ran flutter packages get.

I'm usually working out of Android Studio so I chose my emulator and hit the Run button.

The first error I get is:

...
   -> Installing pedometer (0.0.1)
      - Running pre install hooks
    [!] Unable to determine Swift version for the following pods:

    - `pedometer` does not specify a Swift version and none of the targets (`Runner`)
    integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the
    `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

(I also notice it reports "podometer (0.0.1)" above, which doesn't match the dependency version.)

I'm new to cocoapods (flutter and dart!) so took a guess that I could resolve this by adding

ENV['SWIFT_VERSION'] = '4.2'

to the ios/Podfile.

With that change, the build (flutter run) fails like so.

Xcode's output:
↳
    === BUILD TARGET pedometer OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/xxxxx/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/pedometer-0.0.5/ios/Classes/PedometerPlugin.m:2:9: fatal error:
    'pedometer/pedometer-Swift.h' file not found
    #import <pedometer/pedometer-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

I assume that's probably a generated header file.

The installation instructions are really simple so I can't see that I missed any step.

Add history request to API.

The free API key provides access to free historical data as well. Can it be exposed in the plugin? I am interested in the last 24 hours of rainfall and this can be calculated from historical data every hour.

[weather] Error: A value of type 'PermissionStatus' can't be assigned to a variable of type 'bool'.

weather 0.9.5

WORKAROUND: Rollback the version of the location package to version 2.4.0 (i.e. explicitly add it to your app dependencies)

Describe the bug
The app build crashes with the following exception:

Compiler message:
../lib/weather.dart:267:26: Error: A value of type 'PermissionStatus' can't be assigned to a variable of type 'bool'.
 - 'PermissionStatus' is from 'package:location/location.dart' ('/C:/Users/MathiasM%C3%BCller/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/location-2.5.1/lib/location.dart').
    bool hasPermission = await location.hasPermission();
                         ^
../lib/weather.dart:271:35: Error: A value of type 'PermissionStatus' can't be assigned to a variable of type 'bool'.
 - 'PermissionStatus' is from 'package:location/location.dart' ('/C:/Users/MathiasM%C3%BCller/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/location-2.5.1/lib/location.dart').
      bool permissionWasGranted = await location.requestPermission();

To Reproduce
Steps to reproduce the behavior:

  1. Check out the latest version of the plugin from github
  2. Run flutter build appbundle
  3. See error

Expected behavior
The app should build.

Actual behavior
See error log above

Flutter doctor

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale de-DE)
    • Flutter version 1.12.13+hotfix.8 at C:\sdk\flutter
    • Framework revision 0b8abb4724 (13 days ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\sdk\android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 43.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2019.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2
    • Flutter plugin version 43.0.3
    • Dart plugin version 193.6494.35

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

• No issues found!

Additional context
The problem here is with the location plugin (https://pub.dev/packages/location). It was updates on the 23rd February 2020 to version 2.5.1. As of that version the requestPermissionandhasPermissionare now returningPermissionStatus` enum.

weather v0.1.3 language request

It is possible to get the weather description in another language than English by calling the openweather api directly as:
http://api.openweathermap.org/data/2.5/forecast/daily?id=524901&lang={lang}

Could you add this functionality?

Kotlin version issue

Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong:
    The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
    The following dependencies do not satisfy the required version:
    project ':health' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s
Finished with error: Gradle task assembleDebug failed with exit code 1

StreamSubsubription was never canceled

// old code
_lightStream.listen(onData,
onError: onError, onDone: onDone, cancelOnError: true);

// new code

_lightStreamSubScription = _lightStream.listen(onData,
onError: onError, onDone: onDone, cancelOnError: true);

// You need to assign the StreamSubscription!! Thank you :)

air_quality should be a package... not a plugin

Plugin name & version
air_quality

Describe the bug
Even though the air_quality is a package (with no native code) is is created as a plugin (i.e. with native iOS and Android boiler-plate code). The makes the package/plugin crash on Android....

Needs to be changed to a real package.

Dump from Flutter build

/Users/bardram/dev/carp/carp.sensing-flutter/carp_mobile_sensing_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:5: error: cannot find symbol
import cachet.packages.air_quality.AirQualityPlugin;
                                  ^
  symbol:   class AirQualityPlugin
  location: package cachet.packages.air_quality
/Users/bardram/dev/carp/carp.sensing-flutter/carp_mobile_sensing_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:38: error: cannot find symbol
    AirQualityPlugin.registerWith(registry.registrarFor("cachet.packages.air_quality.AirQualityPlugin"));
    ^
  symbol:   variable AirQualityPlugin
  location: class GeneratedPluginRegistrant
2 errors
Finished with error: Gradle task assembleDebug failed with exit code 1

Please merge pull requests.

Plugin name & version
Which of the CACHET Flutter plugins is this issue related to and what is the version number.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what did happen. Include stack traces and exception print-outs.

Screenshots
If applicable, add screenshots to help explain your problem.

Flutter doctor
Please run flutter doctor and add the output here.

Smartphone(s) / Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]

Additional context
Add any other context about the problem here.

PedometerPlugin uninstall for ios

In file included from
/huahuacode/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedometer-0.0.5/ios/Classes/PedometerPlugin.m:1:
/huahuacode/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedometer-0.0.5/ios/Classes/PedometerPlugin.h:3:12: note:
'PedometerPlugin' declared here
@interface PedometerPlugin : NSObject
^

Uploading image.png…

Get steps for a date

Hey,

Great plugin, seems to work well - I just wanted to know if it's possible to get steps for a given date, like yesterdays date.

The reason I ask is - I want to show a weekly / monthly summary for each day - so being able to query would be great, I know I can store the steps for each day in a database however it's getting the steps in the 1st place that I need to resolve.

Thank you,

Exception in currentWeather() call

When calling currentWeather() it thrown an exception:

E/flutter ( 2551): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method '[]' was called on null.
E/flutter ( 2551): Receiver: null
E/flutter ( 2551): Tried calling: [](0)
E/flutter ( 2551): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
E/flutter ( 2551): #1      new Weather (package:weather/weather.dart:108:58)
E/flutter ( 2551): #2      WeatherStation.currentWeather (package:weather/weather.dart:235:16)
E/flutter ( 2551): <asynchronous suspension>
E/flutter ( 2551): #3      WeatherProbe.getDatum (package:carp_context_package/weather_probe.dart:15:32)

which points to the last line in this part of the weather plugin:

/// A class for storing a weather-query response from OpenWeatherMap.
/// This includes various measures such as location,
/// temperature, wind, snow, rain and humidity.
class Weather {
  String _country, _areaName, _weatherMain, _weatherDescription, _weatherIcon;
  Temperature _temperature, _tempMin, _tempMax;
  DateTime _date, _sunrise, _sunset;
  double _latitude,
      _longitude,
      _pressure,
      _windSpeed,
      _windDegree,
      _humidity,
      _cloudiness,
      _rainLastHour,
      _rainLast3Hours,
      _snowLastHour,
      _snowLast3Hours;

  Weather(Map<String, dynamic> weatherData) {
    Map<String, dynamic> main = weatherData['main'];
    Map<String, dynamic> coord = weatherData['coord'];
    Map<String, dynamic> sys = weatherData['sys'];
    Map<String, dynamic> wind = weatherData['wind'];
    Map<String, dynamic> clouds = weatherData['clouds'];
    Map<String, dynamic> rain = weatherData['rain'];
    Map<String, dynamic> snow = weatherData['snow'];
    Map<String, dynamic> weather = weatherData['weather'][0];

Pedometer _onData not being called on some phones (api level 5)

Pedometer 1.0.0

Describe the bug
_onData function not being called on old android phones
also onError is not called
phone information:

{
    "brand": "samsung",
    "device": "coreprimeve3g",
    "display": "LMY48B.G361HXXS0APE1",
    "hardware": "sc8830",
    "manufacturer": "samsung",
    "model": "SM-G361H",
    "version": {
        "codename": "REL",
        "incremental": "G361HXXS0APE1",
        "release": "5.1.1",
        "sdkInt": "22",
    }
}

code sample

  void initState() {
    super.initState();
    setUpPedometer();
}

  Future<void> setUpPedometer() async {
    startListening();
  }
  void startListening() {
    print('i am the pedometer');
    Pedometer pedometer = new Pedometer();
    pedometer.pedometerStream.listen(_onData,
        onError: _onError,
        onDone: _onDone,
        cancelOnError: true);
  }

  void _onData(int stepCountValue) async {
    print(stepCountValue);
  }

  void _onError(error) async {
    print(error);
  }

Expected behavior
stepCountValue should be printed

Actual behavior
stepCountValue is not being printed
but this is getting executed print('i am the pedometer');

Flutter doctor

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version
    10.0.18362.592], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code, 64-bit edition (version 1.41.1)
[√] Connected device (1 available)

• No issues found!

Smartphone(s) / Emulator
SM-G361H
Android
Core prime

Update

i just installed the pedometer example app on the device and it did not work with no errors in console
i checked if the phone have akcelerometr and it does...

also i ran the project on android studio and checked the logcat and this error appeared
01-18 14:44:11.937 17649-17649/com.example.pedometer_test E/SensorManager: sensor or listener is null
i have no idea if this helps

noise_meter plugin doesn't request for microphone and storage permission

Plugin name & version
noise_meter
1.0.1

Describe the bug
I installed noise_meter, start recording and didn't find the callback (onData) being triggered on the flutter side. I checked logcat and found that permission is not granted. So I manually granted the storage and microphone permissions, and it works perfectly.

Digging into NoiseMeterPlugin, I didn't find it explicitly requesting permissions, should it be done somewhere, say registerWith?

Sorry that I removed the following template, as this seems not a tricky case, and could quickly browse the code to check. But let me know if I am wrong. :)

[app_usage, light, pedometer, screen_state]: SWIFT_VERSION attribute is missing

Plugin name & version

  • app_usage
  • light
  • pedometer
  • screen_state

and maybe others?

Describe the bug

When running pod install for iOS deployment, it says that SWIFT_VERSION attribute is not set. This is the output.

      - Running pre install hooks
    [!] Unable to determine Swift version for the following pods:

    - `app_usage` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
    - `light` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
    - `pedometer` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
    - `screen_state` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer/xcode/target_validator.rb:122:in `verify_swift_pods_swift_version'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:578:in `validate_targets'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:158:in `install!'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod:22:in `load'
    /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod:22:in `<main>'

To Reproduce

Try to build the example (main.dart) in the carp_mobile_sensing package.

Expected behavior

Other plugins which is loaded does not have these problems.

Flutter doctor
Please run flutter doctor and add the output here.

Smartphone(s) / Emulator

iPhone XP - iOS 13.3

Additional context

Pedometer - getting the sensor type

Is there a method to call to get the sensor used. I need it to adapt the way to process the steps counting according to the type of sensor the phone is using (Samsung Sensor or normal accelerometer)

Noise Plugin -- java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread

The Noise Plugin crashes with a java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread exception:

E/AndroidRuntime( 4300): Process: dk.cachet.carpmobilesensingapp, PID: 4300
E/AndroidRuntime( 4300): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-6
E/AndroidRuntime( 4300): 	at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:794)
E/AndroidRuntime( 4300): 	at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:684)
E/AndroidRuntime( 4300): 	at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:80)
E/AndroidRuntime( 4300): 	at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:174)
E/AndroidRuntime( 4300): 	at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:144)
E/AndroidRuntime( 4300): 	at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation.success(EventChannel.java:226)
E/AndroidRuntime( 4300): 	at cachet.sensors.noisemeter.NoiseMeterPlugin$1.run(NoiseMeterPlugin.java:137)
E/AndroidRuntime( 4300): 	at java.lang.Thread.run(Thread.java:764)

Does activity_recognition_flutter no longer support the pre-Flutter-1.12 Android projects?

Plugin name & version
activity_recognition_flutter: ^1.0.3

Describe the bug
The static function registerWith(registrar: Registrar) had been removed in this plugin which makes the pre-Flutter-1.12 Android projects fail to register with it. It leads following error:

error: cannot find symbol method registerWith(Registrar)

To Reproduce

  1. Downgrade to Flutter: 1.9.1+hotfix.6
  2. import the plugin to the project
  3. Build the project

Actual behavior

ActivityRecognitionFlutterPlugin.registerWith(registry.registrarFor("com.example.activity_recognition_flutter.ActivityRecognitionFlutterPlugin"));
^
symbol: method registerWith(Registrar)
location: class ActivityRecognitionFlutterPlugin
1 error
FAILURE: Build failed with an exception.

Flutter doctor
[✓] Flutter (Channel unknown, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.37.1)
[✓] VS Code (version 1.44.2)
[✓] Connected device (1 available)

• No issues found!

Get the frequency, Hz, with noise_meter

Plugin name & version
Noise_meter.

Enhancement request
Is it possible to get the Hz, like we get the Db?
Will you support this option?

Expected behavior
Would like to get the frequency.

Actual behavior
Actually is only possible to get the decibels.

Thank you for your work.

Testing new template for issues

Plugin name & version

esense v. 0.1.1+1

Describe the bug
I don't understand the example app....

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what did happen. Include stack traces and exception print-outs.

Screenshots
If applicable, add screenshots to help explain your problem.

Flutter doctor
Please run flutter doctor and add the output here.

Smartphone(s) / Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]

Additional context
Add any other context about the problem here.

SensorLib integration as PR

I am considering using CARP as backend for a bio-feedback app. In order to support multiple devices, I was looking into SensorLib and would contribute a corresponding PR if desired.
Is this the right repository for such a PR, or should I create a separate repository?

pedometer 1.0.0

Can I use IOS in Objective-C project?
My project is not swift in IOS

eSense - No Sensor Events

Hello,

I'm currently trying to implement an App for eSense Earbuds with the help of this plugin. I can connect to the Earbuds and read ESenseEvents such as BatteryRead absolutely fine.

What I can not read are any SensorEvents.

I tried these implementations for reading the Stream:

A simple listener:
ESenseManager.sensorEvents.listen((event) { print('SENSOR event: $event'); });

and with an await for method, that yields a stream for further usage:
Stream<dynamic> getSensorStream() async* { if (ESenseManager.connected) { await for (final event in ESenseManager.sensorEvents) { print('SENSOR event: $event'); yield event; } } }

Now to the strange part of it: If I run the eSense demo app and press the play button to start the sampling, the events also show up in my app. If I click pause the events stop in both apps. If I close the demo app while sampling, the events are still coming in on my app.

What am I missing? What is the demo app doing to trigger the event stream?

test

Plugin name & version
Which of the CACHET Flutter plugins is this issue related to and what is the version number.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what did happen. Include stack traces and exception print-outs.

Screenshots
If applicable, add screenshots to help explain your problem.

Flutter doctor
Please run flutter doctor and add the output here.

Smartphone(s) / Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]

Additional context
Add any other context about the problem here.

Weather plugin - compatible with Android X

Weather plugin:
Not compatible with Android X because it depends on locations 1.4.1
(There is locations 2.0 which is compatible with androidX)
Would you be able to update it?

Thanks!

Notification plugin causing app crash when receiving new notification

Plugin name & version
Plugin Name: Notifications
Plugin Version: 0.0.3

Describe the bug
Exception on OnReceive method causing app to crash.

To Reproduce
Steps to reproduce the behavior:
Followed sample guide in readme and from the example project.

Expected behavior
N/A

Actual behavior
N/A

Screenshots
N/A

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.720], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] Connected device (1 available)

• No issues found!

Smartphone(s) / Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: Xiaomi Mi A2
  • OS: Android 10

Additional context
Stacktrace

E/AndroidRuntime(19158): java.lang.RuntimeException: Error receiving broadcast Intent { act=notification_event flg=0x10 (has extras) } in cachet.plugins.notifications.NotificationsPlugin$NotificationReceiver@f6cccc4
E/AndroidRuntime(19158): 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1560)
E/AndroidRuntime(19158): 	at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
E/AndroidRuntime(19158): 	at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(19158): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(19158): 	at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(19158): 	at android.app.ActivityThread.main(ActivityThread.java:7397)
E/AndroidRuntime(19158): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19158): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(19158): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:920)
E/AndroidRuntime(19158): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference
E/AndroidRuntime(19158): 	at cachet.plugins.notifications.NotificationsPlugin$NotificationReceiver.onReceive(NotificationsPlugin.java:107)
E/AndroidRuntime(19158): 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1550)
E/AndroidRuntime(19158): 	... 8 more

how to check sensor is available on device?

on my debug console says : E/SensorManager( 2627): sensor or listener is null

but my listener onError not triggered.

how i can get that erorr so i can show it to UI?

thanks

Weather plugin is not returning data

Plugin name & version
Weather. Master in github.

Describe the bug
When using the plugin, nothing really happens. There is no data returned and no error / exception.

To Reproduce
Steps to reproduce the behavior: Just run the example app in the weather plugin.

Expected behavior

I using a valid API key and when calling

http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=856822fd8e22db5e1ba48c0e7d69844a

it works fine and returns

{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"stations","main":
{"temp":288.63,"feels_like":284.77,"temp_min":285.37,"temp_max":290.93,"pressure":1015,"humidity":58},"visibility":9000,"wind":{"speed":4.6,"deg":100},"clouds":{"all":64},"dt":1587063617,"sys":
{"type":1,"id":1414,"country":"GB","sunrise":1587013299,"sunset":1587063502},"timezone":3600,"id":2643743,"name":"London","cod":200}

Actual behavior
Nothing happens.

Smartphone(s) / Emulator

iPhone simulator

Pedometer gives wrong steps on Android

Hello,
I followed the example on the repository of pedometer and tried to launch the app.
It worked perfectly on iOS but on Android it gave me a wrong number of steps (many steps less than the steps of the Samsung Health App - ex. 125 steps against 1500 real steps). I tried it on different Android devices:

  • Samsung Galaxy S7 Edge - Android 8.0.0;
  • Samsung Galaxy A50 - Android 9;

flutter version:

  • Flutter (Channel stable, v1.12.13+hotfix.5)
  • Android toolchain - develop for Android devices (Android SDK version 29.0.2)
  • Xcode - develop for iOS and macOS (Xcode 11.3.1)
  • Android Studio (version 3.5)
  • VS Code (version 1.41.1)

pedometer dependence declaration is:
pedometer: 1.0.0

Thank you

Make the Stream<int> public

Please make the Stream public! So i can use the rx operators and do some custom stuff

// Old code
Stream _lightStream;
_lightStream = _eventChannel.receiveBroadcastStream().map((lux) => lux);

// New code - Assign the _eventChannel in the constructor
Stream lightStream;

@OverRide
Light() {
lightStream = _eventChannel.receiveBroadcastStream().map((lux) => lux);
}

Pedometer still shows count when the app is reinstalled

Plugin name & version
pedometer: ^1.0.0

Describe the bug
When you uninstall the app and install it again, the onData method still returns you the same number of steps it had when the app was installed.

To Reproduce
Run the sample code, walk few steps, uninstall the app and install it again, you see those number of steps.

Expected behavior
When app is installed again (after uninstalling), the onData should start with 0

Actual behavior
When app is installed again (after uninstalling), the onData should starts with last value

Flutter doctor

[✓] Flutter (Channel dev, v1.14.1, on Mac OS X 10.15.1 19B88, locale en-GB)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (1 available)

• No issues found!

Smartphone(s) / Emulator
Samsung Galaxy S8+ running Android 9.0

Issue using Noise Meter, demo code works, but cannot implement the plugin when it is nested in the Widget tree

Plugin name & version
Noise Meter (v1.0.2)

Describe the bug
The plugin works fine if an app is created only to run a demo of the plugin. If the plugin is used in an app (in a nested Widget tree), then the Audio Recorder cannot be initialized.

To Reproduce

`class LeftSide extends StatefulWidget {
  @override
  _LeftSideState createState() => _LeftSideState();
}

class _LeftSideState extends State<LeftSide> {

  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        SizedBox(
          width: 20
        ),
        Stack(
          children: <Widget>[
            Align(
              alignment: Alignment.centerLeft,
              child: Container(
                width: MediaQuery.of(context).size.width*0.2,
                height: MediaQuery.of(context).size.height*0.6,
                decoration: BoxDecoration(
                  shape: BoxShape.rectangle,
                  color: Colors.black26,
                    borderRadius: BorderRadius.all(Radius.circular(15)),
                  border: Border.all(color: Colors.white10),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.black26,
                      offset: new Offset(7.0, 7.0),
                      blurRadius: 5.0,
                    )
                  ],
                ),
              ),
            ),
            Positioned(
              top: 45,
              left: 55,
              child: Container(
                width: 50,
                height: 50,
                decoration: BoxDecoration(
                  shape: BoxShape.circle,
                  color: Colors.black26,
                  border: Border.all(color: Colors.white10),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.black26,
                      //offset: new Offset(7.0, 7.0),
                      blurRadius: 5.0,
                      spreadRadius: 5.0
                    )
                  ],
                ),
                child: Opacity(opacity: 0.5, child: Icon(Icons.music_note, size: 20, color: Color(0xFF7BA0F9))),
              ),
            ),
            Positioned(
              bottom: 45,
              left: 55,
              child: Container(
                  width: 50,
                  height: 50,
                  decoration: BoxDecoration(
                      shape: BoxShape.circle,
                      color: Colors.black26,
                    border: Border.all(color: Colors.white10),
                    boxShadow: [
                      BoxShadow(
                          color: Colors.black26,
                          //offset: new Offset(7.0, 7.0),
                          blurRadius: 5.0,
                          spreadRadius: 5.0
                      )
                    ],
                  ),
                child: MicGauge(),
              ),
            ),
          ],
        ),
      ],
    );
  }
}`

class MicGauge extends StatefulWidget {

  @override
  _MicGaugeState createState() => _MicGaugeState();
}

class _MicGaugeState extends State<MicGauge> {

  bool _isRecording = false;
  StreamSubscription<NoiseReading> _noiseSubscription;
  NoiseMeter _noiseMeter;
  double dbLevel = 0;

  @override
  void initState() {
    super.initState();
    //startRecorder();
  }

  @override
  void dispose() {
    super.dispose();
    _noiseSubscription.cancel();
  }

  void onData(NoiseReading noiseReading) {
    this.setState(() {
      if (!this._isRecording) {
        this._isRecording = true;
      }
    });
    //print(noiseReading.db);
    this.dbLevel = noiseReading.db;
    print(this.dbLevel);
  }

  void startRecorder() async {
    print('***NEW RECORDING***');
    try {
      _noiseMeter = new NoiseMeter();
      _noiseSubscription = _noiseMeter.noiseStream.listen(onData);
    } on NoiseMeterException catch (exception) {
      print(exception);
    }
  }

  void stopRecorder() async {
    try {
      if (_noiseSubscription != null) {
        _noiseSubscription.cancel();
        _noiseSubscription = null;
      }
      this.setState(() {
        this._isRecording = false;
      });
    } catch (err) {
      print('stopRecorder error: $err');
    }
  }

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        startRecorder();
      },
      child: Text(this.dbLevel.toString())

    );
  }
}

The following lines have been added to the Android Manifest file:

<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Expected behavior
The Noise Meter should update the Text Widget for decibel level in real time.

Actual behavior
The Noise Meter plugin works fine when the code is implemented as is (like in the example of Noise Meter repo), but does not work when implemented in a nested type widget tree as shown above. Given below are the details of the error.

I/flutter ( 6610): ***NEW RECORDING*** E/IAudioFlinger( 6610): createRecord returned error -22 E/AudioRecord( 6610): AudioFlinger could not create record track, status: -22 E/AudioRecord-JNI( 6610): Error creating AudioRecord instance: initialization check failed with status -22. E/android.media.AudioRecord( 6610): Error code -20 when initializing native AudioRecord object. E/NoiseCalibration( 6610): Audio Record can't initialize!

Flutter doctor
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.719], locale en-US)
• Flutter version 1.12.13+hotfix.8 at c:\src\flutter
• Framework revision 0b8abb4724 (8 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\Ankush\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.0.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2019.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.1
• Flutter plugin version 42.1.4
• Dart plugin version 193.5731

[√] Connected device (1 available)
• SM A205F • RZ8M92CX7PJ • android-arm64 • Android 9 (API 28)

• No issues found!

Smartphone(s) / Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: [Samsung SMA205F]
  • OS: [Android Pie]

Air Quality Plugin is not returning data

Plugin name & version
Air Quality - using master branch from github.

Describe the bug
The plugin seems not to return any data.

To Reproduce
Just run the test in the plugin -- nothing happens.

Smartphone(s) / Emulator
Running the test i IntelliJ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.