<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>sdk &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/sdk/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sun, 20 Jul 2025 07:07:49 +0000</lastBuildDate>
	<language>en-GB</language>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>sdk &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Share Android Apps on Twitter (or anywhere else)]]></title>
		<link>https://shkspr.mobi/blog/2010/07/share-android-apps-on-twitter-or-anywhere-else/</link>
					<comments>https://shkspr.mobi/blog/2010/07/share-android-apps-on-twitter-or-anywhere-else/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Tue, 20 Jul 2010 09:41:43 +0000</pubDate>
		<category><![CDATA[android]]></category><category><![CDATA[API]]></category><category><![CDATA[mobile]]></category><category><![CDATA[sdk]]></category><category><![CDATA[sharing]]></category><category><![CDATA[Sharing Is Caring]]></category><category><![CDATA[twitter]]></category>		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=2172</guid>

					<description><![CDATA[I attended the Mobile Monday meeting &#34;200,000 Apps - Where&#039;s Mine&#34; last night. One thing that became clear is that apps don&#039;t do a very good job of promoting themselves.  One crippling problems with most app stores is that there&#039;s no (easy) way to share an app with a friend.  Here&#039;s some basic code for an Android app which will post the URL of your app to Twitter.  Stick it in a button or menu…]]></description>
										<content:encoded>&lt;p&gt;I attended the Mobile Monday meeting "&lt;a href="https://web.archive.org/web/20100731020119/https://www.ibegyourparton.co.uk/2010/07/20/mobile-monday-london-write-up-%E2%80%93-%E2%80%9C200000-apps-where%E2%80%99s-mine%E2%80%9D/"&gt;200,000 Apps - Where's Mine&lt;/a&gt;" last night.
One thing that became clear is that apps don't do a very good job of promoting themselves.  One crippling problems with most app stores is that there's no (easy) way to share an app with a friend.&lt;/p&gt;

&lt;p&gt;Here's some basic code for an Android app which will post the URL of your app to Twitter.  Stick it in a button or menu item for easy sharing.&lt;/p&gt;

&lt;pre lang="java"&gt;String twitterUri = "http://m.twitter.com/?status=";
String marketUri = Uri.encode("http://example.com/?q=app&amp;amp;title=test");
Intent shareOnTwitterIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(twitterUri + marketUri));
startActivity(shareOnTwitterIntent);
&lt;/pre&gt;

&lt;p&gt;Some important things to note.&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;This is set to post to the &lt;em&gt;mobile &lt;/em&gt;version of Twitter.&amp;nbsp; Your user is on a phone - don't direct them to a site that won't work on their device.&lt;/li&gt;
    &lt;li&gt;The second string is &lt;a href="http://en.wikipedia.org/wiki/Percent-encoding"&gt;URI encoded&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;Consider if you want to post a "market://" link.&amp;nbsp; I would advise against it.&amp;nbsp; Twitter won't render it as a link and, even if it did, 90% of users won't be able to click on it.&amp;nbsp; Make it a link that will direct desktop users to your website, mobile users to a mobile friendly site and Android users direct to the market.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Facebook also has an &lt;a href="http://www.facebook.com/share/"&gt;API&lt;/a&gt; for this sort of sharing.&lt;/p&gt;

&lt;pre&gt;http://m.facebook.com/sharer.php?u=example.com&amp;amp;t=test
&lt;/pre&gt;

&lt;p&gt;Again, it points to the mobile site and needs to be URL encoded.&lt;/p&gt;

&lt;p&gt;Happy sharing!&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=2172&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/07/share-android-apps-on-twitter-or-anywhere-else/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Android Tutorial - Clickable Widgets]]></title>
		<link>https://shkspr.mobi/blog/2010/07/android-tutorial-clickable-widgets/</link>
					<comments>https://shkspr.mobi/blog/2010/07/android-tutorial-clickable-widgets/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Mon, 12 Jul 2010 10:09:42 +0000</pubDate>
		<category><![CDATA[android]]></category><category><![CDATA[API]]></category><category><![CDATA[browser]]></category><category><![CDATA[sdk]]></category><category><![CDATA[tutorial]]></category><category><![CDATA[widget]]></category>		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=2149</guid>

					<description><![CDATA[Another quick Android tutorial.  I couldn&#039;t find an easy or correct method of launching a browser when you click on a homescreen widget.  Well, here it is...  public class clickWidget extends AppWidgetProvider { @Override public void onUpdate( Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds ) { RemoteViews remoteViews =    new RemoteViews( context.getPackageName(),…]]></description>
										<content:encoded>&lt;p&gt;Another quick Android tutorial.  I couldn't find an easy or correct method of launching a browser when you click on a homescreen widget.  Well, here it is...&lt;/p&gt;

&lt;pre lang="java"&gt;public class clickWidget extends AppWidgetProvider
{
@Override
public void onUpdate( Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds )
{
RemoteViews remoteViews =
   new RemoteViews( context.getPackageName(), R.layout.widget );
remoteViews.setImageViewResource(R.id.ImageView01, drawableResourse);

ComponentName myWidget =
   new ComponentName( context, clickWidget.class );

// Create an Intent to launch Browser
Intent intent =
   new Intent(
      Intent.ACTION_VIEW, Uri.parse("http://example.com")
   );
PendingIntent pendingIntent =
   PendingIntent.getActivity(context, 0, intent, 0);

remoteViews.setOnClickPendingIntent(R.id.ImageView01, pendingIntent);
appWidgetManager.updateAppWidget( myWidget, remoteViews);
}
&lt;/pre&gt;

&lt;p&gt;I've used this as the basis of a demo widget - "MI5 Terror Threat Level".  The widget displays the UK's Threat Level on your homescreen.  Clicking on it takes you to the &lt;a href="https://web.archive.org/web/20101014002748/ttps://www.mi5.gov.uk/output/threat-levels.html"&gt;MI5 page discussing the threat level&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The threat level is determined by parsing the &lt;a href="https://web.archive.org/web/20101014003201/https://www.mi5.gov.uk/output/threat-level-rss.html"&gt;RSS that the security services so helpfully provide&lt;/a&gt;.  At the moment, the widget keeps a local copy of the graphics because the &lt;a href="http://www.mi5.gov.uk/UKThreatLevel/UKThreatLevel.xml"&gt;RSS feed&lt;/a&gt; contains references to "localhost" images.&lt;/p&gt;

&lt;p&gt;You can download the widget by scanning in this QR code.
&lt;/p&gt;&lt;div id="attachment_2155-2" style="width: 174px" class="wp-caption aligncenter"&gt;&lt;img aria-describedby="caption-attachment-2155-2" src="https://shkspr.mobi/blog/wp-content/uploads/2010/07/mi5.png" alt="MI5 Widget - QR Code" title="MI5 Widget - QR Code" width="164" height="164" class="size-full wp-image-2155"&gt;&lt;p id="caption-attachment-2155-2" class="wp-caption-text"&gt;MI5 Widget - QR Code&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=2149&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/07/android-tutorial-clickable-widgets/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
