ApplicationHasTangoPermissions() public static method

Check if the application has a Tango permission.
public static ApplicationHasTangoPermissions ( string permissionType ) : bool
permissionType string String for the permission.
return bool
Exemplo n.º 1
0
        /// <summary>
        /// Request next permission.
        /// </summary>
        private void _RequestNextPermission()
        {
            Debug.Log("TangoApplication._RequestNextPermission()");

            // if no permissions are needed let's kick-off the Tango connect
            if (m_requiredPermissions == PermissionsTypes.NONE)
            {
                _SendPermissionEvent(true);
            }

            if ((m_requiredPermissions & PermissionsTypes.MOTION_TRACKING) == PermissionsTypes.MOTION_TRACKING)
            {
                if (AndroidHelper.ApplicationHasTangoPermissions(Common.TANGO_MOTION_TRACKING_PERMISSIONS))
                {
                    _androidOnActivityResult(Common.TANGO_MOTION_TRACKING_PERMISSIONS_REQUEST_CODE, -1, null);
                }
                else
                {
                    AndroidHelper.StartTangoPermissionsActivity(Common.TANGO_MOTION_TRACKING_PERMISSIONS);
                }
            }
            else if ((m_requiredPermissions & PermissionsTypes.AREA_LEARNING) == PermissionsTypes.AREA_LEARNING)
            {
                if (AndroidHelper.ApplicationHasTangoPermissions(Common.TANGO_ADF_LOAD_SAVE_PERMISSIONS))
                {
                    _androidOnActivityResult(Common.TANGO_ADF_LOAD_SAVE_PERMISSIONS_REQUEST_CODE, -1, null);
                }
                else
                {
                    AndroidHelper.StartTangoPermissionsActivity(Common.TANGO_ADF_LOAD_SAVE_PERMISSIONS);
                }
            }
        }
Exemplo n.º 2
0
 public bool ApplicationHasTangoPermissions(string permissionType)
 {
     return(AndroidHelper.ApplicationHasTangoPermissions(permissionType));
 }