创建于Android的照片分享应用 [英] Creating Photosharing app on Android

查看:205
本文介绍了创建于Android的照片分享应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要开发Android应用程序,如 Photofeed 作为提到的谷歌云样品链接或类似Instagram的。为此,我需要的App Engine SDK ,但我没有得到我将如何实现此功能。在我的应用程序,我想确切的功能(上传图片,喜欢和在该照片注释),如 Photofeed 该链接显示的应用程序。为此,我将不得不使用谷歌云存储,但 Photofeed 是的webapp,我想开发手机应用程序。为此,我还提到手机后台启动,但没有得到太多的想法。其相当混乱。请指导我开发这个应用程序。是否有可能使用 Photofeed样品 Java类在我的Andr​​oid应用程序? 谢谢你。

I want to develop android application like Photofeed application as mentioned on Google cloud sample link or like Instagram. For that I need App Engine SDK but i am not getting how i will achieve this functionality. In my app, i want exact functionalities (uploading image, like and comment on that photo) like Photofeed app shown on that link. For that I'll have to use Google Cloud Storage but Photofeed is for Webapp and i want to develop Mobile app. For that i also referred Mobile back-end starter but not getting much idea. Its quite confusing. Please guide me to develop this application. Is it possible to use Photofeed sample java classes in my android application? Thank you.

推荐答案

您需要安装谷歌Eclipse插件并让Android连接App Engine的应用。 这是一个很好的起点

You will need to install Google Plugin for Eclipse and make Android Connected App Engine Application. This is a good starting point.

您可以进行类似的应用程序或任何应用程序,连接到GAE作为后端的4个步骤如下:

You can make similar app or any app that connects to GAE as backend in 4 steps as follows:

  1. 让你的实体类:您可以使用JPA,JDO或的物化来访问数据存储或使用其 API 直接为已完成样品的NoSQL类(最简单的方法是物化IMO)。或者你也可以使用谷歌云SQL作为完成样品的SQL类(我从来没有使用过,在一个项目中,所以我不知道是否有在的 API )。
  2. 请REST端点:您可以使用谷歌云端点使REST API为自己的应用程序。这将允许你开发Android,iOS和JavaScript的客户统一。如果需要,你可以使用OAuth也将其固定。
  3. 生成客户端库:如果您使用的是Eclipse,谷歌插件将提供在App引擎项目的上下文菜单,让您只需点击右键,单击生成客户端库。它可以使用命令行的太多工作要做。
  4. 消耗的Andr​​oid应用程序端点:这样做是很简单的解释的这里
  1. Make your entity classes: You can use JPA, JDO or Objectify to access the Data Store or use its API directly as done in the sample NoSQL classes (The easiest way is Objectify IMO). Or you can use Google Cloud SQL as done in the SQL classes of the sample ( I never used that in a project so I do not know if there is another way beside the API).
  2. Make REST Endpoints: You can use Google Cloud Endpoints to make REST API for your own app. This will allow you to develop Android, iOS and JavaScript clients in unified way. If needed you can secure it using OAuth too.
  3. Generate Client Libraries: If you are using Eclipse, Google Plugin will provide that in the context menu of the App Engine project so you simply right click and click Generate Client Libraries. It can be done using command line too.
  4. Consume the endpoints in the Android app: This is done really simple as explained here.

注意:您将需要一个Servlet将照片上传到谷歌云存储。您可以使用<一个href="https://$c$c.google.com/p/google-cloud-solutions/source/browse/trunk/photo-sharing-demo/src/com/google/cloud/demo/UploadHandlerServlet.java"相对=nofollow>一个样品。

Note : You will need a Servlet to upload photos to Google Cloud Storage. You can make use of the one in the sample.

这篇关于创建于Android的照片分享应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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