Algolia Firebase 和 Android 集成 [英] Algolia Firebase and Android integration

查看:24
本文介绍了Algolia Firebase 和 Android 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Android 应用中,我使用 Firebase 作为数据库.我想添加一些搜索功能,经过我的研究,我发现 Algolia 适合我.

Algolia 的

  • 您还可以查看

    如果您想在 Android 中索引/更新/删除您的数据

    如果您试图从 Android 应用程序写入数据,这不是一个好主意:Android 应用程序很容易反编译或拦截以读取诸如您的 Algolia API 密钥之类的秘密,这就是为什么在 Android 应用程序或 Algolia 的任何前端实现中,您应该只使用您的仅搜索 API 密钥,以确保没有人可以在 Algolia 内部弄乱您的数据.

    我建议您阅读 Algolia 的安全最佳实践了解有关 Algolia 安全性的更多信息(特别是条目保护您的管理 API 密钥API 密钥安全性),并查看 Algolia 的 API 密钥安全指南 以获取有关使用 Algolia 的安全 API 密钥的指南 功能.

    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.


    Searching your 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 wanted to index/update/delete your data in Android

    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.

    这篇关于Algolia Firebase 和 Android 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆