Android Question Problem accessing File.DirRootExternal & "/osmdroid/"

Status
Not open for further replies.

RB Smissaert

Well-Known Member
Licensed User
Longtime User
After problems due to the app being unable to access the SD drive this was fixed by moving my database to a folder in File.DirInternal. All was working fine, including accessing mbtiles for OSMDroid in File.DirRootExternal & "/osmdroid/". There was an other Android security update yesterday and now I am unable to access my osmdroid folder.
I think the problem may be solved by altering the manifest file and tried all sorts, but no success yet.
This is the current text of the manifest file:

Code: Copy
AddManifestText(
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="28"/>
android:normalScreens="true" 
android:smallScreens="true" 
android:anyDensity="true"/>

<uses-permission
  android:name="android.permission.WRITE_EXTERNAL_STORAGE"
  android:maxSdkVersion="28" />
)

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:supportsRtl, "true")
'SetApplicationAttribute(android:requestLegacyExternalStorage, true)

SetApplicationAttribute(android:theme, "@style/MyAppTheme")
SetActivityAttribute(Main, android:windowSoftInputMode, adjustResize)
SetActivityAttribute(Main, android:screenOrientation, "portrait")

SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)

CreateResource(values, themes.xml,
<resources>
<dimen name="action_button_padding">0dp</dimen>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">#FF9800</item>
        <item name="colorPrimaryDark">#F57C00</item>
        <item name="colorAccent">#FFA726</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
        <item name="android:actionButtonStyle">@style/ActionButton</item>
        <item name="android:listPreferredItemHeightSmall">30dp</item>
    </style>
    <style name="ActionButton" parent="@android:style/Widget.ActionButton">
       <item name="android:paddingStart">0dp</item>
       <item name="android:paddingEnd">2dp</item>
       <item name="android:minWidth">2dp</item>
       <item name="android:drawablePadding">@dimen/action_button_padding</item>
   </style>
</resources>
)

Any suggestion how this should be changed?

RBS
 
with the update it does not allow me to copy the db file in the phone memory
If File.Exists(File.DirRootExternal ,"auxi.db")=False Then
File.Copy (File.DirAssets ,"auxi.db",File.DirRootExternal ,"auxi.db")
End If


------
java.io.filenotfoundexception: /storage/emulated/0/auxi.db: open failed: EACCES (Permission Denied)
 
Upvote 0
Status
Not open for further replies.
Back
Top