Android Question Error write external storage

devmobile

Active Member
Licensed User
I use notification builder in my app
B4X:
Dim nb As NotificationBuilder
    nb.Initialize
    nb.AutoCancel        = True
    nb.DefaultLight     = True
    nb.DefaultSound        = True
    nb.DefaultVibrate    = True
    nb.ContentTitle     = "Alert"
    nb.ContentText         = "Body"
    nb.CustomSound        = File.Combine(File.DirRootExternal,"notification.mp3")
In my app,i dont need to write external storage but this library need to copy noification sound in external storage
and play from it
Is there way for prevent use external storage write permission?
 

NJDude

Expert
Licensed User
Longtime User
Two things:

1- Target SDK <= 22
2- Do Not save to Root external, if the user uninstalls your app, all the files you copied there (in this case .MP3) will remain and they will take unnecessary space, better save them on DirDefaultExternal.
 
Upvote 0

devmobile

Active Member
Licensed User
Two things:

1- Target SDK <= 22
2- Do Not save to Root external, if the user uninstalls your app, all the files you copied there (in this case .MP3) will remain and they will take unnecessary space, better save them on DirDefaultExternal.
Thanka but is it working for notification builder?
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
If the notification builder lib has a minimum SDK requirement and is SDK > 22 then there's no way to prevent that you will have to handle the permissions.

There's a way to save to the external storage based on your package name, you could do a quick search on the forums.
 
Upvote 0

devmobile

Active Member
Licensed User
If the notification builder lib has a minimum SDK requirement and is SDK > 22 then there's no way to prevent that you will have to handle the permissions.

There's a way to save to the external storage based on your package name, you could do a quick search on the forums.
Ok thanks
 
Upvote 0

devmobile

Active Member
Licensed User
If the notification builder lib has a minimum SDK requirement and is SDK > 22 then there's no way to prevent that you will have to handle the permissions.

There's a way to save to the external storage based on your package name, you could do a quick search on the forums.
I use DirDefaultExternal instead of DirExternalRoot in every where of my project
And it working
Maybe have problem in some device due to use DirDefaultExternal?
 
Upvote 0
Top