超过3 / 4G的对等通信可以为智能手机? [英] Is peer-to-peer communication over 3/4G possible for smart phones?

查看:175
本文介绍了超过3 / 4G的对等通信可以为智能手机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个应用程序传输数据从一个Android设备到另一个 - 但设备最有可能位于城市,地区或国家的不同部分。 (直线前进的方向将有一个中央服务器(或任何类型的服务器),但我试图避免使用一个)。

I'm trying to write an app that transfers data from one android device to another - but the devices are most likely located in different parts of the city, state, or country. (The straight forward way would be to have a central server (or any type of server), but i'm trying to avoid using one).

我想传递的数据是文字,图片,或两者的组合。

The data I'm trying to pass is text, pictures, or a combination of both.

我到目前为止已经找到了解决办法是用特殊格式的文本或图片信息沟通;但是,从最佳的似乎远。没有更好的办法?

The solution I've found so far is to communicate with specially formatted text or picture messages; but that seems far from optimal. Any better solutions?

推荐答案

真正的P2P是不可能超过3G。

True P2P isn't possible over 3G.

在你的问题,你提到你目前使用的消息。我假设你的意思是短信。

In your question, you mention that you currently use messages. I assume that you mean SMS.

您可以做什么,而不是使用电子邮件和附件的自定义MIME类型,比如应用程序/ foobar的数据

What you could do instead is using mails and attachments with a custom mime type, say application/foobar-data.

在你的应用程序人们可以启动包含此附件一SEND意图。然后,用户将不得不选择他的电子邮件程序(或这也许可以是自动的),并将其发送给谁,他/她喜欢。您还可以指定为:地址,并在你的意图的主题。这将是相当简单的。

Within your app one could launch a SEND intent containing this attachment. The user would then have to choose his email program (or this could maybe be automatic), and send it to whoever he/she likes. You may also specify the To: address, and the subject in your intent. This would be rather straightforward.

远程用户就可以继续接收此邮件并点击附件。您的应用程序将被注册后处理应用程序/ foobar的数据 MIMETYPE,使用意图过滤器在清单中,并随后将自动启动,并接收数据。先前生成邮件的正文也可能是pre-充斥着有关你的应用程序,以及如何安装它的信息,如你需要FooBar的查看附件。您可以从......安装。

The remote user would then receive this mail and tap on the attachment. Your app would be registered to handle the application/foobar-data mimetype, using an intent filter in the manifest, and would then automatically launch and receive the data. The body of the mail generated earlier could also be pre-filled with informations about your app and how to install it, such as "You need FooBar to view the attachment. You can install it from...".

所以,在最后,您的应用程序可以同时发送自定义的数据,并接受它,而不必依赖专用的服务器上。

And so, in the end, your app could both send custom data and receive it, without relying on a dedicated server.

这篇关于超过3 / 4G的对等通信可以为智能手机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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