分享Android用户之间的数据 [英] Sharing data between android users

查看:108
本文介绍了分享Android用户之间的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解这个问题的抽象的顶层。

I'm having trouble understanding the top level of abstraction of this problem.

问题: 用户A和用户B下载应用程序X. A想要应用程序特定的数据发送到B.如何为B做用户的链接?

The Problem: Users A and B download application X. A wants to send application-specific data to B. How does user A link with B?

我的令人难以置信的凌乱的解决方案:   - 用户A点击打开了联系人列表中的应用程序的按钮。用户A从列表中选择用户B。用户B的电子邮件地址存储在A的地址簿。应用程序创建了一种共享ID中,并通过该电子邮件地址发送给用户B。用户B的应用程序获取该ID的邮件,然后用户A和B使用的共享ID连接到服务器和共享彼此之间通过sserver。

My incredibly messy solution: - User A clicks a button on the application that opens up a list of contacts. user A selects user B from the list. User B's email address was stored in A's address book. Application creates a sort of "share ID" and sends it to user B via that email address. User B's application gets that ID from the mail, then User A and B use the share ID to connect to a server and share between each other via the sserver.

必须有一个更好的办法?这两个问题是: 1.它不应该需要一台服务器(应该吧?会不会是免费的吗?) 2.必须有用户的相互连接比的Gmail发送ID或链接等更好的方法。

There must be a better way? The two problems are: 1. It shouldn't need a server (should it? could it be free?) 2. There must be better ways of the users connecting to each other than sending ID's or links etc by gmail.

这个解决方案应该是这样那么简单,但我不能让我的头轮它。如果这个问题还不足以得到一个很好的答案,请告诉我什么,我需要做的就是把思考如何移动用户可以互相interract尽可能简单,用尽可能少的点击尽可能的方式,(移动2.0或任何现代的东西啊!)

This solution should be so so simple, but I can't get my head round it. If this question is not sufficient to get a good answer, please please tell me what I need to do to get into the way of thinking about how mobile users can interract with each other as simply as possible, with as few clicks as possible, (Mobile 2.0 or whatever the modern day thing is!)

例如:一位母亲和孩子有一个Android智能手机。他们每个人都下载了ChildLeash应用程序。儿童希望配置该应用发送更新的母亲,让母亲可以跟踪孩子的位置等等。问题是一些怎样的孩子需要告诉应用程序什么地方的母亲是该数据被发送到。什么是用户友好的方式为孩子识别母亲的电话? (母亲的IP地址?电话号码是多少?邮箱地址?的OpenID?NFC /蓝牙?),这样它就可以沟通?

For example: A mother and a child have an android smart phone. They each download the "ChildLeash" app. Child wishes to configure the app to send updates to Mother, so that Mother can keep track of Child's location and so on. The problem is some how Child needs to tell the app what location Mother is at for the data to be sent to. What is a user-friendly way for Child to Identify Mother's phone? (Mother's IP address? Phone number? Email address? OpenIDs? NFC/Bluetooth?) So that it can then communicate?

推荐答案

您可以使用推送通知,通过的 Android的云到设备的消息框架。有一个Android 博客文章这个。问题是,这似乎是测试阶段,还没有提供给所有开发者(你需要一个特定的申请)。

You could use push notifications, as provided by the Android Cloud to Device Messaging Framework. There's an Android blog post about this. Problem is, this seems beta and not yet available to all developers (you need a specific signup).

关于知识产权Adresss,P2P和这样的,这通常是行不通的。参见:<一href="http://stackoverflow.com/questions/5648972/is-peer-to-peer-communication-over-3-4g-possible-for-smart-phones">Is同行的对等通信超过3 / 4G可能的智能手机?

Regarding "IP Adresss", P2P and such, this generally won't work. See: Is peer-to-peer communication over 3/4G possible for smart phones?

如果消息不急,那么你可以使用 AlarmManager 以有您的应用程序唤醒每隔一小时左右,并通过连接到服务器上检查是否有新邮件。不知道,将工作为贵ChildLeash的例子。另一个类似的解决方案是使用服务以轮询服务器。

If messages are not urgent, then you could use AlarmManager to have your app wake up every hour or so, and check for new messages by connecting to a server. Not sure that would work for your "ChildLeash" example. Another similar solution would be to use a Service to poll the server.

这篇关于分享Android用户之间的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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