Android Question Application error on Android 10

Sergey_New

Well-Known Member
Licensed User
Longtime User
There is no such error on previous versions of Android:
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (activity_permissionresult)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (filedialog) Create, isFirst = true **
** Activity (filedialog) Resume **
filedialog$ResumableSub_FillTableresume (java line: 920)
java.io.IOException: /storage/emulated/0/Поколения is not a folder.
    at anywheresoftware.b4a.objects.streams.File.ListFiles(File.java:163)
    at sv.bystrovzorov.filedialog$ResumableSub_FillTable.resume(filedialog.java:920)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
    at anywheresoftware.b4a.BA$2.run(BA.java:387)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
--------- beginning of crash
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
SetActivityAttribute(DataTask, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataNote, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataSubmitter, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataSource, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataRepository, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataPerson, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataName, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataMedia, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataPlace, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataCitation, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(DataEvent, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(ListEvents, android:excludeFromRecents, true)
AddActivityText(Main,
  <intent-filter>
  <action android:name="android.intent.action.MAIN"/>
  <category android:name="android.intent.category.DEFAULT"/>
  </intent-filter>
)
AddManifestText(<permission
    android:name="$PACKAGE$.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
AddApplicationText(
    <meta-data     android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCr0Md-DCcbjYwghO8RXPZyK2aJLfHx_nQ"/>
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
    )
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddManifestText(<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    android:maxSdkVersion="18" />
)

AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)

CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)
What needs to be fixed?
 

Sagenut

Expert
Licensed User
Longtime User
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Sagenut,
Thank you very much!
This seems to fix the problem.
It is difficult to check when there is no device with Android 10 and my laptop does not have enough memory for the desired emulator :(
 
Upvote 0
Top