简体   繁体   English

是否可以将Google云端硬盘用作我的应用数据的主机? 那么应用数据可以在线吗?

[英]Is it possible to use Google Drive as a host for my apps data? So app data can be online?

Sorry if this ends up being long winded. 对不起,如果这最终被啰嗦。

Just like a server where you can have data there and a user can have access to it with the right code. 就像服务器一样,您可以在那里拥有数据,用户可以使用正确的代码访问它。 Can I put my text files on Google Drive, make them public and then allow my app access to them? 我可以将我的文本文件放在Google云端硬盘上,公开,然后允许我的应用访问它们吗?

I've done this with a local webserver I created. 我用我创建的本地网络服务器完成了这项工作。 AsyncTask interacts with a .php file on the server and the php file calls the data from a mySQL database. AsyncTask与服务器上的.php文件交互,php文件从mySQL数据库调用数据。 This of course works but since I can't afford to pay for a server is there an option for me to put my data in text files and host them on Google Drive? 这当然有效,但由于我无力支付服务器费用,我可以选择将我的数据放入文本文件并将其托管在Google云端硬盘上吗? Then just use AsyncTask to call them? 那么只需使用AsyncTask来调用它们? I get an error when trying it. 我在尝试时遇到错误。 I'm starting to think it's not possible. 我开始认为这是不可能的。

Essentially, is there any way for me to use Google Drive as a server? 从本质上讲,我有什么方法可以将Google云端硬盘用作服务器吗? Does anyone know of any other free sites that are reliable if I can't use it? 如果我不能使用它,有没有人知道任何其他可靠的免费网站? I know my AyncTask code works because when I created a local server on an old laptop using XAMPP I was able to host a mySQL database and .php file that worked as mentioned above. 我知道我的AyncTask代码有效,因为当我使用XAMPP在旧笔记本电脑上创建本地服务器时,我能够托管一个如上所述工作的mySQL数据库和.php文件。

My app is currently offline only which I want to change so I don't have to send the user app updates via the Play Store every week. 我的应用目前只是离线,我想要更改,所以我不必每周都通过Play商店发送用户应用更新。 Any advice? 有什么建议?

Thanks for any help, I know this strictly isn't about code, or maybe it might be if Google Drive can be used. 感谢您的帮助,我知道这严格不是代码,也可能是Google Drive可以使用。

Here is my app so you can understand the data I'm working with and how I want to show it: https://play.google.com/store/apps/details?id=com.history.f1historyfree 这是我的应用,因此您可以了解我正在使用的数据以及我希望如何展示它: https//play.google.com/store/apps/details?id = com.history.f1historyfree

Yes you can. 是的你可以。 Use Google Drive SDK , there is also an android specific example you can check at https://developers.google.com/drive/integrate-android-ui 使用Google Drive SDK ,还有一个特定于Android的示例,您可以访问https://developers.google.com/drive/integrate-android-ui查看

If you go the Google Drive public file option then you may not even need the Drive SDK. 如果您使用Google云端硬盘公共文件选项,则可能甚至不需要Drive SDK。

Bandwidth limits for Google Drive's publish site feature? Google云端硬盘发布网站功能的带宽限制?

http://support.google.com/drive/bin/answer.py?hl=en&answer=2494827 http://support.google.com/drive/bin/answer.py?hl=en&answer=2494827

If these are data files for your app, and it sounds like you only have a few users you could use Google App Engine to host the files and/or do any server side processing. 如果这些是您的应用的数据文件,并且听起来您只有少数用户,则可以使用Google App Engine来托管文件和/或进行任何服务器端处理。 Look at the free quota: 看看免费配额:

https://developers.google.com/appengine/docs/quotas https://developers.google.com/appengine/docs/quotas

Anyone offering 'free' hosting, Google included, is expecting when you 'make it big' and hit the quota to upgrade. 任何提供“免费”托管服务的人,包括谷歌在内,都希望当你“大做”并达到升级配额时。

For future proofing, setup your app so that you have a small online control file to redirect where the bulk of data lives without changing the app. 为了进一步打样,请设置您的应用程序,以便您拥有一个小型在线控制文件,以便在不更改应用程序的情况下重定向大量数据。

You can check out this tutorial https://developers.google.com/live/shows/192808437/ I have got my app running and this way is quite easy to use, as we can change the data directly on the spreadsheet. 您可以查看本教程https://developers.google.com/live/shows/192808437/我已经运行了我的应用程序,这种方式非常易于使用,因为我们可以直接在电子表格上更改数据。

+point : You can make the data as private, deploy by using your own email id, and make it accessible for 'anonymous'(ie, for all, even for users who have not logged in their gmail account on their device). + point:您可以将数据设置为私有,使用您自己的电子邮件ID进行部署,并使其可以“匿名”访问(即,对于所有人,甚至是未在其设备上登录其gmail帐户的用户)。 This way your database is still private and only accessible through the app. 这样,您的数据库仍然是私有的,只能通过应用程序访问。

M still struggling for importing 'images' from the spreadsheet to app :-/ M仍然在努力将“图像”从电子表格导入应用程序: - /

Good luck with the tutorial. 祝你好运。

Yes you can 是的你可以

Google allows you to host your file for free. Google允许您免费托管您的文件。 upload your file > share that(public)> copy its id from its link. 上传您的文件>分享(公共)>从其链接复制其ID。 to download it directly you can use this link: http://googledrive.com/host/[id]/ 直接下载它你可以使用这个链接: http//googledrive.com/host/[id]/

i have a blog and i use google drive to host data . 我有一个博客,我使用谷歌驱动器来托管数据。

see this : http://crackit9.blogspot.in/2016/05/beautiful-wallpapers-for-android.html 看到这个: http//crackit9.blogspot.in/2016/05/beautiful-wallpapers-for-android.html

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

相关问题 是否可以在 android 应用程序中使用 Google 驱动器共享数据? - Is it possible to use Google drive for shareable data in android apps? 在我的应用程序中访问Google云端硬盘数据 - Access Google drive data in my app 使用谷歌驱动器存储Android应用程序数据 - Use google drive to store android app data 如何将CSV文件在线放置,以便我的Android应用在启动时可以读取其中的数据? - How to put a CSV file online so that my Android app can read the data inside it when it is launched? 如何在线托管 Flutter App Data 文件? - How to host Flutter App Data files online? 我可以将我的应用程序共享偏好数据限制到 android 中的谷歌驱动器/云吗? - Can I restrict my app sharedprefs data to google drive/cloud in android? 如何使用Google Snapshot Api在线存储应用程序数据? - How to use Google Snapshot Api to store app data online? 将数据从Android应用存储到我的Google驱动器 - Store data from android app to my google drive Google Instant Android Apps-我可以使用现有的“托管付款”捕获提供程序来捕获付款数据吗? - Google Instant Android Apps - Can I use my existing Hosted Payment capture provider to capture payment data? 如何让其他应用(例如Google云端硬盘应用)访问我的应用数据 - How to let other app access my app's data like Google Drive app do
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM