activity_recognition_alt 0.1.7 copy "activity_recognition_alt: ^0.1.7" to clipboard
activity_recognition_alt: ^0.1.7 copied to clipboard

Activity recognition plugin for Android and iOS using the native APIs with updated Kotlin version to 1.2.51, forked from https://github.com/Morosko/flutter_activity_recognition - ActivityRecognitionCl [...]

example/lib/main.dart

import 'package:activity_recognition_alt/activity_recognition_alt.dart';
import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        ),
        body: new Center(
          child: StreamBuilder(
            builder: (context, snapshot) {
              if (snapshot.hasData) {
                Activity act = snapshot.data;
                return Text("Your phone is to ${act.confidence}% ${act.type}!");
              }

              return Text("No activity detected.");
            },
            stream: ActivityRecognitionAlt.activityUpdates(),
          ),
        ),
      ),
    );
  }
}
2
likes
20
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

Activity recognition plugin for Android and iOS using the native APIs with updated Kotlin version to 1.2.51, forked from https://github.com/Morosko/flutter_activity_recognition - ActivityRecognitionClient on Android, CoreMotion on iOS.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on activity_recognition_alt