Skip to content

Releases: nipamaity/storagepermission

Storage permission

18 Nov 15:56
Compare
Choose a tag to compare

Overview

The storagepermission library is designed to simplify the process of handling storage permissions across various Android versions. It provides a seamless solution for requesting and granting storage permissions, creating folders, and enabling access to images, videos, and audio files.

What's New

Permission Handling for All Android Versions
With this release, storagepermission ensures compatibility across different Android versions. Whether you're targeting the latest Android release or supporting older devices, the library seamlessly manages storage permissions, making it easy for your app to access essential files.

Folder Creation Made Easy

Creating folders for organizing files is a common task in many applications. The storagepermission library includes a straightforward method to create folders, streamlining the process for developers. Now, you can organize your files efficiently without the hassle of managing complex folder creation logic.

Easy access function for permission handel

permissionRequest(onRespondsListner = object :OnRespondsListner{
override fun onResult(result: Boolean,
message: String,
file: File?,
filePath: String?) {

            if(result){
                permissionGrant=true

                Toast.makeText(applicationContext,message,Toast.LENGTH_LONG).show()
                // if grant please call your function to execute
            }else{
                permissionGrant=false
                Toast.makeText(applicationContext,message,Toast.LENGTH_LONG).show()
            }
        }


    })

for handel folder createion

 createActivity(foldername = folderName, onRespondsListner = object :OnRespondsListner{
                override fun onResult(
                    result: Boolean,
                    message: String,
                    file: File?,
                    filePath: String?
                ) {

                    if(result){
                        permissionGrant=true
                        Toast.makeText(applicationContext,message+ " path: "+filePath,Toast.LENGTH_LONG).show()
                        // if grant please call your function to execute
                    }else{
                        permissionGrant=false
                        Toast.makeText(applicationContext,message,Toast.LENGTH_LONG).show()
                    }
                }

            })