| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The Pedometer sensor allows us to manages historic pedometer data.
dependencies:
awareframework_pedometer
import 'package:awareframework_pedometer/awareframework_pedometer.dart'; import 'package:awareframework_core/awareframework_core.dart';
TODO
The data representations is different between Android and iOS. Following links provide the information.
// init config
var config = PedometerSensorConfig()
..debug = true
..label = "label";
// init sensor
var sensor = new PedometerSensor.init(config);
void method(){
/// start
sensor.start();
/// set observer
sensor.onDataChanged.listen((PedometerData result){
setState((){
// Your code here
});
});
/// stop
sensor.stop();
/// sync
sensor.sync(true);
// make a sensor care by the following code
var card = new PedometerCard(sensor:sensor);
// NEXT: Add the card instance into a target Widget.
}
Copyright (c) 2021 AWARE Mobile Context Instrumentation Middleware/Framework (http://www.awareframework.com)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LI CENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Back | FazBrowse Home | New Git URL |