GitXplorerGitXplorer
a

codelab-activity_transitionapi

public
25 stars
8 forks
12 issues

Commits

List of commits on branch master.
Verified
e9a92cd0146ec4302b766da4c06bcd49d149a8e4

Merge pull request #22 from osuleymanova/Master-Bump-versions

committed 3 years ago
Unverified
a0adbb4abb9d003474b62b3a1b3f6ddaeaef190b

Versions update

oosuleymanova committed 3 years ago
Verified
dc5352c11212cdf86512927dc02747f1fb63fc58

Merge pull request #20 from osuleymanova/Master-Bumps-versions-update-for-AFox

oosuleymanova committed 3 years ago
Unverified
b3a2dee29a549beed9951821c024f36df750f907

Bumps versions update

oosuleymanova committed 3 years ago
Unverified
b5aff4f2a9d94d5f689d76ee8a5590b4dda2a1ac

Bumping back down until I verify issue #9 is resolved.

committed 4 years ago
Unverified
143f0777b0637b6100eddfca838cf7ecc2566400

Improve UI for permissions activity.

committed 4 years ago

README

The README file for this repository.

Detecting User Activity changes using Activity Recognition Transition API

The codelab can be found here.

We carry phones with us everywhere, but until now, it's been hard for apps to adjust their experience to a user's continually changing environment and activity.

To do this in the past, developers spent valuable engineering time combining various signals (location,sensor, etc.) to determine when an activity like walking or driving had started or ended. Even worse, when apps are independently and continuously checking for changes in user activity, battery life suffers.

The Activity Recognition Transition API solves these problems by providing a simple API that does all the processing for you and just tells you what you actually care about: when a user's activity has changed. Your app simply subscribes to a transition in activities you are interested in and the API notifies you of the changes

As an example, a messaging app can ask, "tell me when the user has entered or exited a vehicle", to set the user's status as busy. Similarly, a parking detection app can ask,"tell me when the user has exited a vehicle and started walking", to save the user's parking location.

In this codelab, you will learn how to use the Activity Recognition Transition API to determine when a user starts/stop an activity like walking or running.

Pre-requisites

Android API Level > v14 Android Build Tools > v21 Google Support Repository

Android Studio 3.5 or later to run the code A device/emulator running on Oreo or later (this codelab targets Android 10)

Familiarity with Android development and some familiarity with callbacks.

Getting Started

Visit the codelab here. Feel free to look at the complete module to see how the final code works.

Support

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.