This must have been mentioned before, but I was unable to find a thread about it so here we are.
In our b4xlibs we can have a manifest file where we specify dependencies to other libraries. This is awesome.
However, it does not describe the whole situation when we discuss dependencies. For B4A, there's also the application manifest file (and for B4i there's the PlistExtras). As far as I can tell, there is currently no way to include that in the b4xlib, which creates the need for instructions like these:
While I have much love for b4xlibs, I think there's room for improvement in this regard.
So my wish is that it would be possible to include some more info in the b4xlib. I think the b4xlibs should contain everything required within them. As it is now, that is true to 95%. This wish is about going to 100%.
Imagine if the FileProvider b4xlib had this included in itself, and that the IDE, when compiling, simply added it to the application manifest. There would be no need for any more instructions than "Enable FileProvider".
(The same logic could be applied to the B4i PlistExtras.)
This wish might not make much sense to people not using a lot of b4xlibs, but once you start using more, and all of a sudden need to keep track of what library was the cause for part of the manifest, things tend to get complicated. I am obviously aware that it's possible to use comments in the manifest file, but there's still a lot of manual work for something that seems to be able to automate away.
In our b4xlibs we can have a manifest file where we specify dependencies to other libraries. This is awesome.
However, it does not describe the whole situation when we discuss dependencies. For B4A, there's also the application manifest file (and for B4i there's the PlistExtras). As far as I can tell, there is currently no way to include that in the b4xlib, which creates the need for instructions like these:
[class] FileProvider - share files
Edit: FileProvider is included as an internal library now. After investigating several issues with the current FileProvider code that you can find in the forum, I decided to make some improvements and implement it in a class. Starting from Android 7 (API 24) you cannot directly share file uris...
www.b4x.com
While I have much love for b4xlibs, I think there's room for improvement in this regard.
So my wish is that it would be possible to include some more info in the b4xlib. I think the b4xlibs should contain everything required within them. As it is now, that is true to 95%. This wish is about going to 100%.
Imagine if the FileProvider b4xlib had this included in itself, and that the IDE, when compiling, simply added it to the application manifest. There would be no need for any more instructions than "Enable FileProvider".
android_app_manifest_addition.txt:
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" />
)
This wish might not make much sense to people not using a lot of b4xlibs, but once you start using more, and all of a sudden need to keep track of what library was the cause for part of the manifest, things tend to get complicated. I am obviously aware that it's possible to use comments in the manifest file, but there's still a lot of manual work for something that seems to be able to automate away.