In my Android app, I am using Firebase as a database. I want to add some search capability and after my research I have found that Algolia is proper for me.
Algolia's Firebase tutorial explains how to integrate my existing Firebase database with Algolia. In this tutorial, they provide some Node.js code (which I am not familiar with). In the first gathering of data, I just copied the integration code, did the necessary changes and ran it on Windows terminal: the data is now imported from Firebase to Algolia.
But there are some other necessary specifications like updating, removing data. They also provide some js codes for this purpose, but I really dont know how to attach this listeners in my android app with this js code.
Can anybody give me an idea how it is properly done?
From the phrasing of your question, I'm not sure if you want to learn how to search your Firebase data in Algolia from an Android app or if you are trying to index/update/delete your Firebase data from an Android app.
If you want to search your data from an Android app, there are a few guides to get you started.
If you were trying to write to your data from an Android App, this is not a good idea: an Android app is easy to decompile or intercept to read secrets like your Algolia API Key, which is why in an Android application or in any front-end implementation of Algolia you should only use your Search-only API Key to ensure nobody could mess with your data inside Algolia.
I advise you to read Algolia's Security Best Practices to learn more on security with Algolia (specifically the entries Secure your Admin API Key and API Key security), and to have a look at Algolia's Guide on API Key Security for a guide on using Algolia's Secured API Keys feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With