Android Question Unable to access Firebase Storage feature

beelze69

Active Member
Licensed User
Longtime User
Hi,

I am attempting to use FireBase services
to download a file from the Public folder on to my Local Mobile Device.

I have kept google-services.json in the File Manager path before compilation.

Post compilation I am getting error in running the Application.

Log dump is also attached.

Also attached is the source code that was available in b4A which I modified to just fetch a file from the Public Folder under FBase.

Kindly guide me as to where am I going wrong here.

Thanks
 

Attachments

  • log.txt
    1.2 KB · Views: 213
  • FirebaseStorage.zip
    2.7 KB · Views: 204

beelze69

Active Member
Licensed User
Longtime User
It is related to an issue with FirebaseAuth v16.0. You should use FirebaseAuth v15.1: https://www.b4x.com/android/forum/t...reaks-firebaseauth-library.93446/#post-591424
Hi Erel,

I updated the Firebase Services as per the above post and copied the relevant .jar and .xml files to my 'internal libraries folder'.
I have also made the relevant entries in the Manifest editor.

But I am still getting an error.

Attached is i) Updated source code ii) the Error log file iii) The SDK entries showing what I have installed related to FB Auth.

Kindly guide me as to where am I going wrong.

Thanks
 

Attachments

  • FirebaseStorageAppUpdated.zip
    23.8 KB · Views: 156
  • log.txt
    5.1 KB · Views: 233
  • Firebase_Auth_related_Files_on_my_PC.jpg
    Firebase_Auth_related_Files_on_my_PC.jpg
    195.7 KB · Views: 166
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

beelze69

Active Member
Licensed User
Longtime User
Hi Erel,

As already mentioned in my above post, I had already copied all the latest FirebaseAnalytics and FirebaseAuth files into my internal libraries folder as per post ' https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-596101'

Now in order to eliminate the confusion in the Manifest thing, I created a new Project in B4a 8.30 + and ADDED only the relevant entries :

viz. CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

My application is executing but when I press the Public folder button, nothing happens.

Also worrying is the warning google-services.json is not used - despite I having copied it in the folder where the .B4A file resides.

Attaching the modified source code.

Ps. help.
 

Attachments

  • FirebaseStorageUpdated.zip
    23 KB · Views: 156
Upvote 0

beelze69

Active Member
Licensed User
Longtime User
Hi Erel,

Thanks.. I had placed my 'application folder' [containing the b4A file] in a location other than the folder where the .b4A exe resides. I moved that folder inside the standard Application projects folder and the Warning message 'google-services.json is not used' went away..

However I am unable to download the file which I have specified in the code.. It says ' (IOException) java.io.IOException: Could not open resulting stream.'

Ps. guide me as to what is the mistake I am doing here..

Attaching the source code and the log file...

Ps. help.

Thanks..
 

Attachments

  • FirebaseStorageAppUpdated.zip
    22.3 KB · Views: 163
  • log.txt
    806 bytes · Views: 230
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
google-services.json file should be in the same folder where the FirebaseStorage.b4a resides. I guess that it is there.

Change your package name to all lower case (b4a.beelzefirebasetest). You need to also change it in the Firebase project. Upper case letters can cause problems.

Are you sure that the file is actually there?

Can you post your Firebase Storage rules?
 
Upvote 0
Top