Android Question problem with a dangerous permission

Mehrzad238

Active Member
I have dangerous permission android.permission.WRITE_EXTERNAL_STORAGE * and in list permissions says it comes from a string function

My question is What string functions need this permission?

And how can I find it to remove it, I don't even need this permission

I did not use File in any of my projects.
 

Attachments

  • Screenshot 2025-01-14 185857.png
    11.1 KB · Views: 47
  • Screenshot 2025-01-14 190709.png
    126.3 KB · Views: 46
Solution
It is coming from the StringFunctions library. I recommend you to remove it. You don't need it.

You can remove the permission with:
B4X:
RemovePermission(android.permission.WRITE_EXTERNAL_STORAGE)
In the manifest editor.

Mehrzad238

Active Member
It is coming from the StringFunctions library. I recommend you to remove it. You don't need it.
Yes, you were right, it was, it was for this

B4X:
Public Sub GenerateID As String
    Dim Str As StringFunctions
    Str.Initialize
    Return Str.RndChrGen(16,0)
End Sub

I removed the library and now using this function, and this will do the job

B4X:
Sub GenerateID As String
    Dim id As StringBuilder
    id.Initialize

    Dim chars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
    For i = 0 To 15
        Dim index As Int = Rnd(0, chars.Length)
        id.Append(chars.CharAt(index))
    Next

    Return id.ToString
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…