@robono/location-react-native 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +130 -0
- package/README.md +113 -2
- package/SBOM.spdx.json +719 -0
- package/app.plugin.cjs +59 -0
- package/dist/AvatarLocationMap.d.ts +14 -0
- package/dist/AvatarLocationMap.js +203 -0
- package/dist/GeofenceEditor.d.ts +23 -0
- package/dist/GeofenceEditor.js +112 -0
- package/dist/LocationScreen.d.ts +30 -0
- package/dist/LocationScreen.js +142 -0
- package/dist/MapView.d.ts +15 -0
- package/dist/MapView.js +16 -0
- package/dist/expo.d.ts +65 -0
- package/dist/expo.js +425 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/motion.d.ts +16 -0
- package/dist/motion.js +45 -0
- package/dist/visual/RobonoIcon.d.ts +232 -0
- package/dist/visual/RobonoIcon.js +20 -0
- package/dist/visual/icon-nodes.d.ts +3 -0
- package/dist/visual/icon-nodes.js +2 -0
- package/dist/visual/icon-paths.d.ts +221 -0
- package/dist/visual/icon-paths.js +221 -0
- package/licenses/robono-icons-lucide-license.txt +43 -0
- package/licenses/robono-icons-weather-attribution.txt +1 -0
- package/licenses/robono-icons-weather-license.txt +21 -0
- package/package.json +72 -4
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
ROBONO SDK LICENSE AGREEMENT
|
|
2
|
+
Version 1.0, July 20, 2026
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Add to Loop LLC. All rights reserved.
|
|
5
|
+
|
|
6
|
+
This Robono SDK License Agreement (the "Agreement") is between Add to Loop LLC,
|
|
7
|
+
operating the Robono service ("Robono"), and the person or entity that downloads,
|
|
8
|
+
installs, copies, or uses the Software ("You"). By downloading, installing,
|
|
9
|
+
copying, or using the Software, You accept this Agreement. If You do not accept
|
|
10
|
+
it, do not use the Software.
|
|
11
|
+
|
|
12
|
+
1. Definitions
|
|
13
|
+
|
|
14
|
+
"Software" means this Robono software development kit, its documentation, and
|
|
15
|
+
any updates Robono provides under this Agreement.
|
|
16
|
+
|
|
17
|
+
"Robono Service" means the messaging interoperability, routing, policy,
|
|
18
|
+
conversion, delivery, and related services operated or expressly authorized by
|
|
19
|
+
Robono.
|
|
20
|
+
|
|
21
|
+
"Application" means a product or service owned or controlled by You that is
|
|
22
|
+
authorized to connect to the Robono Service.
|
|
23
|
+
|
|
24
|
+
2. Limited License
|
|
25
|
+
|
|
26
|
+
Subject to this Agreement, Robono grants You a limited, non-exclusive,
|
|
27
|
+
non-transferable, non-sublicensable, revocable license to:
|
|
28
|
+
|
|
29
|
+
(a) install, copy, and use the Software internally to develop, test, and
|
|
30
|
+
operate an Application that communicates with the Robono Service; and
|
|
31
|
+
|
|
32
|
+
(b) reproduce and distribute the portions of the Software that are necessarily
|
|
33
|
+
included in Your Application, solely in compiled, minified, bundled, or object
|
|
34
|
+
code form and solely as needed for that Application to communicate with the
|
|
35
|
+
Robono Service.
|
|
36
|
+
|
|
37
|
+
No right is granted to distribute the Software as a standalone product or SDK.
|
|
38
|
+
|
|
39
|
+
3. Restrictions
|
|
40
|
+
|
|
41
|
+
You may not, and may not permit another person to:
|
|
42
|
+
|
|
43
|
+
(a) sell, rent, lease, sublicense, publish, or redistribute the Software as a
|
|
44
|
+
standalone product, library, SDK, or service;
|
|
45
|
+
|
|
46
|
+
(b) use the Software or a modified or derivative version of it to develop,
|
|
47
|
+
provide, or support a product or service that competes with the Robono Service;
|
|
48
|
+
|
|
49
|
+
(c) use the Software to bypass Robono, avoid applicable usage controls or fees,
|
|
50
|
+
or access the Robono Service without authorization;
|
|
51
|
+
|
|
52
|
+
(d) remove or alter copyright, trademark, attribution, or proprietary notices;
|
|
53
|
+
|
|
54
|
+
(e) reverse engineer, decompile, or disassemble the Software except to the
|
|
55
|
+
limited extent applicable law expressly prohibits this restriction; or
|
|
56
|
+
|
|
57
|
+
(f) use the Software in violation of applicable law, the rights of another
|
|
58
|
+
person, or the terms governing access to the Robono Service.
|
|
59
|
+
|
|
60
|
+
4. Ownership and Reserved Rights
|
|
61
|
+
|
|
62
|
+
The Software is licensed, not sold. Robono and its licensors retain all right,
|
|
63
|
+
title, and interest in the Software and all related intellectual property.
|
|
64
|
+
Except for the limited rights expressly granted in Section 2, all rights are
|
|
65
|
+
reserved.
|
|
66
|
+
|
|
67
|
+
No patent license is granted except the minimum license, if any, necessarily
|
|
68
|
+
required to exercise the rights expressly granted in Section 2, and that
|
|
69
|
+
limited patent license applies only while the Software is used with an
|
|
70
|
+
authorized Robono Service.
|
|
71
|
+
|
|
72
|
+
5. Service Access
|
|
73
|
+
|
|
74
|
+
This Agreement does not itself grant an account, API credentials, service
|
|
75
|
+
availability, support, or a right to access the Robono Service. Service access
|
|
76
|
+
may be governed by additional terms, plans, limits, and policies. Robono may
|
|
77
|
+
suspend or terminate access to protect users, systems, legal compliance, or the
|
|
78
|
+
integrity of the Robono Service.
|
|
79
|
+
|
|
80
|
+
6. Updates and Support
|
|
81
|
+
|
|
82
|
+
Robono is not required to provide maintenance, updates, support, or continued
|
|
83
|
+
availability of any version of the Software unless separately agreed in
|
|
84
|
+
writing.
|
|
85
|
+
|
|
86
|
+
7. Term and Termination
|
|
87
|
+
|
|
88
|
+
This Agreement continues until terminated. Your rights terminate automatically
|
|
89
|
+
if You breach this Agreement. On termination, You must stop using the Software
|
|
90
|
+
and delete copies under Your control, except for copies necessarily contained
|
|
91
|
+
in previously distributed Applications. Sections 3, 4, 8, 9, 10, and 11
|
|
92
|
+
survive termination.
|
|
93
|
+
|
|
94
|
+
8. Disclaimer of Warranties
|
|
95
|
+
|
|
96
|
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" AND
|
|
97
|
+
"AS AVAILABLE," WITHOUT WARRANTIES OF ANY KIND, EXPRESS, IMPLIED, OR
|
|
98
|
+
STATUTORY, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
99
|
+
PURPOSE, TITLE, AND NON-INFRINGEMENT.
|
|
100
|
+
|
|
101
|
+
9. Limitation of Liability
|
|
102
|
+
|
|
103
|
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, ROBONO WILL NOT BE LIABLE FOR INDIRECT,
|
|
104
|
+
INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR LOSS
|
|
105
|
+
OF DATA, REVENUE, PROFITS, GOODWILL, OR BUSINESS OPPORTUNITY, ARISING FROM OR
|
|
106
|
+
RELATING TO THE SOFTWARE. ROBONO'S TOTAL LIABILITY RELATING TO THE SOFTWARE
|
|
107
|
+
WILL NOT EXCEED THE GREATER OF ONE HUNDRED U.S. DOLLARS (US $100) OR THE AMOUNT
|
|
108
|
+
YOU PAID ROBONO FOR THE SOFTWARE DURING THE TWELVE MONTHS BEFORE THE EVENT
|
|
109
|
+
GIVING RISE TO THE CLAIM. THESE LIMITATIONS APPLY TO THE MAXIMUM EXTENT
|
|
110
|
+
PERMITTED BY LAW.
|
|
111
|
+
|
|
112
|
+
10. Governing Law
|
|
113
|
+
|
|
114
|
+
This Agreement is governed by the laws of the State of Florida, excluding its
|
|
115
|
+
conflict-of-laws rules. The state and federal courts located in Palm Beach
|
|
116
|
+
County, Florida have exclusive jurisdiction, and each party consents to their
|
|
117
|
+
jurisdiction and venue.
|
|
118
|
+
|
|
119
|
+
11. General
|
|
120
|
+
|
|
121
|
+
You may not assign this Agreement without Robono's prior written consent.
|
|
122
|
+
Robono may assign this Agreement in connection with a reorganization, transfer
|
|
123
|
+
of intellectual property, financing, merger, acquisition, or sale of all or
|
|
124
|
+
substantially all of the relevant assets. If a provision is unenforceable, it
|
|
125
|
+
will be enforced to the maximum extent permitted and the remaining provisions
|
|
126
|
+
will remain effective. A waiver must be in writing. This Agreement is the
|
|
127
|
+
entire agreement concerning the Software unless You and Robono sign a separate
|
|
128
|
+
written agreement that expressly replaces it.
|
|
129
|
+
|
|
130
|
+
Questions about this license may be submitted at https://robono.com/contact.
|
package/README.md
CHANGED
|
@@ -1,3 +1,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Optional Robono mobile Maps
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The supplied map controls use Robono’s shared SVG icons. Install `react-native-svg` with your framework’s native dependency installer.
|
|
4
|
+
|
|
5
|
+
Use these components together or individually. Your app owns navigation, authentication, consent and permission policy. Maps can be a standalone screen, part of messaging, or both.
|
|
6
|
+
|
|
7
|
+
Exports:
|
|
8
|
+
- `LocationScreen`: sharing controls, freshness, speed, heading, duration and stop control.
|
|
9
|
+
- `LocationMessage`: a location card for your chat UI.
|
|
10
|
+
- `GeofenceEditor`: controlled circle/polygon drawing, arrival/departure toggles and validated saving.
|
|
11
|
+
- `AvatarLocationMap`: avatar pins with tap-to-open name/update details, a Directions action and a destination route. Tapping the map closes the details without removing the avatar.
|
|
12
|
+
- `RobonoMapView`: Google map, markers, circles, polygons and routes.
|
|
13
|
+
- `@robono/location-react-native/expo`: foreground/background GPS adapters.
|
|
14
|
+
- `@robono/location-react-native/motion`: opt-in movement sharing with durable stop recovery.
|
|
15
|
+
- `@robono/location-react-native/app.plugin.cjs`: Expo native configuration.
|
|
16
|
+
|
|
17
|
+
Register your bundle ID and Android package/signing certificate with Robono. Activate access in Maps → Add Maps to your app, then download each platform’s app configuration. Robono provides map access restricted to those identifiers. Keep that managed build configuration in your private build environment. Do not ask end users for keys.
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
plugins: [['@robono/location-react-native/app.plugin.cjs', {
|
|
21
|
+
accessFiles: {ios: './robono-maps-ios.json', android: './robono-maps-android.json'},
|
|
22
|
+
background: true,
|
|
23
|
+
permissionText: 'Share your location with the people you choose.',
|
|
24
|
+
}]]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Native map/location dependencies require a native build. Match Expo dependencies to the host's supported Expo version and commit its lockfile. These peers are optional at the product level: apps not using Maps do not install this package.
|
|
28
|
+
|
|
29
|
+
## Start only after the user chooses to share
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import {defineLocationTask, createExpoLocationSharing} from '@robono/location-react-native/expo';
|
|
33
|
+
|
|
34
|
+
// Module scope, including on a background launch:
|
|
35
|
+
defineLocationTask({taskName: 'app-location-sharing', store: trackingStore,
|
|
36
|
+
getClient: restoreAuthenticatedLocationClient, createId, onError: handleTrackingError});
|
|
37
|
+
|
|
38
|
+
const sharing = createExpoLocationSharing({client, createId,
|
|
39
|
+
taskName: 'app-location-sharing', store: trackingStore,
|
|
40
|
+
notificationTitle: 'Location sharing is active',
|
|
41
|
+
notificationBody: 'Open the app to stop sharing.',
|
|
42
|
+
});
|
|
43
|
+
await sharing.start({grantId, mode: 'live', durationMinutes: 60,
|
|
44
|
+
intervalSeconds: settings.updateIntervalSeconds, background: true});
|
|
45
|
+
await sharing.stop();
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`trackingStore` implements async `load()` and `save(context|null)` using the app's persistent storage. It stores only session ID, expiry and update interval. Authentication is restored separately using the app's secure session storage. Never persist a network API key there. Register the task once, outside React render functions.
|
|
49
|
+
|
|
50
|
+
Android requires an ongoing foreground-service notification for background sharing. iPhone requires background location permission and displays its location indicators. Ask for background access only for a user-selected feature. The OS may delay updates or stop tracking when the app is force-closed; show stale data as last known. On sign-out, call `stop()` before discarding authentication. If offline, stop local GPS immediately and retry the server stop once connected; the share also expires on the server.
|
|
51
|
+
|
|
52
|
+
Use `observeLocation` from the core client for viewers. Clear old positions when its view becomes null. `dispose()` releases foreground watchers; it deliberately does not stop a separately requested background share. Stop background sharing explicitly with `stop()`.
|
|
53
|
+
|
|
54
|
+
Do not treat an ordinary contact relationship as permission to track someone. The backend must establish directed, time-bounded grants and synchronize revocation.
|
|
55
|
+
|
|
56
|
+
## Chat map
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
<AvatarLocationMap position={view.position} name={view.name}
|
|
60
|
+
avatar={view.avatar} updated={locationAge(view.position.capturedAt)}
|
|
61
|
+
route={view.route?.coordinates} destination={view.destination}
|
|
62
|
+
onDirections={openExternalDirections}
|
|
63
|
+
onLocateMe={getForegroundPosition} />
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Import `getForegroundPosition` from `@robono/location-react-native/expo` for the optional Locate Me control. It requests foreground access only when pressed, uses the viewer position locally, and cancels pending GPS work when the map closes. It does not share that position with the other participant. The friend control zooms to the shared pin; Locate Me fits both positions within the visible map. The map includes Regular and Satellite views. Dragging keeps the details open; tapping elsewhere dismisses them.
|
|
67
|
+
|
|
68
|
+
The containing screen controls navigation and clears the map when access expires or is withdrawn. `onDirections` should open Apple Maps directly on iPhone or Google Maps directly on Android. Render `tripSummary(view, units)` beside a live trip for speed and estimated arrival; do not present stale estimates as current.
|
|
69
|
+
|
|
70
|
+
For an atomic chat start, pass `startWithPosition` to `createExpoLocationSharing`. It receives the user's first accurate fix and a request ID before background GPS starts. Forward those to `LocationChatClient.start`; the adapter skips the redundant first update. Persist a start-recovery record before sending the request, so your app can recover a lost response or interrupted start. Store only session/recovery metadata, never a history of coordinates.
|
|
71
|
+
|
|
72
|
+
Permission recovery: the Expo adapter throws `LocationPermissionError` with `permission` (`foreground` or `background`) and `canAskAgain`. Offer a settings link if access is denied; do not silently downgrade a background share. A host can offer an explicit open-app-only trip using `background: false`, keep the sharing controller alive after its sheet closes, and call `stop()` when the app enters the background. Robono Messenger supplies this recovery flow.
|
|
73
|
+
|
|
74
|
+
## Improve accuracy
|
|
75
|
+
|
|
76
|
+
Call `getPrecisePosition({signal, onPosition})` from the Expo entry point only after
|
|
77
|
+
the user selects **Improve accuracy**. It reports usable fixes while refining for
|
|
78
|
+
up to 12 seconds and returns the best recent reported radius. Pass the resulting
|
|
79
|
+
position to your map and display `locationAccuracyLabel(position)` from the core
|
|
80
|
+
package. Additional decimal places do not mean additional accuracy. This does
|
|
81
|
+
not promise an exact position or upload Wi-Fi/Bluetooth scans.
|
|
82
|
+
|
|
83
|
+
## Share device movement
|
|
84
|
+
|
|
85
|
+
Install the `expo-sensors` version compatible with your Expo SDK and enable
|
|
86
|
+
`motion: true` in the Robono location plugin. Use an account-specific persistent
|
|
87
|
+
store implementing `load()` and `save(value|null)` for pending stop recovery.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import {createExpoMovementSharing} from '@robono/location-react-native/motion';
|
|
91
|
+
const movement = createExpoMovementSharing({
|
|
92
|
+
client, store: movementStore, createId, onError: showMovementError,
|
|
93
|
+
});
|
|
94
|
+
await movement.recover(); // On signed-in startup: finish a pending stop.
|
|
95
|
+
// Wire these to the optional LocationScreen onMotionSharing control:
|
|
96
|
+
await movement.start(sessionId); // Only after the user chooses Share movement.
|
|
97
|
+
await movement.stop();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Keep one controller per signed-in account. Call `stop()` when sharing ends or
|
|
101
|
+
before signing out. It stops sensors immediately, even without a network, and
|
|
102
|
+
retains a failed server-stop request for the next authenticated startup. A restart
|
|
103
|
+
never automatically resumes movement capture. Do not reuse another account's store.
|
|
104
|
+
|
|
105
|
+
Pass `view.motion` to `LocationScreen` for the viewer. Readings distinguish still,
|
|
106
|
+
slight movement and moving; stale readings display unavailable. Raw sensor samples
|
|
107
|
+
stay on the phone. Capture runs while the app is open on both platforms and pauses
|
|
108
|
+
in the background. These indicators cannot establish whether someone is touching
|
|
109
|
+
the screen, reading, or using another app.
|
|
110
|
+
|
|
111
|
+
`GeofenceEditor` offers entry/exit alerts, arm-on-entry, and optional schedules
|
|
112
|
+
with days, local time zone, and expected arrival/departure times. A missing or
|
|
113
|
+
inaccurate position produces **location unavailable**, not a claim that the person
|
|
114
|
+
is outside. Schedule times apply to the chosen time zone, including daylight saving.
|