Comments (5)
Hi @annawidera! Unfortunately the docs are woefully out of date 😞
The best way forward these days is to pull a local copy of Arc Mini (https://github.com/sobri909/ArcMini) and use that as example code.
Arc Mini is a fully functioning app that makes use of almost all of LocoKit's functionality. It's also got a bunch of classes that I'm planning to move upstream to LocoKit (those tasks are tracked here).
I'd also possibly recommend using LocoKit's develop
branch, depending on your needs. I haven't had time to do another LocoKit stable release in a few months, so develop branch is ahead in some specific areas. Though hopefully they haven't diverged far in terms of API yet...
from locokit.
This is the full setup I'm using in Arc Mini's AppDelegate at the moment:
LocoKitService.apiKey = "<api key>"
ActivityTypesCache.highlander.store = RecordingManager.store
LocomotionManager.highlander.coordinateAssessor = CoordinateTrustManager(store: RecordingManager.store)
LocomotionManager.highlander.appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp")
LocomotionManager.highlander.appGroup?.timelineRecorder = RecordingManager.highlander.recorder
Though all of those lines are optional. The first two lines are only if you're using LocoKit server API provided activity type models for sample activity type classification.
The third line is only useful if you're allowing users to manually classify samples / timeline items (UI to allow them to correct their recorded timelines). The coordinateAssessor
provides "Trust Factor" values for coordinates, based on samples that have been classified as "stationary" at/near that coordinate. Basically "stationary" samples that have non-zero speeds indicate that location data is less trustworthy at that coordinate. The higher the speed of stationary samples, the less trustworthy the location data at/near that coordinate.
The last two lines are only useful if you're running multiple LocoKit based apps in parallel that are sharing their databases. So that's really niche and almost certainly not necessary.
from locokit.
In Arc Mini's code, have a look at the RecordingManager
class. That's my high level manager class for wrapping up the data store, timeline recorder, and various related activities.
from locokit.
Oh and a little history on why PersistentTimelineManager
isn't around anymore: The old non persistent timeline manager class went away, after it became too difficult to juggle and keep up to date both persistent and non persistent stores. So now all stores are persistent, SQLite backed, and PersistentTimelineManager
got renamed to TimelineManager
after the old one went away.
from locokit.
Oh, I should mention ArcStore
too. That's Arc Mini's subclass of TimelineStore
, which is something that's necessary to do if you want to subclass TimelineObjects. In Mini's case that's ArcVisit
/ ArcPath
as subclasses of Visit
and Path
.
ArcStore also provides the Place models that aren't part of LocoKit yet. Plus some other stuff. There's a lot going on in there. It's perhaps not a great idea to jump into a TimelineStore subclass initially 😏 Best to save that for when it's needed.
from locokit.
Related Issues (20)
- Xcode 11, Swift 5.1 HOT 2
- The necessary unit tests should be created HOT 5
- Couldn't build LocoKit Develop branch with Xcode 11.2 HOT 1
- Couldn't build LocoKit Develop branch with Xcode 11.3 HOT 1
- Unable to build in Swift 5 HOT 1
- Battery usage optimization HOT 1
- LocoKit won't build on Apple Silicon Macs HOT 6
- LocoKit SPM resolve warning HOT 2
- ClassifierResults only returns one value: Car HOT 2
- Getting Only stationary activityType from most recent TimelineItem HOT 3
- Deleting TimelineItems HOT 5
- Xcode 13 / Swift 5.5 compatible LocoKitCore HOT 4
- Question for Histogram.probabilityFor HOT 2
- Latest 3.9.1 with iOS 16.4.1 extreme battery drain HOT 4
- Xcode 14.1 Simulator don't build
- Machine Learning Classifiers HOT 1
- The positioning will be erratic at night HOT 8
- LocoKit Service / server EOL announcement
- Activity types detection doesn't work out of the box. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locokit.