mobile menu
Site icon
ZIDSWORLD

The Tech Galaxy

Live support

best programming languages

Why you Need Stop using Firebase for Android Projects

Friday, February 2, 2024, 9 AM

Firebase can make your android or other app startup bankrupt and ultimately fail, especially if you are using realtime database and exceeding its limit

This is a lesson i learned the hard way after months of working for an android app and releasing it on googleplay

The app was an earning app which i developed using firebase realtime database to store data. It has a chat feature and will save the coins earned by users to realtime database.

I chose firebase because i didn't need code much and was easy to set up, no need worry for backend

The app was steadily growing and had around 1.5 K daily active users while total users were around 5K. The app's only earning source was from ads. Everything was going ok untill it showed a warning in the realtime database that my project exceeded the monthly data limit of 10GB download limit

I upgraded firebase plan

So i upgraded firebase to blaze plan since i was using spark plan which is a no cost one.

After upgrading, my bad time started. I set a budget limit of $5 but the bill was going high in every second. It peaked to $30 in a day!

Seriously $30 a day for an app that didn't even make $5 a day from ads? That was a business fail. Another bad thing was not showing the current bill i was charged in the firebase console, it was showing less than the actual bill. Around $5 was the amount it showing when actual amount was around $30 in Google cloud console.

I downgraded to spark plan, and my app failed

Since realising that i will need pay more than i earn from ads to firebase, i immediately downgraded my plan to spark, and in a few days my realtime database was disabled because exceeding firebase monthly download limit of 10GB

Firebase Realtime database disabled

My app stopped working because the database is disabled for my app. So i had only 2 choices, upgrade to firebase blaze plan or change the database

Upgrading is not an option for me because i can't pay more than i earn from app to firebase.

I lost all users, all my time spent on developing this app was ultimately a loss

It took many months of coding, bug fixing and polishing the app to release it. But only to be failed and to pay more than i earn.

So i made a plan, i wanted to see if my own database, the MySQL database of my shared hosting would work for my app.

I researched about it and found it can be used for my app. So i started coding API in PHP. The API can read, write and return data to my android app in json.

MySQL came for my rescue

It was a totally good idea, i don't need pay anything extra for the MySQL database because my website is using it and i pay just around $30 every year for the hosting.

$30 year instead of $30 a day for firebase was totally cool. So i wrote an API and had to change my app codes to support REST API request. Finally, after stressing for few weeks, my app was back with MySQL and REST API as backend instead of firebase.

Now everything is going good, i didn't encounter any major issues so far and the app is growing. But there's some disadvantage and advantages when comparing MySQL to firebase

Firebase is a realtime database, MySQL isn't. So in my app's chat section, i had to use a timer method to fetch new chat in every 5 seconds.

So the message is..

Perhaps my app that previously used firebase wasn't efficient in using firebase, perhaps it made too many requests that caused a spike in firebase bandwidth and download. But i look for the long term goal. So firebase sure wasn't my cup of tea.

I will use firebase only to store small amounts of data. It's not ideal for apps that get over 100 daily active users.

Firebase storage also isn't good because it stored only 5MB photos of my app yet everyday it gets disabled due to exceeding limit.

So my advice to you is if you are actually looking to make some income out of your app or looking for long term goals with your apps go with your own database such as MySQL or others. I heard mongoDb is good but i haven't used it. And if you can afford firebase, you can still go for firebase.

Don't get me wrong, except some querying issues, firebase is a great database but it just isn't good for apps that earn little

Do you need help assistance with setting up API for your android app?

You can contact us, we can develop API for your android app that can be connected with your webserver hosting database

Comments

No comments found.