Android Question CreateResourceFromFile

itgirl

Active Member
Licensed User
Longtime User
why CreateResourceFromFile does not update the values ?
in the Firebase messaging tut it was my first use of
B4X:
CreateResourceFromFile("google-services", "google-services.json")
but I've noticed that after changing the google-services.json the values of googleservices.xml file does not change!! I know it's the default behavior since it's marked as read-only but is there a work around this issue?? so i don't have delete the file every time i update the google-services.json.


I figured out this issue in the hard way, i copied project resources from one to another and my FireBase token always wrong so after alooooot of research i found out this issue
 

itgirl

Active Member
Licensed User
Longtime User
It shouldn't be marked as read-only. The IDE will never set it to be read-only.
I double checked my CustomBuildAction just to make sure nothing was setting the file to read-only.
I ended up using CustomBuildAction to set it to writable before compiling, can we use CreateResourceFromFile with a path variable ? like
B4X:
CreateResourceFromFile("..\ExRes\google-services", "google-services.json")
so we can create external resources ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…