Why can't call User_GetName() and CheckRegisteredRole(UserId) actions in offline mode

I can see that mobile app screens are showing restrictions and access with their corresponding role even it mobile app is in offline mode. It means roles can be checked in offline mode but when I tried to call the below 2 methods then it gives error.

1.  User_GetName()

2. CheckRegisteredRole(UserId)

I am not getting that why we cannot call these 2 methods in offline mode. Because on the launching the app user and roles are loaded so that we can access the screens in offline mode.

I also want to know that how the screen access check internally with the proper role in offline mode.

Can anyone help me regarding this.

I think this is because CheckRegisteredRole() and User_GetName() are server actions thus needing connection to call from server. I think this may help you if you are in O11 environment.