A sample React-Native application to start learning the power of Situm's React Native SDK Plugin.
Situm SDK is a set of utilities that allow any developer to build location based apps using Situm's indoor positioning system. Among many other capabilities, apps developed with Situm SDK will be able to:
- Obtain information related to buildings where Situm's positioning system is already configured: floor plans, points of interest, geotriggered events, etc.
- Retrieve the location of the smartphone inside these buildings (position, orientation, and floor where the smartphone is).
- Compute a route from a point A (e.g. where the smartphone is) to a point B (e.g. any point of interest within the building).
The first step is to download this repo:
git clone https://github.com/situmtech/react-native.git
And then install the plugin dependencies alongside the example/ app dependecies as follows:
cd situm-react-native-plugin/;
yarn install;
yarn example install;
- iOS
In case you are using iOS, the last step is to install de dependencies specified in
example/ios/Podfile
with:
cd ios/
pod install
For this step you must create a situm account, so setup your account before continuing.
After creating your situm account, you can set your credentials on the properties of src/situm.tsx
, like so:
export const SITUM_EMAIL = '';
export const SITUM_API_KEY = '';
export const SITUM_BUILDING_ID = ''; // Identifier of the building
export const SITUM_DASHBOARD_URL = 'https://dashboard.situm.com';
NOTE: You should also fill the SITUM_BUILDING_ID and SITUM_FLOOR_ID variables so all the examples are able to work as expected. In case you haven't created POIs or paths yet, learn how to create these cartography elements.
-
Run from command line:
- Initialize the metro terminal with
$ react-native start
- Then (in another terminal) compile and run this app in your device with
$ react-native run-android
.
- Initialize the metro terminal with
-
Run from Android Studio: Open
root/android
folder in Android Studio and run project.
-
Run from command line:
- Initialize the metro terminal with
$ react-native start
- Then (in another terminal) compile and run this app in your device with
$ react-native run-ios
.
- Initialize the metro terminal with
-
Run from XCode: Go to
example/ios
folder and openexample.xcworkspace
or run commandxed ios
from root directory.
More information on how to use the official React Native plugin and the set of APIs, the functions, parameters and results each function accepts and provides can be found in our Cordova JSDoc which shares interfaces.
In case you want to learn how to use our plugin, you may want to take a look at our code samples of the basics functionalities:
- Showcasing our SDK
- Positioning: Learn how to start positioning and get the user location by using our listener with the specified positioning configuration inside
src/settings.tsx
file. - Positioning with Remote Configuration: Learn how to start positioning with the remote configuration defined in the settings section inside our dashboard. This way you can manage your positioning parameters with ease and avoid doing several code changes to test different configurations.
- Show buildings basic info: Learn how to retrieve the basic info of a building. (e.g. buildingIdentifier, name, creation date, ...)
- Show a building full info from different calls: Learn how to retrive all the information related to a building in different calls. (e.g. floors, pois, geofences, custom fields, ...)
- Show a building's full info: Learn how to fetch all the information related to a building with just one call.
- Show the route between pois: Learn how to retrieve all the info of a route between 2 pois.
- Positioning: Learn how to start positioning and get the user location by using our listener with the specified positioning configuration inside
- Showcasing our Wayfinding module:
- Complete Wayfinding Experience: An integrated wayfinding experience powered by Situm, designed for ease of integration.
- Navigate to POI: Learn how to trigger the navigation to a concrete POI and display it on the map.
- Select POI: Learn how to set a POI as selected on the map.
We use SemVer for versioning.
Please refer to CHANGELOG.md for a list of notables changes for each version of the library.
You can also see the tags on this repository.
You will need to sign a Contributor License Agreement (CLA) before making a submission. Learn more here.
This project is licensed under the MIT - see the LICENSE file for details.
More info is available at our Developers Page.
For any question or bug report, please send an email to [email protected]