User Management
Call user methods on the Fedo singleton. These must be called after Fedo.initialize.
Anonymous User​
If setUserID is not called, and Feedbacks Screen is opened, anonymous user will be created with random id, and cached. So, next app session will keep using the same anonymous id created before.
Once the user authenticates to your app, you can call setUserID and all interactions (feedbacks created, comments, votes) done by the anonymous user will be migrated to the newly authenticated user. Then the anonymous user is permanently deleted.
Data migration only happens when moving from anonymous user to authenticated user
Methods:​
All methods below can be called synchronously. An internal queue will handle calling them one by one in the right order. A failing operation is skipped and the queue continues with the next one.
Currently there is no retry or offline support. If any of these calls fails, it will not be retried automatically — you must call it again. Offline support is planned for a future version.
setUserID​
We recommend against calling setUserID for anonymous visitors to your app.
Call setUserID when you know the identity of the current user, passing in their user ID as an argument. This is typically at account registration and at log in.
Calling setUserID with the same id is a no-op.
Fedo.setUserID("user-abc-123")
setUserDisplayName​
Display name shown on feedback and comments created by this user.
Fedo.setUserDisplayName("Jane Doe")
setUserEmail​
Fedo.setUserEmail("jane@example.com")
addUserProperty​
Attach custom key-value metadata to the user (e.g. plan tier, team, beta cohort).
Fedo.addUserProperty("plan", "enterprise")
Fedo.addUserProperty("team", "design")
applying the same key again, will override previous assignments,
Fedo.addUserProperty("tier", "gold")
Fedo.addUserProperty("tier", "silver") // overrides the line before
Predefined User Properties​
The SDK automatically attaches device information to each user. These properties are collected during initialization and updated on each app session.
| Property | Type | Description |
|---|---|---|
_manufacturer | String | Device manufacturer |
_brand | String | Device brand |
_model | String | Device model |
_device | String | Device name |
_osVersion | String | OS version string |
_sdkInt | Int | Android SDK version |
_screenWidthPx | Int | Screen width in pixels |
_screenHeightPx | Int | Screen height in pixels |
_densityDpi | Int | Screen density (DPI) |
_locale | String | User locale |
_timeZone | String | Device timezone |
_appVersionName | String | App version name |
_appVersionCode | Long | App version code |
These properties are automatically collected and cannot be disabled.
logout​
Logs out the currently authenticated user, clear all user cached data (token, ID, name, email, properties), then immediately creates a new anonymous user. If the current user is anonymous, nothing happens.
Fedo.logout()