ICDeviceProfile (Discontinued)

🚧

Note

Please note that we have announced end of sale for Cordova SDK. It is no longer offered as a standard Webex Connect capability.

Holds information about a device and associated user data. Device profiles are registered with the Webex Connect platform to allow targeted communication between the platform and the plugin.

If a device profile is registered without providing a specific appUserId value, the Webex Connect platform will generate one automatically. The currently registered device profile is accessible via IMIconnectPlugin.getDeviceProfile().

👍

TIP

We recommend using an Instance ID or UUID for your deviceId. The defaultDeviceId is provided for convenience and uses the standard ANDROID_ID value of the device(Android) and vendor ID of the device(IOS).

getAppUserId

This method is used to get the App user ID. Use the below method to call the getAppUserId.

IMIconnectPlugin.getDeviceProfile (
                    function(deviceProfile){					
                        console.log(deviceProfile.getAppUserId();
                    }
            );

getCustomerId

This method is used to get the Customer ID. Use the below method to call the getCustomerId.

IMIconnectPlugin.getDeviceProfile (
                    function(deviceProfile){					
                        console.log(deviceProfile.getCustomerId();
                    }
            );

isAppUserSystemGenerated

This method is used to validate if userId is generated by the Webex Connect system or not.

IMIconnectPlugin.getDeviceProfile (
                    function(deviceProfile){					
                        console.log(deviceProfile.isAppUserSystemGenerated();
                    }
            );

getDefaultDeviceId

Convenience method for obtaining a device Id. The id returned is equivalent to Settings.Secure.ANDROID_ID(Android) and vendor ID of the device(IOS).

IMIconnectPlugin.getDeviceProfile (
                    function(deviceProfile){					
                        console.log(deviceProfile.getDefaultDeviceId();
                    }
            );

setDeviceId

This method is used to set the unique deviceId to the device profile.

Syntax: setDeviceId(String deviceId)

ParameterTypeDescription
deviceIdstringA unique identifier for the device

setAppUserId

This method is used to set the appUserId to the device profile.

Syntax: setAppUserId(String appUserId)

ParameterTypeDescription
appUserIdstringA unique identifier representing the device user

setGuest

This method is used to set guest flag to device profile. Guest flag indicates if the current user of the app is logged in as a guest

Syntax: setGuest(Boolean isGuest)

ParameterTypeDescription
isGuestBooleanA flag that indicates if the current user of the app is logged in as a guest