简体   繁体   English

使用谷歌驱动器存储Android应用程序数据

[英]Use google drive to store android app data

I'm working on a messaging app based on the position,users can anonimously write message in the app and if an user is near the one who wrote the message he will be able to see the message on the app (I know this already exists but I'm making mine). 我正在开发基于位置的消息应用程序,用户可以在应用程序中无声地写消息,如果用户在编写消息的人附近,他将能够在应用程序上看到消息(我知道这已经存在)但我正在制作我的。) Anyway the problem is when i need to save and load users messages and positions,i would like to use google drive (or eventually dropbox) to host data,I want to store them on my google drive and not in the user GD. 无论如何问题是当我需要保存并加载用户的消息和位置时,我想使用谷歌驱动器(或最终的Dropbox)来托管数据,我想将它们存储在我的谷歌驱动器而不是用户GD中。 I thought about creating a google spreadsheet like this: 我考虑过创建一个像这样的谷歌电子表格:

Message        Position
"Hi everyone"  123912,123184
"Hola"         123912,123184
"Hi"           123912,123184

and then get the data every x seconds and when someone write something i'll update the sheet with the new row,I searched for this but I only find tutorial about managing the user's GD. 然后每x秒获取一次数据,当有人写一些东西我将用新行更新工作表时,我搜索了这个,但我只找到了关于管理用户GD的教程。 Am I using the wrong approach? 我使用了错误的方法吗?

I dont know if ur solution of using GDrive is the good one but just in case: 我不知道你使用GDrive的解决方案是否是好的,但以防万一:

  • You can use the Google Drive REST api to do what you want with drive file. 您可以使用Google Drive REST api通过驱动器文件执行所需操作。

here's some help https://developers.google.com/drive/v3/web/quickstart/android 这里有一些帮助https://developers.google.com/drive/v3/web/quickstart/android

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

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