C#
Need help with UniAndroidPermission?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
sanukin39

Description

Android Runtime Permission for Unity

132 Stars 28 Forks MIT License 29 Commits 19 Opened issues

Services available

Need anything else?

UniAndroidPermission

Plugin for use runtime permission at unity. It works only Android Devices runtimepermission

Requirement

Unity5 or higher

Installation

Use unitypackage at the release page

Usage

1 Add uses-permission to AndroidManifest

 

2 Add Custom Activity and SkipPermissionsDialog to Android Manifest

    
        
        
    


3 Add UniAndroidPermission.prefab at boot scene ※ Don't rename object name!!

4 Call method before function which need permissions

Check if permission permitted.

UniAndroidPermission.IsPermitted (AndroidPermission.WRITE_EXTERNAL_STORAGE)

Request Permission

public void RequestPermission()
{
    UniAndroidPermission.RequestPermission(AndroidPermission.WRITE_EXTERNAL_STORAGE, OnAllow, OnDeny, OnDenyAndNeverAskAgain);
}

private void OnAllow() { // execute action that uses permitted function. }

private void OnDeny() { // back screen / show warnking window }

private void OnDenyAndNeverAskAgain() { // show warning window and open app permission setting page }

Author

sanukin39

License

The MIT License

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.