简体   繁体   English

带有ContentProvider和BaaS的Android SQLite

[英]Android SQLite with ContentProvider and BaaS

Can BaaS solutions such as Firebase and Parse be used with an already existing SQLite database locally, and interfaced via a ContentProvider that was already configured? 诸如Firebase和Parse之类的BaaS解决方案能否在本地与现有SQLite数据库一起使用,并通过已配置的ContentProvider进行接口?

I could only find information so far on using each solution's proprietary local storage solution. 到目前为止,我只能找到有关使用每个解决方案的专有本地存储解决方案的信息。 However, if I just treat the BaaS as a REST API, is that a feasible solution? 但是,如果我只是将BaaS视为REST API,那是可行的解决方案吗?

I'm interested in using a BaaS at this time for my first app for data synchronization/user authentication across devices, and eventually learning how to set up my own server for projects thereafter. 我现在有兴趣在第一个应用程序中使用BaaS进行跨设备的数据同步/用户身份验证,并最终学习如何在此后为项目设置自己的服务器。

Thanks! 谢谢!

I am moving from Parse to Firebase. 我正在从解析迁移到Firebase。

In the Parse world, I am able to use the best of both BaaS and Content Providers. 在“解析”世界中,我能够使用BaaS和内容提供商中的佼佼者。 Had the BaaS invoked in the Sync Adapter calls, refreshed the local SQLite DB and which in turn updated the CursorAdapter via Content Providers. 如果在Sync Adapter调用中调用了BaaS,则刷新了本地SQLite DB,然后通过Content Providers更新了CursorAdapter。

In the Firebase world, there is no need for any additional Sync Adapters and hence having a local Content Provider and SQLite is redundant. 在Firebase世界中,不需要任何其他同步适配器,因此具有本地Content Provider和SQLite是多余的。 Yeah, still I could have all of them play together, but not needed as Firebase has the ability to directly update the view. 是的,我仍然可以让他们一起玩,但是不需要,因为Firebase可以直接更新视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM