<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Burcu Dogan&#039;s Blog &#187; android</title>
	<atom:link href="http://burcudogan.com/tag/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://burcudogan.com</link>
	<description>Burcu Dogan is a software engineer, a technologist and an open source enthusiastic.</description>
	<lastBuildDate>Thu, 05 Jan 2012 08:01:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='burcudogan.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Burcu Dogan&#039;s Blog &#187; android</title>
		<link>http://burcudogan.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://burcudogan.com/osd.xml" title="Burcu Dogan&#039;s Blog" />
	<atom:link rel='hub' href='http://burcudogan.com/?pushpress=hub'/>
		<item>
		<title>Android&#8217;s RTP implementation</title>
		<link>http://burcudogan.com/2011/06/05/android-rtp-implementation-is-based-on-udp/</link>
		<comments>http://burcudogan.com/2011/06/05/android-rtp-implementation-is-based-on-udp/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 23:49:10 +0000</pubDate>
		<dc:creator>Burcu Dogan</dc:creator>
				<category><![CDATA[Regular]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[rtp]]></category>
		<category><![CDATA[rtsp]]></category>
		<category><![CDATA[streaming]]></category>

		<guid isPermaLink="false">http://burcu.me/?p=742</guid>
		<description><![CDATA[Although still being not really mature, Android is supporting RTSP streaming for a long time. In theory, it&#8217;s very trivial to play an RTSP link with MediaPlayer controller. MediaPlayer player = new MediaPlayer("rtsp://..."); player.prepare(); player.start(); But in practice, MediaPlayer implementation is not fair enough to give you responses and you basically dont know what&#8217;s going [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=742&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although still being not really mature, Android is supporting RTSP streaming for a long time. In theory, it&#8217;s very trivial to play an RTSP link with MediaPlayer controller.</p>
<pre>MediaPlayer player = new MediaPlayer("rtsp://...");
player.prepare();
player.start();</pre>
<p>But in practice, MediaPlayer implementation is not fair enough to give you responses and you basically dont know what&#8217;s going on since your media is not playing. I will be generally talking about network layer, so you will have a basic idea how to configure your media servers.</p>
<h3>RTSP and RTP</h3>
<p>Generally we call it RTSP. But RTSP streaming has two phases: RTSP and mostly RTP to transform actual media data. RTSP is a stateful protocol. While making the first connection, it agrees on a bunch of details and exchanges data about the media being served between client and server. These are done with a family of directives.  These directives are sent on TCP 554. The RTSP flow includes OPTIONS, DESCRIBE, SETUP, PLAY/PAUSE/etc. On the request made for SETUP directive, client specifies what transform protocol it&#8217;ll support (in this case, it&#8217;s RTP) and on which protocol and which port. Android clients choose UDP and a range starting form 15000 to 65k. This range may change from phone to phone, manufacturer to manufacturer. Summary: There is absolutely no standard at  all. If you look at native MediaPlayer implementation in Android codebase, you will see no specific range as well. So, it&#8217;s very likely for you to have trouble. Another bad point is, RTP is usually supported on a port range between 9k-15k on TCP (e.g. Blackberry devices). And if you read tips and tricks about configuring a server, you won&#8217;t be able to catch the Android fact.</p>
<p><strong>Note</strong>: This post was a draft for about a year, I reviewed it and posted. There&#8217;s nothing over-dated according to my practical knowledge. If you are against me, contact me for fixes.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/burcudo.wordpress.com/742/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/burcudo.wordpress.com/742/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/burcudo.wordpress.com/742/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=742&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://burcudogan.com/2011/06/05/android-rtp-implementation-is-based-on-udp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7526ec3e801f8ba99f6746498a154a6?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">thejbf</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting bounds of a map to cover collection of POIs on Android</title>
		<link>http://burcudogan.com/2010/04/20/setting-bounds-of-a-map-to-cover-collection-of-pois-on-android/</link>
		<comments>http://burcudogan.com/2010/04/20/setting-bounds-of-a-map-to-cover-collection-of-pois-on-android/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 10:51:14 +0000</pubDate>
		<dc:creator>Burcu Dogan</dc:creator>
				<category><![CDATA[Regular]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.burcudogan.com/?p=521</guid>
		<description><![CDATA[Lately, as I browse web for maps related questions on Android, what&#8217;s frequently requested is an example of setting bounds of a map (zooming to a proper level and panning) to be able show all of the pins given on the screen. Most of the maps APIs provide this functionality such as Google Maps API, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=521&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lately, as I browse web for maps related questions on Android, what&#8217;s frequently requested is an example of setting bounds of a map (zooming to a proper level and panning) to be able show all of the pins given on the screen.</p>
<p>Most of the maps APIs provide this functionality such as Google Maps API, so developers seem to have problems with implementing theirs. Google Maps API for Android does not provide functionality for setting bounds to a box. Instead, what&#8217;s provided is to zoom to a span.</p>
<p><code>com.google.android.maps.MapController.<strong>zoomToSpan</strong>(int latSpanE6, int lonSpanE6)</code></p>
<p>latSpanE6 is the difference in latitudes * 10^6 and similarly lonSpanE6 is the difference longitude * 10^6. You may question how map controllers know where to zoom in just by the differences. For examples, kms between longitudes differ from equator to poles. Fortunately, Google maps projection has them in the same length. This may remind you the infamous <a href="http://answers.yahoo.com/question/index?qid=20090824125304AAiAM3j">South America versus Greenland syndrome</a>. Although Greenland is much much smaller than South America, it doesnt look so with this map projection.</p>
<p>On the below, I implemented a boundary arranger method for MapView. Method takes three arguments: items, hpadding and vpadding. items as you may guess is a list of POIs. Other arguments are a little bit more interesting. hpadding and vpadding is the percentage of padding you would like to leave horizontally and vertically so that pins don&#8217;t appear just on the corners. For instance, if you assign 0.1 for hpadding, 10% padding will be given from top and bottom.</p>
<p>BTW, You&#8217;ll have to extend the existing MapView and add this method to your own MapView to use this method properly.</p>
<pre class="java">public void <strong>setMapBoundsToPois</strong>(List&lt;GeoPoint&gt; items, double hpadding, double vpadding) {

    MapController mapController = this.getController();
    // If there is only on one result
    // directly animate to that location

    if (items.size() == 1) { // animate to the location
        mapController.animateTo(items.get(0));
    } else {
        // find the lat, lon span
        int minLatitude = Integer.MAX_VALUE;
        int maxLatitude = Integer.MIN_VALUE;
        int minLongitude = Integer.MAX_VALUE;
        int maxLongitude = Integer.MIN_VALUE;

        // Find the boundaries of the item set
        for (GeoPoint item : items) {
            int lat = item.getLatitudeE6(); int lon = item.getLongitudeE6();

            maxLatitude = Math.max(lat, maxLatitude);
            minLatitude = Math.min(lat, minLatitude);
            maxLongitude = Math.max(lon, maxLongitude);
            minLongitude = Math.min(lon, minLongitude);
        }

        // leave some padding from corners
        // such as 0.1 for hpadding and 0.2 for vpadding
        maxLatitude = maxLatitude + (int)((maxLatitude-minLatitude)*hpadding);
        minLatitude = minLatitude - (int)((maxLatitude-minLatitude)*hpadding);

        maxLongitude = maxLongitude + (int)((maxLongitude-minLongitude)*vpadding);
        minLongitude = minLongitude - (int)((maxLongitude-minLongitude)*vpadding);

        // Calculate the lat, lon spans from the given pois and zoom
        mapController.zoomToSpan(Math.abs(maxLatitude - minLatitude), Math
.abs(maxLongitude - minLongitude));

        // Animate to the center of the cluster of points
        mapController.animateTo(new GeoPoint(
              (maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
    }
} // end of the method</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/burcudo.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/burcudo.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/burcudo.wordpress.com/521/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=521&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://burcudogan.com/2010/04/20/setting-bounds-of-a-map-to-cover-collection-of-pois-on-android/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7526ec3e801f8ba99f6746498a154a6?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">thejbf</media:title>
		</media:content>
	</item>
		<item>
		<title>Maps Development on Android: Registering a Maps API key</title>
		<link>http://burcudogan.com/2009/11/06/maps-development-on-android-registering-a-maps-api-key/</link>
		<comments>http://burcudogan.com/2009/11/06/maps-development-on-android-registering-a-maps-api-key/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 12:29:57 +0000</pubDate>
		<dc:creator>Burcu Dogan</dc:creator>
				<category><![CDATA[Regular]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.burcudogan.com/?p=307</guid>
		<description><![CDATA[Location based applications are  musts on mobile platforms. Android does not have maps natively but Google Maps team is providing an add-on that comes with Android SDK (at least 1.5). In this post, I&#8217;m not going to show you how to pop out maps on your little mobile screen, but underline the application signature details [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=307&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Location based applications are  musts on mobile platforms. Android does not have maps <em>natively</em> but Google Maps team is providing an add-on that comes with Android SDK (at least 1.5). In this post, I&#8217;m not going to show you how to pop out maps on your little mobile screen, but underline the application signature details related with Maps API.</p>
<p>First of all in our to show map tiles properly, we need an API key. This is all because you are requesting from Google Data API and have to agree with the terms of service. I&#8217;m also sure that quote rules also apply.</p>
<p>Every Android application is signed with a signature of the publisher. While obtaining a key, you must provide the MD5 summary of your signature to Google, and Google activates possible transactions between Maps API and the application your signature signs. In order to complete these actions, you have to</p>
<ol>
<li>Obtain the MD5 summary of your signature. If you do not have a signature, you can use the default one.</li>
<li><a href="http://code.google.com/android/maps-api-signup.html">Sign up for an API key</a> directly from Google by providing the hash of your signature.</li>
<li>Use API key with map elements and generate a sample map view.</li>
</ol>
<h2>Obtaining an API key</h2>
<p>You will have to use the keytool to obtain information about signatures. If you haven&#8217;t created one, Android SDK puts a default one in your <code>~/.android</code> directory. In this tutorial, I&#8217;m going to show you how to register with this default signature. Open a terminal prompt and enter</p>
<pre>$ keytool -list -keystore <strong>~/.android/debug.keystore</strong></pre>
<p>It&#8217;s going to ask you the password of the keystore (debug.keystore). Default is &#8220;android&#8221;. If you receive a MalformedKeyringException, you are giving the wrong password. If everything works great, it will output a few lines of information including the hash. Please read the summary line and copy the hash.</p>
<pre>Certificate fingerprint (MD5): <strong>E8:F4:F2:BF:03:F3:3A:3D:F3:52:19:9B:58:20:87:68</strong></pre>
<p>After obtaining the summary key, you can jump to the next level &#8212; <a href="http://code.google.com/android/maps-api-signup.html">signing up for an API key</a>. Give the hash as input and register. Please note the API key Google has given to you.</p>
<h2>Generating Maps on Android</h2>
<p>Android SDK comes with two archives. First one is the <code>android.jar</code> which contains the standard platform libraries. And <code>maps.jar</code> which is a library dedicated to generation of maps. In the maps API, you will notice <a href="http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapView.html">MapView</a>. You can extend MapView to customize and add new features to show a custom map view. Or <a href="http://developer.android.com/guide/tutorials/views/hello-mapview.html">invoke the existing methods</a> to perform simple operations like panning, zooming and adding overlays to show information on the default map. There are great tutorials about Android&#8217;s map view and controller on web, I simply didn&#8217;t want to copy-cat the existing. Google&#8217;s <a href="http://developer.android.com/guide/tutorials/views/hello-mapview.html">Hello, MapView</a> is a place to start.</p>
<h2>Multiple-Developer Cases</h2>
<p>A signature can only be associated with a single API-key. What you are going to do if development is made across a team? You <strong>dont need to </strong>create different signatures for each developer and register them to use Data API one by one. Register a single signature and obtain a key. Then, <em>distibute the signature among the developers</em> &#8211; better add it to your version controlling system.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/burcudo.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/burcudo.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/burcudo.wordpress.com/307/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=burcudogan.com&amp;blog=21440216&amp;post=307&amp;subd=burcudo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://burcudogan.com/2009/11/06/maps-development-on-android-registering-a-maps-api-key/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7526ec3e801f8ba99f6746498a154a6?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">thejbf</media:title>
		</media:content>
	</item>
	</channel>
</rss>
