Android Question Issues in converting code from B4A 5.0 to 8.5.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi,

I am having hard time converting my code from 5.0 to 8.5.

A simple statement like File.MakeDir(File.DirRootExternal,"MyWardmonitor") is failing

Shall i use GetSafeDirDefaultExternal, I need some visible folder. Looks like permission issue.


Manifest editor has
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" maxSdkVersion="18" />
and
targetsdkversion is 26

I am using FTP, Webview, Camera, SpeechToText elsewhere will changes will be required there too.

Can someone please point me as to what changes are required.

Thanks
Juzer
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi eps,

Thanks, I had seen it already, I found implementing Runtime Permission for DirRootExternal little difficult. I would have had to modify too many activities.
As such I changed folder to File.DirInternal which does not require any permission and its working fine.Its safer also as one cannot see data.

I was just wondering why WhatsApp saves data in visible folders, There must be some reason. May be so user can manage storage space.

Juzer
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Hi eps,
I was just wondering why WhatsApp saves data in visible folders, There must be some reason.

Well, those folders hang around when the user removes the app. So perhaps they chose to do it that way so that all account info, history etc would be around if the user re-installed the app at a later time?
 
Upvote 0
Top