<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zod.hu &#187; sms</title>
	<atom:link href="http://zod.hu/tag/sms/feed" rel="self" type="application/rss+xml" />
	<link>http://zod.hu</link>
	<description>Phase one: Linux, phase two: , phase three: profit!</description>
	<lastBuildDate>Wed, 11 Nov 2009 04:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Working with sms/mms in Android</title>
		<link>http://zod.hu/2009/11/working-with-smsmms-in-android.html</link>
		<comments>http://zod.hu/2009/11/working-with-smsmms-in-android.html#comments</comments>
		<pubDate>Wed, 11 Nov 2009 04:16:08 +0000</pubDate>
		<dc:creator>Zod</dc:creator>
				<category><![CDATA[Documenting the Undocumented]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[hidden api]]></category>
		<category><![CDATA[mms]]></category>
		<category><![CDATA[sms]]></category>

		<guid isPermaLink="false">http://zod.hu/?p=56</guid>
		<description><![CDATA[Important Although the following methods can be used to access messages on the Android platform, the API is probably hidden from developers for a reason. I think it&#8217;s hidden because mobile manufacturers are free to implement messaging as they like and the messaging application provided by Google is there only because every mobile platform needs [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Important</strong></p>
<p>Although the following methods can be used to access messages on the Android platform, the API is probably hidden from developers for a reason.</p>
<p>I think it&#8217;s hidden because mobile manufacturers are free to implement messaging as they like and the messaging application provided by Google is there only because every mobile platform needs messaging. I&#8217;m just guessing though&#8230;</p>
<p>Everything which is not in the official API reference is likely to change between releases and can also disappear without notice. Probably the API will be available with minor changes in &#8220;Google Experience&#8221; labeled phones because these devices ship the unmodified release builds, however there are already problems with this API on Hero, which is heavily customized by the manufacturer.</p>
<p>So think of this API as a reference implementation of messaging provided by the Google developers, which may or may not be available on an Android based device.</p>
<p><strong>What we know</strong></p>
<p>The official API has <a href="http://developer.android.com/reference/android/telephony/SmsManager.html" target="_blank">SmsManager</a> to send sms.</p>
<p>For some reason android.provider.Telephony is hidden in the SDK although it is still in the /frameworks/base/core/java/ directory which in my reading should be public and usable to app developers. Let&#8217;s pretend for now that this is a mistake and it is public. This file has the [public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED"] broadcast intent to capture incoming messages. You have to hardcode the string &#8220;android.provider.Telephony.SMS_RECEIVED&#8221; in the intent-filter but at least it&#8217;s defined in the core.</p>
<p><strong>Reading/Writing messages</strong></p>
<p>Here comes the part which is NOT in the core platform. Everything is defined in the /packages/providers/TelephonyProvider/ directory. Accessing messages can be done through the standard ContentProvider API. The usable Uri-s are:</p>
<p><em><br />
content:// +</em></p>
<p>sms</p>
<ul>
<li>retreive all messages</li>
</ul>
<p>sms/inbox<br />
sms/sent<br />
sms/draft<br />
sms/outbox</p>
<ul>
<li>retreive messages from the respective folders</li>
</ul>
<p>sms/#<br />
sms/inbox/#<br />
sms/sent/#<br />
sms/draft/#<br />
sms/outbox/#</p>
<ul>
<li>retreive a messages identified by its _id (Because _id-s are unique, all of the above maps to a select based on the message _id)</li>
</ul>
<p>sms/undelivered<br />
sms/failed<br />
sms/failed/#<br />
sms/queued<br />
sms/conversations<br />
sms/conversations/*<br />
sms/raw<br />
sms/attachments<br />
sms/attachments/#<br />
sms/threadID<br />
sms/threadID/*<br />
sms/status/#<br />
sms/sr_pending<br />
sms/icc<br />
sms/icc/#</p>
<ul>
<li>List/retreive messages from SIM</li>
</ul>
<p>sms/sim<br />
sms/sim/#</p>
<ul>
<li>Deprecated Uris, &#8220;sim&#8221; replaced by &#8220;icc&#8221;</li>
</ul>
<p>To be continued&#8230; I have to find some answers from the platform developers first :)</p>
]]></content:encoded>
			<wfw:commentRss>http://zod.hu/2009/11/working-with-smsmms-in-android.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

