I took a cue from @Erel post but without success :-(
Android 11
Galaxy A10
compilation error
Android 11
Galaxy A10
Manifest:
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" />
)
code for share txt:
Dim FileToSend As String = "Message.txt"
File.WriteString(Provider.SharedFolder, FileToSend, m.Get("ms_gpt_01_05"))
Dim in As Intent
in.Initialize(in.ACTION_SEND, "")
in.SetType("text/plain")
in.PutExtra("android.intent.extra.STREAM", Provider.GetFileUri(FileToSend))
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
StartActivity(in)
compilation error
Error:
B4A Versione: 12.20
Analisi del Codice. (0.17s)
Java Versione: 14
Building folders structure. (0.07s)
Esecuzione azione personalizzata. (0.06s)
Compilazione del codice. (0.46s)
Compilazione del codice di layouts (0.01s)
Organizzazione Librerie. (0.00s)
(AndroidX SDK)
Compilazione risorse (0.24s)
Collegamento risorse Error
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:112: error: resource android:attr/lStar not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:162: error: resource android:attr/fontStyle not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:163: error: resource android:attr/font not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:164: error: resource android:attr/fontWeight not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:165: error: resource android:attr/fontVariationSettings not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:166: error: resource android:attr/ttcIndex not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:190: error: resource android:attr/startX not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:192: error: resource android:attr/startY not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:194: error: resource android:attr/endX not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:196: error: resource android:attr/endY not found.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.9.0\unpacked-core-1.9.0\res\values\values.xml:203: error: resource android:attr/offset not found.
error: failed linking references.