使用Android上的Verizon Motorola Droid,以编程方式将短信发送到电子邮件 [英] Programatically send SMS to email using Verizon Motorola Droid on Android

查看:187
本文介绍了使用Android上的Verizon Motorola Droid,以编程方式将短信发送到电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道有没有人知道使用Verizon的CDMA Motorola Droid手机发送短信到电子邮件地址的正确方法。

I was wondering if anyone knew the proper way to send an SMS message to an e-mail address using Verizon's CDMA Motorola Droid phone.

内部消息传递应用程序似乎自动执行此操作。虽然像SMSPopup这样的第三方应用似乎无法正确回复电子邮件地址,除非您在邮件应用程序中撰写邮件。

The internal messaging application appears to automagically do this. While 3rd party applications like SMSPopup don't seem to be able to properly reply to e-mail addresses unless you compose the message inside the messaging application.

当内部消息应用程序发送短信时,logcat中有一个相应的'RIL_REQUEST_CDMA_SEND_SMS'条目( adb logcat -b radio )。当您将短信发送到电子邮件地址时,它会打印相同的东西,因此幕后,它看起来像发送短信。有趣的是,如果您查看内容提供商发送的邮箱,则邮件将被发送到各种1270XX-XXX-XXXX号码。

When the internal messaging application sends a SMS message there's a corresponding 'RIL_REQUEST_CDMA_SEND_SMS' entry in the logcat (adb logcat -b radio). When you send a SMS to an e-mail address it prints the same thing, so behind the scenes it looks as though it is sending an sms. The interesting thing is that if you look at the content provider sent box the messages are addressed to various 1270XX-XXX-XXXX numbers.

在其他服务上,您可以发送电子邮件,通过发送短信到预定义的短短短信号来发送邮件地址。然后将您的短信格式化为电子邮件地址主题消息
http:// en.wikipedia.org/wiki/SMS_gateway#Carrier-Provided_SMS_to_E-Mail_Gateways

On other services you can send e-mail addresses by sending a SMS to a predefined short sms number. And then formatting your SMS as emailaddress subject message i.e. http://en.wikipedia.org/wiki/SMS_gateway#Carrier-Provided_SMS_to_E-Mail_Gateways

例如,使用T-mobile的号码(500),您可以发送短信使用以下内容发送到电子邮件:

For example, using T-mobile's number (500) you can send a SMS to an e-mail using the following:

SmsManager smsMgr = SmsManager.getDefault();
smsMgr.sendTextMessage("500", null, "username@domain.com message sent to an e-mail address from a SMS", null, null);

有没有人知道如果


  • 可以通过编程方式向SMS Android手机的电子邮件发送短信?

  • Verizon是否将您的回复作为短信发送,或者实际上是以彩信或正常方式发送http电子邮件?

  • 有关如何拦截原始邮件被发送以查看发生什么的任何想法?

Verizon可能会以某种方式生成一个临时绑定到电子邮件地址的假号(因为重复的邮件不会发送到相同的号码)。但是,这似乎很沉重。

It might be possible that Verizon somehow generates a fake number temporarily tied to an e-mail address (since repeated messages are not sent to the same number). But, that seems pretty heavy handed.

谢谢!

推荐答案

我一直在寻找一种使用短信发送系统发送短信的方法,而无需知道服务中心地址,特殊目的地和消息格式等。

I have been looking for a way to send short emails using the SMS delivery system, and without having to know the service center address, special destinations and message formats etc.

As戴夫指出,股票短信应用可以做到这一点(用Motorola Droid + Verizon和Attrix + AT& T证实)。去短信将消息转发到电子邮件地址到彩信。然而,手机似乎这样做正确 - 地址的电子邮件是电子邮件到短信地址,例如2223334444@vtext.com。

As Dave points out, the stock text messaging app can do this (confirmed with Motorola Droid+Verizon and Attrix+AT&T). Go SMS turns messages to an email address into an MMS. Handcent however, seems to do this just right -- the email from address is the email-to-SMS address e.g. 2223334444@vtext.com.

对我有用的方法如下。这是非常实验和完全无证的。

The approach that has worked for me is as follows. This is all highly experimental and completely undocumented.


  • 直接写入短信内容提供商(content:// sms)并插入出站讯息

  • Write directly to the SMS content provider ("content://sms") and insert the outbound message

ContentValues cv = new ContentValues();
cv.put("address", "someone@example.com");
String time = System.currentTimeMillis()+"";
cv.put("date", time);
cv.put("body", "I love stackoverflow");
cr.insert(uri, cv); // cr = ContentResolver
cv.put("type", "6");


  • 关键字discovery是type = 6.值1和2用于传入和外发SMS(可能是相反的方式),3是用于草稿消息。 6是用于无法发送的消息(经验性地通过将手机置于飞行模式并使用股票应用程序发送文本到电子邮件地址来确定)。

  • The key "discovery" is type = 6. Values 1 and 2 are for incoming and outgoing SMS (could be the other way around) and 3 is for draft messages. 6 is for messages that could not be sent (empiricaly determined by putting the phone in airplane mode and sending a text to an email address using the stock app).

    所有这些都将消息放入SMS存储。要实际发送它,股票应用程序需要戳戳重试。我发现将手机置于飞行模式并切换退出作品 - 消息通过短信发送到电子邮件 - 但是必须有一个更好的方式(而且Handcent知道吗?)

    All this places the message into the SMS store. To actually send it, the stock app needs to be poked into retrying. I find putting the phone into airplane mode and toggling back out works--the message is sent to email using SMS!!--but there must be a better way (and Handcent knows it?)

    而且,Verizon似乎并不喜欢其消息内容中的尖括号。

    And oh Verizon doesn't seem to like angle brackets in its message content.

    我已经在一个应用程序中实现了这一点,试图通过发送电子邮件并查看地址来确定手机的电子邮件到SMS地址: http://bit.ly/J08Dyh

    I have implemented this in an app that tries to determine the phone's email-to-SMS address by sending out an email and looking at the from address: http://bit.ly/J08Dyh

    它还没有被广泛的测试,所以我同样好奇。

    It's not been widely tested yet, so I am equally curious.

    PVS

    这篇关于使用Android上的Verizon Motorola Droid,以编程方式将短信发送到电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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