Device Indexing

Access the unique device identifier of native mobile devices in your WeWeb application.

Overview

The Device ID feature allows you to retrieve a unique identifier for each mobile device running your WeWeb application through Despia. This is particularly useful for:

  • Linking devices to user accounts

  • Preventing account sharing

  • Managing free plan limitations

  • Tracking device-specific analytics

Prerequisites

Before you begin, ensure you have the Despia plugin installed in your WeWeb project:

  1. Go to the WeWeb Marketplace

  2. Search for and install the Despia plugin

  3. Verify installation by checking AssetsLibrary → look for the book symbol showing "Despia provider" library

Implementation Steps

Step 1: Add the Despia Plugin to Your Page

  1. Click the Add button in your WeWeb editor

  2. Navigate to the Assets panel (switch from Basics to Assets)

  3. Find Despia provider and Despia native components

  4. Drag the Despia plugin element onto your page

  5. Release it anywhere on the page (it provides native functionalities without visible UI)

Step 2: Access the Device ID Variable

  1. Add any element where you want to display or use the device ID (e.g., a Text element)

  2. Select the element and make its content dynamic

  3. Open the Variables panel

  4. Navigate to Despia plugin variables section

  5. Select Despia plugin device id

The variable path will be: Despia plugin > device id

Step 3: Use the Device ID

You can use the device ID variable in multiple ways:

  • Display: Show it in a text element for debugging

  • Backend Integration: Send it with API requests to link devices with user accounts

  • Conditional Logic: Use it in workflows for device-specific features

Testing

  • In Browser: The device ID will display as "example device id" when testing in the WeWeb editor

  • On Device: The actual unique device ID will appear when running the app through Despia on a real mobile device

Publishing Changes

  1. Click Publish in WeWeb to deploy to your subdomain or primary domain

  2. Changes are automatically available in your mobile app via over-the-air updates

  3. No app rebuild or App Store resubmission required

Important Notes

  • The device ID is persistent and unique to each physical device session

  • The ID remains the same even after app reinstalls (on iOS, it may change after a factory reset)

  • Over-the-air updates mean any changes to Despia plugin configurations are instantly reflected in your live app without rebuilding

  • This feature is fully compliant with App Store and Google Play guidelines

Common Use Cases

  • Account Security: Limit the number of devices per user account

  • Analytics: Track user behavior across specific devices

  • Free Plan Management: Restrict free tier access to a certain number of devices

  • Device-Specific Settings: Store preferences per device rather than per account

Need Help?

For additional support or questions, please contact our support team at support@despia.com

Updated on