1.0.0 • Published 1 year ago

@simport/location-privacy-toolkit v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Location Privacy Toolkit by SIMPORT ·

npm.io


Location Privacy Toolkit, that can be included into Angular and Ionic based mobile apps. This toolkit is aimed to be used as a replacement for usual location APIs. The goal of this toolkit is to allow users to actively control and monitor, which data is used by an app. Furthermore users can set preferences to the usage of location data using fine-grained control mechanisms. This is part of the SIMPORT project.

Status: prototyping 🛠️

Contents

Library Usage

API

The accessible API of the Location Privacy Toolkit is basically given by the following two elements.

Location Service

The Location Service provides the app with the usual interfaces to request location data. First and foremost it reveals access to the actual location data in two ways: A simple method for a one-time location data request.

getCurrentLocation(): Promise<Position | undefined>

and also request for continuous location updates by registering a simple listener including the ability to unregister it later on.

registerListener(callback: (location: Position | undefined) => void)
removeListener()

Additionally the Location Service provides the following helper methods for the access-status and request of location data.

canUseLocation(requestPermission: Boolean = false): Promise<Boolean>
needsLocationAccessRequest(): Promise<Boolean>
requestLocationAccess(): Promise<Boolean>

Location Configuration Component

The Location Privacy Configuration Component is a central component, that ultimately controls the output of the Location Service. This component is designed to be presented to the users of location based services. They can use it to define when, how and which location data is shared with the service. In order to address various kinds of users, the Location Privacy Configuration Component comes in two modes: a Expert Mode and a Simple Mode.

Expert Mode

Using the expert mode users have a wide set of options at their hands to be able to manipulate which and how location data is shared with the underlying location based service. Each location privacy option is complemented by a detailed info-view, which educates users about the impact each setting potentially makes to the behaviour of the Location Service.

Location Privacy OptionOptions
One-time location requestsAllow / Disallow
Continuous location requestsAllow / Disallow
Accuracy0 / 100 / 500 / 1,000 meters
Interval0 / 1 / 10 / 30 minutes
Simple Mode

Using the simple mode users have a simple slider at hand that is used to control the Location Privacy Configuration Component. This form of interaction comes with 3 presets to use:

Location Privacy OptionEffect
Privacy focusMaximum privacy setting at the expense of service quality
BalancedBalance between privacy and service quality
Service focusMaximum service quality at the expense of privacy
Location History

Furthermore a location history view provides the user with the ability to view their location data on a map. Using various visualisations users can explore and comprehend the location data recorded about themselves.

Architecture

The architecture used in this Location Privacy Toolkit is inspired by the following work of Mehrnaz Ataei: Location Data Privacy : Principles to Practice.

Example

In course of the project a sample app was created: The Playground-Finder is a simple app, that helps users to find playgrounds in their area. That app makes use of this Location Privacy Toolkit and can be seen as an example on how to integrate it.

License

SIMPORT Location Privacy Toolkit
Copyright (c) 2022 Sitcom Lab

Further information

1.0.0

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago