PICO Unreal Platform SDK
UOnlinePicoUserFunction Class Reference

OnlinePicoUser Blueprint Function class. More...

#include <Pico_User.h>

Static Public Member Functions

static void PicoGetLoggedInUserAndRoom (UObject *WorldContextObject, FGetLoggedInUserFriendsAndRooms InGetLoggedInuserFriendsAndRoomsCallback)
 Gets the friends of the logged-in user and the rooms the friends might be in. If a friend is not in any room, the 'room' field will be null. More...
 
static void PicoGetNextUserAndRoomArrayPage (UObject *WorldContextObject, UPico_UserAndRoomArray *InUserAndRoomArray, FGetNextUserAndRoomArrayPage InGetNextUserAndRoomArrayPageCallback)
 Get the next page of the list of rooms where the friends of the currently logged in user are located. More...
 
static void PicoGetUserFriends (UObject *WorldContextObject, FGetLoggedInUserFriends InGetLoggedInUserFriendsDelegate)
 Gets the friend list of the current user. Friends who don't use this app won't appear in this list. More...
 
static void PicoGetNextUserPage (UObject *WorldContextObject, UPico_UserArray *InUserArray, FGetNextUserPage InGetNextUserPageDelegate)
 Gets the next page of a user list. More...
 
static bool GetLoginUser (UObject *WorldContextObject, FGetLoginUser InGetLoginUserDelegate)
 Gets the information about the current logged-in user. More...
 
static bool GetPicoUserInfo (UObject *WorldContextObject, const FString &UserId, FGetUserInfo InGetUserInfoDelegate)
 Gets user information by user ID. More...
 
static bool GetAuthorizePermissions (UObject *WorldContextObject, FGetPermissionResult OnGetPermissionResultCallback)
 Gets the authorized permissions. More...
 
static bool RequestUserPermissions (UObject *WorldContextObject, TArray< FString > Permissions, FGetPermissionResult OnGetPermissionResultCallback)
 Requests user permissions. The user will received a pop-up notification window. More...
 
static bool LaunchFriendRequestFlow (UObject *WorldContextObject, const FString UserId, FLaunchFriendRequestResult OnLaunchFriendRequestResultCallback)
 Launches the flow to apply for friendship with someone. More...
 
static bool GetAccessToken (UObject *WorldContextObject, FGetAccessTokenResult OnGetAccessTokenResultCallback)
 Gets current login user's AccessToken. The system caches the access token upon the first request, allowing subsequent requests to use the cached token information stored locally. More...
 
static bool GetRelations (UObject *WorldContextObject, TArray< FString > UserIDs, FGetUserRelationResult OnGetUserRelationResultCallback)
 Gets the relationship between a specified user and other user(s). More...
 
static bool EntitlementCheck (UObject *WorldContextObject, bool bKillApp, FEntitlementCheckResult OnEntitlementCheckResultCallback)
 Gets whether the player has entitlement to use the app in the current state. More...
 
static bool GetIDToken (UObject *WorldContextObject, FGetIDToken OnGetIDTokenResultCallback)
 Gets the ID token of the current user. ID token is for OIDC login. China's issuer url is https://platform-cn.picovr.com. The global issuer url is https://platform-us.picovr.com. You can use GetSystemInfo to get the device system's region and choose the right OIDC provider. More...
 
static bool GetOrgScopedID (UObject *WorldContextObject, const FString &UserId, FGetOrgScopedID OnGetOrgScopedIDCallback)
 Gets a user's organization ID. In an organization's apps, each user is assigned a unique organization ID, which remains the same for the same user across different apps within the organization. More...
 

Detailed Description

OnlinePicoUser Blueprint Function class.

Member Function Documentation

◆ EntitlementCheck()

static bool EntitlementCheck ( UObject *  WorldContextObject,
bool  bKillApp,
FEntitlementCheckResult  OnEntitlementCheckResultCallback 
)
static

Gets whether the player has entitlement to use the app in the current state.

Parameters
WorldContextObjectUsed to get the information about the current world.
bKillAppWhether to kill the app in the system when the player does not have the entitlement. If the value is true, you will not get the callback result because the app is killed.
OnEntitlementCheckResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_EntitlementCheckResult *, EntitlementCheck).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ GetAccessToken()

static bool GetAccessToken ( UObject *  WorldContextObject,
FGetAccessTokenResult  OnGetAccessTokenResultCallback 
)
static

Gets current login user's AccessToken. The system caches the access token upon the first request, allowing subsequent requests to use the cached token information stored locally.

Note
User's permission is required if the user uses this app for the first time.
Parameters
WorldContextObjectUsed to get the information about the current world.
OnGetAccessTokenResultCallbackWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, const FString&, AccessToken).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ GetAuthorizePermissions()

static bool GetAuthorizePermissions ( UObject *  WorldContextObject,
FGetPermissionResult  OnGetPermissionResultCallback 
)
static

Gets the authorized permissions.

Parameters
WorldContextObjectUsed to get the information about the current world.
OnGetPermissionResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_PermissionResult *, PermissionResult).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ GetIDToken()

static bool GetIDToken ( UObject *  WorldContextObject,
FGetIDToken  OnGetIDTokenResultCallback 
)
static

Gets the ID token of the current user. ID token is for OIDC login. China's issuer url is https://platform-cn.picovr.com. The global issuer url is https://platform-us.picovr.com. You can use GetSystemInfo to get the device system's region and choose the right OIDC provider.

Note
User's permission is required if using the app for the first time.
Parameters
OnGetIDTokenResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, const FString&, IDToken).
Returns
Bool:
  • true: Send request success
  • false: Send request failure


◆ GetLoginUser()

static bool GetLoginUser ( UObject *  WorldContextObject,
FGetLoginUser  InGetLoginUserDelegate 
)
static

Gets the information about the current logged-in user.

Parameters
WorldContextObjectUsed to get the information about the current world.
InGetLoginUserDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_User *, User).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ GetOrgScopedID()

static bool GetOrgScopedID ( UObject *  WorldContextObject,
const FString &  UserId,
FGetOrgScopedID  OnGetOrgScopedIDCallback 
)
static

Gets a user's organization ID. In an organization's apps, each user is assigned a unique organization ID, which remains the same for the same user across different apps within the organization.

Parameters
UserIdThe Open ID for a user.
OnGetOrgScopedIDCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_OrgScopedID *, OrgScopedID).
Returns
Bool:
  • true: Send request success
  • false: Send request failure

◆ GetPicoUserInfo()

static bool GetPicoUserInfo ( UObject *  WorldContextObject,
const FString &  UserId,
FGetUserInfo  InGetUserInfoDelegate 
)
static

Gets user information by user ID.

Parameters
WorldContextObjectUsed to get the information about the current world.
UserIdThe ID of the user.


Parameters
InGetUserInfoDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_User *, User).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ GetRelations()

static bool GetRelations ( UObject *  WorldContextObject,
TArray< FString >  UserIDs,
FGetUserRelationResult  OnGetUserRelationResultCallback 
)
static

Gets the relationship between a specified user and other user(s).

Parameters
WorldContextObjectUsed to get the information about the current world.
UserIDsThe list of user IDs. The request queries the current logged-in user's relationship with these users. A single request can pass no more than 20 user IDs.
OnGetUserRelationResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_UserRelationResult *, UserRelationResult).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ LaunchFriendRequestFlow()

static bool LaunchFriendRequestFlow ( UObject *  WorldContextObject,
const FString  UserId,
FLaunchFriendRequestResult  OnLaunchFriendRequestResultCallback 
)
static

Launches the flow to apply for friendship with someone.

Parameters
WorldContextObjectUsed to get the information about the current world.
UserIdThe ID of the user that the friend request is sent to.
OnLaunchFriendRequestResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, bool, bDidCancel, bool, bDidSendRequest).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ PicoGetLoggedInUserAndRoom()

static void PicoGetLoggedInUserAndRoom ( UObject *  WorldContextObject,
FGetLoggedInUserFriendsAndRooms  InGetLoggedInuserFriendsAndRoomsCallback 
)
static

Gets the friends of the logged-in user and the rooms the friends might be in. If a friend is not in any room, the 'room' field will be null.

Parameters
WorldContextObjectUsed to get the information about the current world.
InGetLoggedInuserFriendsAndRoomsCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_UserAndRoomArray *, UserAndRoomArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ PicoGetNextUserAndRoomArrayPage()

static void PicoGetNextUserAndRoomArrayPage ( UObject *  WorldContextObject,
UPico_UserAndRoomArray InUserAndRoomArray,
FGetNextUserAndRoomArrayPage  InGetNextUserAndRoomArrayPageCallback 
)
static

Get the next page of the list of rooms where the friends of the currently logged in user are located.

Parameters
WorldContextObjectUsed to get the information about the current world.
InUserAndRoomArrayThe current object of user and room array.


Parameters
InGetNextUserAndRoomArrayPageCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_UserAndRoomArray *, UserAndRoomArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ PicoGetNextUserPage()

static void PicoGetNextUserPage ( UObject *  WorldContextObject,
UPico_UserArray InUserArray,
FGetNextUserPage  InGetNextUserPageDelegate 
)
static

Gets the next page of a user list.

Parameters
WorldContextObjectUsed to get the information about the current world.
InUserArrayThe current object of user array.


Parameters
InGetNextUserPageDelegateWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_UserArray *, UserArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ PicoGetUserFriends()

static void PicoGetUserFriends ( UObject *  WorldContextObject,
FGetLoggedInUserFriends  InGetLoggedInUserFriendsDelegate 
)
static

Gets the friend list of the current user. Friends who don't use this app won't appear in this list.

Parameters
WorldContextObjectUsed to get the information about the current world.
InGetLoggedInUserFriendsDelegateWill be executed when the request has been completed.
Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_UserArray *, UserArray).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure


◆ RequestUserPermissions()

static bool RequestUserPermissions ( UObject *  WorldContextObject,
TArray< FString >  Permissions,
FGetPermissionResult  OnGetPermissionResultCallback 
)
static

Requests user permissions. The user will received a pop-up notification window.

Parameters
WorldContextObjectUsed to get the information about the current world.
PermissionsWill be executed when the request has been completed. Delegate will contain the requested object class.
  • user_info: The permission to get the user's basic information, such as the user's nickname and profile picture.
  • friend_relation: The permission to get the user's friend list and invitable users.
  • sports_userinfo: The permission to get the user's information set in the sport center.
  • sports_summarydata: The permission to get a summary of the user's exercise data.
OnGetPermissionResultCallbackWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_PermissionResult *, PermissionResult).
Returns
Bool:
  • true: Send request successful
  • false: Send request failure