Esempio n. 1
0
        async void GrantInternetUserPermission()
        {
            // Request user's permission for internet privilege
            // Check detailed info : https://developer.tizen.org/development/guides/.net-application/security/privacy-related-permissions
            // https://developer.tizen.org/development/training/.net-application/security-and-api-privileges
            UserPermission userperm = new UserPermission();
            var            result   = await userperm.CheckAndRequestPermission(Utility.InternetPrivilege);

            if (!result)
            {
                Log.Error(Utility.LOG_TAG, "Failed to obtain user consent.");
                // Terminate this application.
                Tizen.Applications.Application.Current.Exit();
            }
        }