carp_context_package 0.3.1

  • Installing
  • Versions
  • new61

CARP Context Sampling Package #

pub package

This library contains a sampling package for communication to work with the carp_mobile_sensing package. This packages supports sampling of the following Measure types:

  • location
  • activity
  • weather

See the wiki for further documentation, particularly on available probes and sampling schemas.

For Flutter plugins for other CARP products, see CARP Mobile Sensing in Flutter.

If you're interested in writing you own sampling packages for CARP, see the description on how to extend CARP on the wiki.

Installing #

To use this package, add the following to you pubspc.yaml file. Note that this package only works together with carp_mobile_sensing.

    sdk: flutter
  carp_mobile_sensing: ^0.3.0
  carp_context_package: ^0.3.0

Android Integration #

Add the following to your app's manifest.xml file located in android/app/src/main:

<manifest xmlns:android=""

   <!-- The following permissions are used for CARP Mobile Sensing -->
   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
   <uses-permission android:name="" />
   <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" tools:ignore="ProtectedPermissions"/>

      <!-- service for using the Android activity recognition API -->
      <service android:name="at.resiverbindet.activityrecognition.activity.ActivityRecognizedService" />

iOS Integration #

Add this permission in the Info.plist file located in ios/Runner:

<string>Uses the location API to record location.</string>
<string>Uses the location API to record location.</string>
<string>Detects activity.</string>

Using it #

To use this package, import it into your app together with the carp_mobile_sensing package:

import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';
import 'package:carp_context_package/context.dart';

Before creating a study and running it, register this package in the SamplingPackageRegistry.


0.3.1 #

  • Documentation

0.3.0 #

  • Initial release compatible with carp_mobile_sensing version 0.3.*

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  carp_context_package: ^0.3.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:carp_context_package/activity_datum.dart';
import 'package:carp_context_package/activity_probe.dart';
import 'package:carp_context_package/context.dart';
import 'package:carp_context_package/context.g.dart';
import 'package:carp_context_package/context_package.dart';
import 'package:carp_context_package/location_datum.dart';
import 'package:carp_context_package/location_probe.dart';
import 'package:carp_context_package/weather_datum.dart';
import 'package:carp_context_package/weather_measures.dart';
import 'package:carp_context_package/weather_probe.dart';
Version Uploaded Documentation Archive
0.3.1 Feb 5, 2019 Go to the documentation of carp_context_package 0.3.1 Download carp_context_package 0.3.1 archive
0.3.0 Feb 4, 2019 Go to the documentation of carp_context_package 0.3.0 Download carp_context_package 0.3.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and carp_context_package.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
activity_recognition ^0.1.3 0.1.3
carp_mobile_sensing ^0.3.0 0.3.2
flutter 0.0.0
json_annotation ^1.0.0 1.2.0 2.0.0
location ^1.4.1 1.4.1 2.0.0
weather ^0.1.01 0.1.03
Transitive dependencies
app_usage 0.0.3
archive 2.0.8
args 1.5.1
async 2.0.8
battery 0.2.3 0.3.0+1
charcode 1.1.2
collection 1.14.11
connectivity 0.3.2 0.4.2
convert 2.1.1
crypto 2.0.6
device_apps 1.0.5
device_info 0.2.1 0.4.0+1
file_utils 0.1.1
fixnum 0.10.9
flutter_blue 0.4.2 0.5.0
globbing 0.2.0
http 0.12.0+1
http_parser 3.1.3
light 0.0.6
meta 1.1.6 1.1.7
path 1.6.2
path_provider 0.4.1 0.5.0+1
pedometer 0.0.5
protobuf 0.10.8 0.13.3
screen_state 0.0.1
sensors 0.3.5 0.4.0+1
simple_permissions 0.1.9
sky_engine 0.0.99
source_span 1.5.4
stats 0.2.0+2
string_scanner 1.0.4
system_info 0.1.0
term_glyph 1.1.0
typed_data 1.1.6
uuid 1.0.3 2.0.0
vector_math 2.0.8
Dev dependencies
build_runner any
json_serializable ^1.0.0
test any