This example app demonstrates how to use the SaveEye SDK to interact with SaveEye devices. The app includes examples of provisioning devices, connecting to WiFi, retrieving device information, and subscribing to real-time data.
An overview of the SDK can be found here: SaveEyeSDK
Before running the example app, ensure you have the following installed:
- Node.js (>= 14.x)
- Yarn package manager
- React Native CLI
- Xcode (for iOS development)
- Android Studio (for Android development)
- Clone the repository:
git clone https://github.com/your-repo/saveeye-sdk-example.git
cd saveeye-sdk-example- Install dependencies:
yarn install-
Add your
GoogleService-Info.plistfile to the appropriate directory for iOS andgoogle-services.jsonfor Android. -
Add your SDK key in a new file called
Secrets.tsx:
// filepath: /src/Secrets.tsx
export const AppSdkKey = 'YOUR_SDK_KEY_HERE';- Install CocoaPods dependencies:
cd ios
pod install
cd ..- Run the app:
yarn ios- Run the app:
yarn androidThe example app includes the following features:
- Initialize
- Provisioning a Device
- Connecting to WiFi
- Retrieving Device Information
- Subscribing to Real-Time Data
- Unsubscribing from Real-Time Data
- Setting Device Alias
- Setting Local MQTT Settings
- Setting Device Alarm Thresholds
For support or questions, please contact thj@saveeye.com.