Device Integration
Client Library
The Senza Client Library is a package that your app can use to integrate with the Senza platform. You can get started easily by following these steps:
- Link to the client library by installing it as an NPM package or using a script tag.
- Add a few lines of code to initialize the library and tell it when your user interface is ready.
Device Info
To test that the client library is working, you can try using the Device Manager to load the device info. This is just a simple object that contains some information about the current device.
The About this Device sample app includes a short example of how to display device info on the screen. For example, you can call deviceManager.deviceInfo.deviceId
to get the device ID.
Geolocation
Web servers typically have the ability to use the client's IP address to determine the user's location. They may do this to provide a customized experience to users in different countries, or to limit who can connect to a service.
With Senza, the web app runs in a browser in the cloud. When the app makes a request to a server, it will appear to have an IP address that corresponds to the location of the cloud provider's data center, not the end user's device.
The Geolocation tutorial covers how to use the Device Manager to get the client IP address, as well as the country code. See also the Geolocation video tutorial.
Updated about 1 month ago