BlackBerry profile provider (ids_blackberry_profile.h)

Use BlackBerry profile as an identity provider, and provide off-device data storage.

BlackBerry profile is an identity provider that allows access to off-device, encrypted storage space. The storage space is bound to the BlackBerry ID user that is currently logged in. The storage is accessible remotely from all devices logged in with the same BlackBerry ID user, allowing applications installed on multiple devices access to the same information.

IDS API support

BlackBerry profile supports the following Identity Service functions. Using BlackBerry profile with other functions will result in errors.
  • ids_create_data()
  • ids_get_data()
  • ids_set_data()
  • ids_delete_data()
  • ids_list_data()
  • ids_register_notifier()

Off-device data storage and retrieval APIs

Applications can use the APIs to securely store data in, and retrieve data from, the BlackBerry ecosystem. APIs are provided for storing data initially (ids_create_data()), retrieving the data (ids_get_data()), updating the data (ids_set_data()), and removing the data (ids_delete_data()).

Data usage

In order to store and retrieve data off of the device, wireless data is consumed. Applications using storage from BlackBerry profile must have the "Internet" permission included in their bar descriptor file.

Permissions

In order to store and retrieve data off of the device, wireless data is consumed. Applications using storage from BlackBerry profile must have the access_internet permission included in their application descriptor file.

Limits to storage capacity

There's a limit to the amount of off-device storage that is available to each of your users. Storage limits are set according to user and app vendor, and apply to all of the apps that a user might have with a single vendor. As of 1 May 2014, the storage capacity is 10 MB, though BlackBerry may increase or decrease this capacity without notice. For example, if you have multiple apps that require off-device storage, and you have a user who makes use of three of those apps, that user's storage limit applies to the total amount of storage space that those three apps require. Users can have multiple storage allocations, one for each app vendor.

Caching

In cases where the application may need data stored locally for quick or repeated access, the value can be cached securely on the device and retrieved on demand, even when not connected to the remote storage copy. The cache is synchronized with the remote copy so that the cache is always up to date while the device has appropriate data coverage.

Using profile storage

Create - Store a new entry

Call ids_create_data() to store new profile entries.
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_create_data_flag.

Set - Update an entry

Call ids_set_data() to update profile entries.
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_set_data_flag.

Get - Retrieve an entry

Call ids_get_data() to retrieve profile entries.
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_get_data_flag.

Delete - Remove an entry

Call ids_delete_data() to remove profile entries.
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_delete_data_flag.

Get - List available entries

Call ids_list_data() to list profile entries.
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_list_data_flag.

Notifications

Notifications can be registered for entries either before or after they have been created. In cases where the registration is done after creation, the application is notified each time the value changes so that it can perform any necessary operations. If registration is done before an entry is created, the application is notified upon creation of the value as if it were an update. Additionally, registered applications receive a change notification when an entry is deleted.

To register for profile entry change notifications, call ids_register_notifier().
  • type is one of the ids_bbprofile_type profile types.
  • flags are a combination of ids_bbprofile_register_notifier_flag.

Each time a registered entry changes, the registered callback function is executed and the corresponding ids_bbprofile_notification indicates the kind of change that occurred.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus