How to convert tree uri to real path in nativescript?


#1

I need to convert tree uri to real path in nativescript. How to do this?
I need to convert content://com.android.externalstorage.documents/tree/primary%3ATest%20Folder to real path
I am using the intent ACTION_OPEN_DOCUMENT_TREE to get this , but do not know how to get the real path of the folder I have selected?
I have tried most of the ways available in stackoverflow, but could not get this. Basically I need to select a folder and iterate inside the folder for getting the files.
Can anyone please help me for this.


#2

It’s Android specific and we don’t have solution out of box with NativeScript but you can still use a bit native code to get there. Here is a quick example from StackOverflow,


#3

Sir, Thanks for your reply, I have already seen this link. But it is entirely written in java, I am new to nativescript and do not know how to convert this code to nativescript specific code.
Is it possible to convert all these codes to nativescript specific code?


#4

I will try to find some time but it must be easy if you refer this doc.


#5

Sir,
Thanks for your quick response. I will check and try with the link you referred.