<?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>ObjectGraph Blog</title>
	<atom:link href="http://blog.objectgraph.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.objectgraph.com</link>
	<description>News and Info about projects and experiments @ objectgraph.com</description>
	<lastBuildDate>Sun, 13 Jan 2013 03:51:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>VirtualBox and Android &#8211; Using Ready-to-go-image for development</title>
		<link>http://blog.objectgraph.com/index.php/2013/01/13/virtualbox-and-android-ready-to-go-image/</link>
		<comments>http://blog.objectgraph.com/index.php/2013/01/13/virtualbox-and-android-ready-to-go-image/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 03:44:47 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2736</guid>
		<description><![CDATA[Android Development Toolkit (ADT)&#8217;s emulator is probably the #1 reason to turn off beginners. It&#8217;s slow, sluggish, hog, whatever you name it, we can not accept it; however, I don&#8217;t have enough energy to tackle QEMU and installing android from scratch. Most of &#8220;Android and Virtual Machine&#8221; instructions on web are so outdated, long, and complicated. The best [...]]]></description>
			<content:encoded><![CDATA[<div>Android Development Toolkit (ADT)&#8217;s emulator is probably the #1 reason to turn off beginners. It&#8217;s slow, sluggish, hog, whatever you name it, we can not accept it; however, I don&#8217;t have enough energy to tackle QEMU and installing android from scratch. Most of &#8220;Android and Virtual Machine&#8221; instructions on web are so outdated, long, and complicated. The best solution is to use a pre-installed vm image, and let DDBM via IntelliJ to figure out witch device is running through the virtual USB port. Here is the instruction:</div>
<div></div>
<div></div>
<ol>
<li dir="ltr"><a href="https://www.virtualbox.org/wiki/Downloads">Download and Install VirtualBox</a></li>
<li dir="ltr">From the same website, download &amp; Install Oracle Virtual Box Extension Pack</li>
<li dir="ltr"><a href="http://www.vmlite.com/index.php?option=com_content&amp;view=article&amp;id=68:android&amp;catid=17:vmlitenewsrotator">Download Android 4 Image</a></li>
<li dir="ltr">Download .7z unarchiver if you don&#8217;t have (<a href="https://itunes.apple.com/us/app/the-unarchiver/id425424353?mt=12">Mac</a> / <a href="http://www.7-zip.org/">Win</a>)</li>
<li dir="ltr">Extract Android 4 Image (Ignore errors if any)</li>
<li dir="ltr">Double click VMLite-Android-v4.0.4.vbox</li>
</ol>
<p>To test the emulator is available from IntelliJ, go to Tools &gt; Android &gt; Monitor. I will popup as if it is just another device. I verified I can install and debug on the emulator. Make sure to turn on <strong>Settings &gt; Developer options &gt; USB Debugging</strong>.</p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.17.56-PM.png"><img class="alignnone  wp-image-2738" title="Screen Shot 2013-01-12 at 10.17.56 PM" src="http://blog.objectgraph.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.17.56-PM.png" alt="" width="573" height="602" /></a></p>
<p>This works like charm. No need for command line or anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2013/01/13/virtualbox-and-android-ready-to-go-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android Camera Real Tutorial</title>
		<link>http://blog.objectgraph.com/index.php/2012/12/31/android-camera-real-tutorial/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/12/31/android-camera-real-tutorial/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 05:07:10 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2726</guid>
		<description><![CDATA[In mobile development, we have two extreme giants: Apple and Google. Apple tends to be glorify the sample code just like BMW, and Google organize the documentation with problematic source codes. In this weekend, I struggle with sample codes and tutorials from Google (Camera Example). BTW, in case if you are working with programmers as [...]]]></description>
			<content:encoded><![CDATA[<p> In mobile development, we have two extreme giants: Apple and Google. Apple tends to be glorify the sample code just like BMW, and Google organize the documentation with problematic source codes. In this weekend, I struggle with sample codes and tutorials from Google (<a href="http://developer.android.com/guide/topics/media/camera.html">Camera Example</a>). BTW, in case if you are working with programmers as a product manager, this is a useful tip. When a programmer says, &#8220;I struggle for an half hour&#8221; means, he might already pulled his hair for 3-4 hours, and it&#8217;s my case today.</p>
<p>This is basic steps when you call the Camera Intent. </p>
<p>1. Prepare for the directory to save the image<br />
2. Create Intent with Camera option<br />
3. Start Activity with the intent. When you start it, don&#8217;t forget to speicify the request code.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> CAMERA_REQUEST <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1000</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> Uri mFileUri <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
	@Override
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle savedInstanceState<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		setContentView<span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>MediaStore.<span style="color: #006633;">ACTION_IMAGE_CAPTURE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">File</span> mediaStorageDir <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Environment</span>.<span style="color: #006633;">getExternalStoragePublicDirectory</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Environment</span>.<span style="color: #006633;">DIRECTORY_PICTURES</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;CameraTest&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		mediaStorageDir.<span style="color: #006633;">mkdir</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// make sure you got this folder</span>
		Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>,mediaStorageDir.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> timeStamp <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">SimpleDateFormat</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;yyyyMMdd_HHmmss&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">File</span> mediaFile <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span>mediaStorageDir.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #003399;">File</span>.<span style="color: #006633;">separator</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;IMG_&quot;</span><span style="color: #339933;">+</span> timeStamp <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		mFileUri <span style="color: #339933;">=</span> Uri.<span style="color: #006633;">fromFile</span><span style="color: #009900;">&#40;</span>mediaFile<span style="color: #009900;">&#41;</span>                   <span style="color: #339933;">;</span>
		intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span>MediaStore.<span style="color: #006633;">EXTRA_OUTPUT</span>, mFileUri<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">// this line causes issue - onActivityResult not called...</span>
		startActivityForResult<span style="color: #009900;">&#40;</span>intent, CAMERA_REQUEST<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>After calling the intent, the result will be back in onActivityResult method. Let&#8217;s assume the user took a picture, and clicked OK icon. In the Google example above, it did not cover the case that onActivityResult gives null for the Intent in the argument. The workaround is to keep the file path in the member variable, and get the Image using Uri.fromFile method. Check the source code below.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">	@Override
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> onActivityResult<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> requestCode, <span style="color: #000066; font-weight: bold;">int</span> resultCode, Intent data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>requestCode <span style="color: #339933;">==</span> CAMERA_REQUEST<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>resultCode <span style="color: #339933;">==</span> RESULT_OK<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// Oopse ! data is null somehow. wtf</span>
				<span style="color: #666666; font-style: italic;">//Toast.makeText(this, &quot;Saved: &quot; + data.getData(), 10).show();</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
					Bitmap bitmap <span style="color: #339933;">=</span> MediaStore.<span style="color: #006633;">Images</span>.<span style="color: #006633;">Media</span>.<span style="color: #006633;">getBitmap</span><span style="color: #009900;">&#40;</span>getContentResolver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,mFileUri<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					Toast.<span style="color: #006633;">makeText</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>,<span style="color: #0000ff;">&quot;Saved : &quot;</span> <span style="color: #339933;">+</span> bitmap.<span style="color: #006633;">getByteCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; bytes&quot;</span> , <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>resultCode <span style="color: #339933;">==</span> RESULT_CANCELED<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>,<span style="color: #0000ff;">&quot;camera canceled&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
				Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>,<span style="color: #0000ff;">&quot;camera error&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">// eo if requestCode</span>
	<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">// eo onActivityResult</span></pre>
</div>
</div>
<p>That&#8217;s it. I googled around all over the places, but this is the answer for it. I&#8217;m not sure the exact conditions which above codes applies. I&#8217;m using Galaxy S with Android 4.1.1. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/12/31/android-camera-real-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Merry Christmas!</title>
		<link>http://blog.objectgraph.com/index.php/2012/12/22/merry-christmas/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/12/22/merry-christmas/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 18:31:44 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[christmas]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2716</guid>
		<description><![CDATA[For this holiday season, we updated Christmas Sound and Music app for iPhone 5. Check this out, it&#8217;s free! Also, don&#8217;t forget our iPad Version!]]></description>
			<content:encoded><![CDATA[<p>For this holiday season, we updated Christmas Sound and Music app for iPhone 5. Check this out, it&#8217;s free!</p>
<p><a href="https://itunes.apple.com/us/app/christmas-sounds-music-free/id342977714?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2012/12/mzl.voyiuhpl.320x480-75.jpg" alt="" title="mzl.voyiuhpl.320x480-75" width="270" height="480" class="alignnone size-full wp-image-2717" /></a></p>
<p><a href="https://itunes.apple.com/us/app/christmas-sounds-music-free/id342977714?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="" title="App Store Download" width="190" height="62" class="alignnone size-full wp-image-159" /></a></p>
<p>Also, don&#8217;t forget our iPad Version!<br />
<a href="https://itunes.apple.com/us/app/christmas-sound-shelf-free/id404026605?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2012/12/mzl.dcexstus.480x480-75.jpg" alt="" title="mzl.dcexstus.480x480-75" width="360" height="480" class="alignnone size-full wp-image-2720" /></a></p>
<p><a href="https://itunes.apple.com/us/app/christmas-sound-shelf-free/id404026605?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="" title="App Store Download" width="190" height="62" class="alignnone size-full wp-image-159" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/12/22/merry-christmas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling Objective C on Command Line with Foundation Framework and ARC</title>
		<link>http://blog.objectgraph.com/index.php/2012/12/18/compiling-objective-c-on-command-line-with-foundation-framework-and-arc/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/12/18/compiling-objective-c-on-command-line-with-foundation-framework-and-arc/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 03:21:34 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2709</guid>
		<description><![CDATA[I think learning Objective-C on command line gives you better understanding rather than just use XCode generated templates. For Example take the following code. Create a file called point.m and put the following code #import &#60;Foundation/Foundation.h&#62; &#160; @interface MyPoint: NSObject @property float x; @property float y; -&#40;float&#41; distance:&#40;MyPoint*&#41;other; -&#40;NSString*&#41; description; @end &#160; @implementation MyPoint @synthesize [...]]]></description>
			<content:encoded><![CDATA[<p>I think learning Objective-C on command line gives you better understanding rather than just use XCode generated templates. For Example take the following code. Create a file called point.m and put the following code</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> MyPoint<span style="color: #002200;">:</span> <span style="color: #400080;">NSObject</span>
<span style="color: #a61390;">@property</span> <span style="color: #a61390;">float</span> x;
<span style="color: #a61390;">@property</span> <span style="color: #a61390;">float</span> y;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span> distance<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>MyPoint<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>other;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> description;
<span style="color: #a61390;">@end</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> MyPoint
<span style="color: #a61390;">@synthesize</span> x,y;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span> distance<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>MyPoint<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>other<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">return</span> <span style="color: #a61390;">sqrt</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>self.x<span style="color: #002200;">-</span>other.x<span style="color: #002200;">&#41;</span><span style="color: #002200;">*</span><span style="color: #002200;">&#40;</span>self.x<span style="color: #002200;">-</span>other.x<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">+</span>
	<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>self.y<span style="color: #002200;">-</span>other.y<span style="color: #002200;">&#41;</span><span style="color: #002200;">*</span><span style="color: #002200;">&#40;</span>self.y<span style="color: #002200;">-</span>other.y<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span>
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> description<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;(%f,%f)&quot;</span>,self.x,self.y<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span>
&nbsp;
<span style="color: #a61390;">int</span> main<span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> argc,<span style="color: #a61390;">char</span> <span style="color: #002200;">*</span>argv<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
	MyPoint <span style="color: #002200;">*</span>a<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MyPoint alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	MyPoint <span style="color: #002200;">*</span>b<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MyPoint alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	a.x<span style="color: #002200;">=</span>10.0f;
	a.y<span style="color: #002200;">=</span>10.0f;
	b.x<span style="color: #002200;">=</span>20.0f;
	b.y<span style="color: #002200;">=</span>20.0f;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;a %@&quot;</span>,a<span style="color: #002200;">&#41;</span>;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;b %@&quot;</span>,b<span style="color: #002200;">&#41;</span>;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Distance is %f&quot;</span>,<span style="color: #002200;">&#91;</span>a distance<span style="color: #002200;">:</span>b<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #a61390;">return</span> <span style="color: #2400d9;">0</span>;
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<p>Now compile it using the command below</p>
<div class="wp_syntax">
<div class="code">
<pre class="shell" style="font-family:monospace;">clang -fobjc-arc point.m -o point -framework Foundation</pre>
</div>
</div>
<p>Run it below</p>
<div class="wp_syntax">
<div class="code">
<pre class="shell" style="font-family:monospace;">./point</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/12/18/compiling-objective-c-on-command-line-with-foundation-framework-and-arc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CommunicAide: AAC / Speech Therapy iPad App</title>
		<link>http://blog.objectgraph.com/index.php/2012/12/04/communicaide-aac-speech-therapy-ipad-app/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/12/04/communicaide-aac-speech-therapy-ipad-app/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 22:36:06 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[aac]]></category>
		<category><![CDATA[communicaide]]></category>
		<category><![CDATA[speech therapy]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2654</guid>
		<description><![CDATA[Developed by two experienced speech language pathologists, CommunicAide is directed at the thousands of people each day who live with the long lasting effects of Aphasia and other language disorders. CommunicAide offers the largest selection of real photographs and real human voices to date for nearly any situation, as well as the ability to import [...]]]></description>
			<content:encoded><![CDATA[<p>Developed by two experienced speech language pathologists, CommunicAide is directed at the thousands of people each day who live with the long lasting effects of Aphasia and other language disorders. CommunicAide offers the largest selection of real photographs and real human voices to date for nearly any situation, as well as the ability to import your own photographs for a truly customizable experience. Through an extremely user friendly interface, this app allows those living with language disorders the ability to communicate their wants and needs to others. By simply selecting a photo and/ or phrase, users can formulate complete sentences and questions, providing them with a new sense of independence and freedom of expression. Both speech language pathologists have been using CommunicAide at the LIU/Post speech and hearing clinic with remarkable results. Hope4Speech in conjunction with Objectgraph hope this app will help to improve the quality of life of its users.</p>
<p><a href="https://itunes.apple.com/us/app/communicaide-aac-speech-therapy/id580971913?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png" alt="" /></a></p>
<p>Features Include:</p>
<ul style="margin-left: 50px;">
<li>Sleek and user friendly interface for all ages</li>
<li>Customizable field of photos</li>
<li>Option to import personal photos and phrases</li>
<li>Option to save favorite phrases</li>
<li>Easy to use touch features</li>
<li>Real human voices for all photos and text ( option to choose &#8211; - male or female)</li>
<li>Real professional photographs</li>
<li>Body image with pain meter</li>
</ul>
<p><iframe src="http://player.vimeo.com/video/55423328?title=0&amp;byline=0&amp;portrait=0&amp;badge=0" width="600" height="337" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<h3>Main Screen</h3>
<p>When you open the app, you will be shown the following screen.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/12/main_screen_full1.png"><img class="alignnone size-full wp-image-2675" title="main_screen_full" src="http://blog.objectgraph.com/wp-content/uploads/2012/12/main_screen_full1.png" alt="" width="600" /></a></p>
<p>You can form a sentence by just clicking on the items and hitting play.</p>
<h3>Body Chart</h3>
<p>The body chart assists the users to point and click and show the doctor where they have pain.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/12/iOS-Simulator-Screen-shot-Dec-9-2012-1.05.14-PM_sm.png"><img class="alignnone  wp-image-2701" title="iOS-Simulator-Screen-shot-Dec-9,-2012-1.05.14-PM_sm" src="http://blog.objectgraph.com/wp-content/uploads/2012/12/iOS-Simulator-Screen-shot-Dec-9-2012-1.05.14-PM_sm.png" alt="" width="614" height="461" /></a></p>
<h3>Settings</h3>
<p>Use the settings screen to update the voice preferences(male,female), put app in to edit mode (So you can add your own items) or enable tap to play (So the item starts playing with out creating sentence first- So user can simply say coffee with out first creating a sentence). You can also change columns so the items are bigger for challenged users.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/12/settings.png"><img class="alignnone size-full wp-image-2685" title="settings" src="http://blog.objectgraph.com/wp-content/uploads/2012/12/settings.png" alt="" width="392" height="534" /></a></p>
<h3>Edit Mode (For Care Providers)</h3>
<p>Care providers can add new items. It cant be more simpler. Just put the app in Edit mode and click on &#8220;Add Item&#8221; in any of the categories.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/12/edit_mode.png"><img class="alignnone size-full wp-image-2688" title="edit_mode" src="http://blog.objectgraph.com/wp-content/uploads/2012/12/edit_mode.png" alt="" width="600" /></a></p>
<p>Adding an item cant be simpler as shown below.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/12/add_item.png"><img class="alignnone size-full wp-image-2690" title="add_item" src="http://blog.objectgraph.com/wp-content/uploads/2012/12/add_item.png" alt="" width="600" /></a></p>
<p>Basic Instructions</p>
<p><iframe src="http://player.vimeo.com/video/55419863?title=0&amp;byline=0&amp;portrait=0&amp;badge=0" width="600" height="450" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>Advance Instructions</p>
<p><iframe src="http://player.vimeo.com/video/55420445?title=0&amp;byline=0&amp;portrait=0&amp;badge=0" width="600" height="450" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>We hope that users really benefit by using this app. You can download it from App Store today.</p>
<p><a href="https://itunes.apple.com/us/app/communicaide-aac-speech-therapy/id580971913?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/12/04/communicaide-aac-speech-therapy-ipad-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Was my iPhone Device ID leaked?</title>
		<link>http://blog.objectgraph.com/index.php/2012/09/05/was-my-iphone-device-id-leaked/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/09/05/was-my-iphone-device-id-leaked/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 17:22:35 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2645</guid>
		<description><![CDATA[MacRumor reported that a hacker group released 1 million Apple iPhone&#8217;s device ids in the public. In the report, they mention the FBI could be the source, while FBI quickly denies it. FBI denies it was source of leaked Apple device ID data. As our routine work, we created a quick lookup tool anyway. Check this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.macrumors.com/2012/09/04/hackers-release-1-million-ios-device-udids-obtained-from-fbi-laptop/">MacRumor reported that a hacker group released 1 million Apple iPhone&#8217;s device ids in the public</a>. In the report, they mention the FBI could be the source, while FBI quickly denies it. <a href="http://www.computerworld.com/s/article/9230918/FBI_denies_it_was_source_of_leaked_Apple_device_ID_data">FBI denies it was source of leaked Apple device ID data</a>. As our routine work, we created a quick lookup tool anyway. Check this out!</p>
<p>Click <a href="http://bit.ly/iphone_leak">here</a> to check your iPhone ID. Here is the <a href="http://www.innerfence.com/howto/find-iphone-unique-device-identifier-udid">steps</a>to find your device id.</p>
<p><img class="alignnone size-full wp-image-2646" title="Screen Shot 2012-09-05 at 1.09.06 PM" src="http://blog.objectgraph.com/wp-content/uploads/2012/09/Screen-Shot-2012-09-05-at-1.09.06-PM.png" alt="" width="418" height="249" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/09/05/was-my-iphone-device-id-leaked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How about &#8220;Real&#8221; rotary dialer for a labor day gift?</title>
		<link>http://blog.objectgraph.com/index.php/2012/08/31/how-about-real-rotary-dialer-for-a-labor-day-gift/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/08/31/how-about-real-rotary-dialer-for-a-labor-day-gift/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 03:49:35 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[fashion]]></category>
		<category><![CDATA[interior]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2619</guid>
		<description><![CDATA[I&#8217;m very proud of announcing our first collaboration with an innovative novelty company, Universal Enterrises in Australia. Lisa Tonkin who leads their product development offered an &#8220;Real&#8221; novelty collaboration opportunity to us with the next generation of our famous &#8220;Rotary Dialer&#8221; App!  Check this out the coolest iPhone gadget ever! &#160; &#160; I don&#8217;t know which store [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very proud of announcing our first collaboration with an innovative novelty company,<a href="http://www.universal-ent.com/"> Universal Enterrises</a> in Australia. Lisa Tonkin who leads their product development offered an <a href="http://www.universal-ent.com/products/gifts.html" target="_blank">&#8220;Real&#8221; novelty collaboration opportunity</a> to us with the next generation of our famous <a href="http://itunes.apple.com/us/app/universal-rotary-dialer/id548029532?mt=8" target="_blank">&#8220;Rotary Dialer&#8221; App! </a> Check this out the coolest iPhone gadget ever!</p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/08/Screen-Shot-2012-08-30-at-11.27.38-PM.png"><img class="size-full wp-image-2622 aligncenter" title="Universal version Rotary Dialer" src="http://blog.objectgraph.com/wp-content/uploads/2012/08/Screen-Shot-2012-08-30-at-11.27.38-PM.png" alt="Universal version Rotary Dialer" width="484" height="377" /></a></p>
<p>&nbsp;</p>
<p>I don&#8217;t know which store sells the cool retro-phone novelty in the U.S but they listed shops in Australia.</p>
<p><a href="http://www.universal-ent.com/stockists.html" target="_blank">http://www.universal-ent.com/stockists.html</a></p>
<p>&nbsp;</p>
<p>We will upload an Youtube movie once we get the product. Don&#8217;t forget to check their<a href="http://www.facebook.com/pages/Universal-Enterprises/24263959570?v=wall" target="_blank"> FB page &#8230; here!</a></p>
<p>&nbsp;</p>
<p>Contact Information: <a href="http://www.universal-ent.com/contact.html" target="_blank">http://www.universal-ent.com/contact.html</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/08/31/how-about-real-rotary-dialer-for-a-labor-day-gift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Was my LinkedIn password compromised?</title>
		<link>http://blog.objectgraph.com/index.php/2012/06/08/was-my-linkedin-password-compromised/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/06/08/was-my-linkedin-password-compromised/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 20:31:19 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[leak]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2606</guid>
		<description><![CDATA[Today, hackers posted 6.5 million LinkedIn password on a public website. We created a secure website where you can quickly check your password. Enter your password and hit check button. Click here to go to the website.]]></description>
			<content:encoded><![CDATA[<p>Today, hackers posted 6.5 million LinkedIn password on a public website. We created a secure website where you can quickly check your password. Enter your password and hit check button. <a href="http://blog.objectgraph.com/linkedin/">Click here to go to the website</a>.</p>
<p><a href="http://blog.objectgraph.com/linkedin"><img class="alignnone size-large wp-image-2607" title="Screen Shot 2012-06-08 at 4.22.38 PM" src="http://blog.objectgraph.com/wp-content/uploads/2012/06/Screen-Shot-2012-06-08-at-4.22.38-PM-550x346.png" alt="" width="550" height="346" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/06/08/was-my-linkedin-password-compromised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Was my twitter account compromised?</title>
		<link>http://blog.objectgraph.com/index.php/2012/05/09/was-m-twitter-account-compromised/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/05/09/was-m-twitter-account-compromised/#comments</comments>
		<pubDate>Wed, 09 May 2012 21:32:05 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[webapps]]></category>
		<category><![CDATA[account]]></category>
		<category><![CDATA[leak]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2600</guid>
		<description><![CDATA[Today, hackers posted 55K+ twitter username and password on a public website. We created a website where you can quickly check your username. Enter your username and hit check button. Click here to go to the website.]]></description>
			<content:encoded><![CDATA[<p>Today, hackers posted 55K+ twitter username and password on a public website. We created a website where you can quickly check your username. Enter your username and hit check button. <a href="http://blog.objectgraph.com/twitter/">Click here to go to the website</a>.</p>
<p><a href="http://blog.objectgraph.com/twitter/"><img class="alignnone size-large wp-image-2601" title="Twitter Account Check" src="http://blog.objectgraph.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-09-at-5.29.38-PM-550x463.png" alt="" width="550" height="463" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/05/09/was-m-twitter-account-compromised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geo Elevation for Android Released</title>
		<link>http://blog.objectgraph.com/index.php/2012/04/28/geo-elevation-for-android-released/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/04/28/geo-elevation-for-android-released/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 03:56:25 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Geo]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2589</guid>
		<description><![CDATA[We just released Geo Elevation App for Android! This app let you draw a path by touching screen, and you can generate a &#8220;Cross-Section&#8221; elevation chart. This is some sort of side-view when you cut through the object. For example, if you are wondering how Mt. Fuji looks like from the side, draw the pass [...]]]></description>
			<content:encoded><![CDATA[<p>We just released <a href="https://play.google.com/store/apps/details?id=com.objectgraph.GeoElevation">Geo Elevation App for Android</a>! This app let you draw a path by touching screen, and you can generate a &#8220;Cross-Section&#8221; elevation chart. This is some sort of side-view when you cut through the object. For example, if you are wondering how Mt. Fuji looks like from the side, draw the pass across the peak, then simply hit &#8220;Get Elevation&#8221; button. Not only for study usage, but also this is useful for biking or jogging. Draw a path through your favorite training routes, then the app will tell you the hilly areas v.s. flat area in the comprehensive chart.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/04/Feature_sm1.png"><img class="alignnone size-full wp-image-2595" title="Feature_sm" src="http://blog.objectgraph.com/wp-content/uploads/2012/04/Feature_sm1.png" alt="" width="550" height="269" /></a></p>
<p>Unlikely other elevation app, you can drop the pin anywhere you want, then find out the elevation right away. The app also allows you to export the data in various formats, such as KML, CSV, summary text, image, and so on.</p>
<p>Get this app while it is promotional price.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/gGOXyb2nUXY" frameborder="0" allowfullscreen></iframe></p>
<p><a href="https://play.google.com/store/apps/details?id=com.objectgraph.GeoElevation"><img class="alignnone size-full wp-image-2584" title="googleplaylogo" src="http://blog.objectgraph.com/wp-content/uploads/2012/04/googleplaylogo.gif" alt="" width="258" height="76" />Download Geo Elevation for Android NOW!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/04/28/geo-elevation-for-android-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Geo Measure for Android Released</title>
		<link>http://blog.objectgraph.com/index.php/2012/04/26/geo-measure-for-android-released/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/04/26/geo-measure-for-android-released/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 04:16:00 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[area]]></category>
		<category><![CDATA[calculation]]></category>
		<category><![CDATA[distance]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[measure]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2576</guid>
		<description><![CDATA[Need to measure your land? How long is your jogging path? What is the area size of New York State? Geo Measure app in Android will give you the answer right away. Check out the intuitive drag &#38; drop interface to measure the area and distance in a few clicks away. If you find interesting [...]]]></description>
			<content:encoded><![CDATA[<p>Need to measure your land? How long is your jogging path? What is the area size of New York State? <a href="http://bit.ly/HGEvhQ">Geo Measure app in Android</a> will give you the answer right away. Check out the intuitive drag &amp; drop interface to measure the area and distance in a few clicks away. If you find interesting / useful way to use the app, please leave your feedback in the comment area.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/04/Feature_sm.png"><img class="alignnone size-full wp-image-2580" title="Feature_sm" src="http://blog.objectgraph.com/wp-content/uploads/2012/04/Feature_sm.png" alt="" width="550" height="269" /></a></p>
<p>Check out the demo movie here</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/lQM0j7iHANY" frameborder="0" allowfullscreen></iframe></p>
<p>The app also works for tablet device. </p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/Tewsy1su-M0" frameborder="0" allowfullscreen></iframe></p>
<p>In addition, we will cover some of those programming materials in our new online course, Mobile GIS (Starting this september).</p>
<p><a href="http://bit.ly/HGEvhQ"><img src="http://blog.objectgraph.com/wp-content/uploads/2012/04/googleplaylogo.gif" alt="" title="googleplaylogo" width="258" height="76" class="alignnone size-full wp-image-2584" /> Download Geo Measure from Google Play</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/04/26/geo-measure-for-android-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Geo Elevation App for iPhone and iPad</title>
		<link>http://blog.objectgraph.com/index.php/2012/03/25/geo-elevation-app-for-iphone-and-ipad/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/03/25/geo-elevation-app-for-iphone-and-ipad/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 15:19:26 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[bathymetric]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[cross section]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[marathon]]></category>
		<category><![CDATA[mountain]]></category>
		<category><![CDATA[side view]]></category>
		<category><![CDATA[trench]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2538</guid>
		<description><![CDATA[Send email to iphone [-at-] objectgraph.com or add a comment below to request a free coupon code! Hurry up, because we have very limited amount of coupon codes. Geo Elevation is a powerful tool to build a cross-sectional elevation chart from any paths/points on the map with a few clicks. Simply create a path and [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #0000ff;"><strong>Send email to iphone [-at-] objectgraph.com or add a comment below to request a free coupon code! Hurry up, because we have very limited amount of coupon codes.</strong></span></p>
<p><a href="http://itunes.apple.com/us/app/geo-elevation-map-elevation/id509924746?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="" width="190" height="62" /></a><br />
<strong></strong></p>
<p><strong>Geo Elevation</strong> is a powerful tool to build a cross-sectional elevation chart from any paths/points on the map with a few clicks. Simply create a path and click on &#8220;Get Elevation&#8221; you will see a nice chart. Now, this app works on both iPhone and iPad! Buy only once, and enjoy in both platform. We definitely recommend you to try it on iPad.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/iphone4.png"><img title="Geo Elevation - Cut Through the Mt. Everest" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/iphone4.png" alt="" width="384" height="576" /></a> <a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/iphone3.png"><img class="alignnone  wp-image-2561" title="Geo Elevation - Strike Through Japan" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/iphone3.png" alt="" width="384" height="576" /></a></p>
<p>How does Mt. Everest look like if you cut through the peak, and view it from the side? Try to draw a path from your place to the nearest shoreline. See how slope decline as it approach the ocean? How about investingating the Mariana Trench&#8217;s steep slope, which goes down to the deepest place on the Earth?</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/ios_1.png"><img class="alignnone size-large wp-image-2545" title="Geo Elevation App let you strike through continents and island" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/ios_1-550x412.png" alt="" width="550" height="412" /></a></p>
<p>In addition, the line of the elevation profile is clickable to indicate corresponding location on the path that you draw.</p>
<p>[Features]<br />
- Get Elevation from single point<br />
- Get Elevation from a path<br />
- Path will automatically allocate 100 points (really high-definition of elevation profiles!)<br />
- Export cross-sectional chart in PDF<br />
- Export cross-sectional chart in PNG<br />
- Export raw data in CSV format<br />
- Export the path in KML<br />
- Single-click to export all formats<br />
- Indicator to match the side view and the top view<br />
- Retina display compatible<br />
- Customized UI for NEW iPad<br />
- Multi-touch in the chart screen<br />
- Current Location On/Off<br />
- Draggable Waypoints (Adjust the path later)<br />
- Instant calculation of the distance<br />
- State of art intuitive path draw tool<br />
- Universal binary works both iPhone and iPad.<br />
- Unlimited Undo / Redo<br />
- Convenient &#8220;Clear All&#8221; button to reset<br />
- Navigation Mode (Lock the screen to browse)<br />
- Search location to zoom the target location quickly</p>
<p>[Usage]<br />
- As a <strong>bike / running route builder</strong>: It&#8217;s convenient to research your bike road profile in order to figure out the schematics of hills.</p>
<p>- <strong>Mobile Learning Experience in the Classroom</strong>. If you are teaching Geology or Earth Science, you might have a handout to build a cross-sectional elevation chart from a contour map, and you can let students to verify their answer by themselves. Don&#8217;t forget, Geo Elevation will provide infinite locations to investigate! The usage is unlimited.</p>
<p>- Possible flood area investigation: Before storm surge or high tide hit your town, verify locations or road that could be flooded. Draw the path from your house to the nearest shoreline to see the vertical profile.</p>
<p>- Plan your Walk or Run: If you host a walk or run event, Geo Elevation will help you to find out the slope so that you can map challenging hill in your event. Additionally, it might help you to setup multiple routs depend of the slope.</p>
<p>- For hiker and mountaineers (send us your review if you used for your activities!)</p>
<p>Add your feedback in comments or send us email to iphone [-at-] objectgraph.com.</p>
<p>We would like to hear more user experiences! How did you use it? What did you use it for? Is there anything to improve?</p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/ios_2.png"><img class="alignnone size-large wp-image-2546" title="Geo Elevation with Mt. St. Helens" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/ios_2-550x412.png" alt="" width="550" height="412" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/bike_path2.png"><img class="alignnone size-large wp-image-2563" title="Bike Path" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/bike_path2-366x550.png" alt="" width="366" height="550" /></a></p>
<p>Bike Path Builder!</p>
<p><a href="http://itunes.apple.com/us/app/geo-elevation-map-elevation/id509924746?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="" width="190" height="62" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/03/25/geo-elevation-app-for-iphone-and-ipad/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Android Development: JavaScript Bridge Example &#8211; Fully Explained!</title>
		<link>http://blog.objectgraph.com/index.php/2012/03/16/android-development-javascript-bridge-example-fully-explained/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/03/16/android-development-javascript-bridge-example-fully-explained/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 15:02:52 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[callback]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webview]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2500</guid>
		<description><![CDATA[In this smartphone generation, we expected have a full browser functionality in API; iOS SDK is coming with UIWebView and Android has WebView. This means, developer is able to take advantage the core engine, such as JavaScript parser. This might make developer&#8217;s life easier sometime because we can reuse same libraries from JavaScript &#8211; e.g [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/android_javascript_bridge_sample.png"><img class=" wp-image-2503 alignleft" title="android_javascript_bridge_sample" src="http://blog.objectgraph.com/wp-content/uploads/2012/03/android_javascript_bridge_sample-168x300.png" alt="" width="134" height="240" /></a></p>
<p>In this smartphone generation, we expected have a full browser functionality in API; iOS SDK is coming with UIWebView and Android has WebView.</p>
<p>This means, developer is able to take advantage the core engine, such as JavaScript parser. This might make developer&#8217;s life easier sometime because we can reuse same libraries from JavaScript &#8211; e.g form + validations, drawing chart and so on.</p>
<p>I looked around android documentations, StackOverflow and some forums but I could not find a good summary and organized complete example.<br />
Here, I demonstrate my experiment of a full cycle of JavaScript / Java function calls from both sides.<br />
<br/><br/><br/><br/></p>
<h4>Setup</h4>
<p><strong>1. Add WebView in your layout, and add HTML file in asset folder.<br />
</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WebView</span> <span style="color: #000066;">android:id</span>=<span style="color: #ff0000;">&quot;@+id/myWebView&quot;</span></span>
<span style="color: #009900;">         <span style="color: #000066;">android:layout_width</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span></span>
<span style="color: #009900;">         <span style="color: #000066;">android:layout_height</span>=<span style="color: #ff0000;">&quot;fill_parent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/WebView<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
<p>2. Create a JavaScriptHandler class which has a reference to parent activity.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JavaScriptHandler <span style="color: #009900;">&#123;</span>
    MyActivity parentActivity<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> JavaScriptHandler<span style="color: #009900;">&#40;</span>MyActivity activity<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        parentActivity <span style="color: #339933;">=</span> activity<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setResult<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">parentActivity</span>.<span style="color: #006633;">javascriptCallFinished</span><span style="color: #009900;">&#40;</span>val<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> calcSomething<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x, <span style="color: #000066; font-weight: bold;">int</span> y<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">parentActivity</span>.<span style="color: #006633;">changeText</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Result is : &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>x <span style="color: #339933;">*</span> y<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>3. Load HTML and JavaScript in the Activity class and add the JavaScriptHandler class above.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">myWebView <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>WebView<span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">findViewById</span><span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">myWebView</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
myWebView.<span style="color: #006633;">getSettings</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setJavaScriptEnabled</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
myWebView.<span style="color: #006633;">addJavascriptInterface</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> JavaScriptHandler<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;MyHandler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
myWebView.<span style="color: #006633;">loadUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file:///android_asset/index.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>4. Now, it&#8217;s ready to call from both side.</p>
<p>A) Call JavaScript from Java<br />
In step 3, we added the handler in the WebView, and &#8220;MyHandler&#8221; would be the object that you can call in the html as below:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">window.<span style="color: #006633;">MyHandler</span>.<span style="color: #006633;">myfunction</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>B) Call JavaScript from Java</p>
<p>On the other hand, if you need to call JavaScript from Java side, we use loadUrl with javascript keyword as below:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">myWebView.<span style="color: #006633;">loadUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;javascript:myjavascriptfunc()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>or you can directly manipulate something like:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">myWebView.<span style="color: #006633;">loadUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;javascript:document.getElementById('test1').innerHTML = '&amp;lt;strong&amp;gt;&quot;</span><span style="color: #339933;">+</span>someText<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&amp;lt;/strong&amp;gt;'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>So how about the full cycle? What if I want to call JavaScript function from Java, then I would get the result back from the process?</p>
<p>Here is important key point: loadUrl function is asynchronous call. Let&#8217;s say, your Java function wants to call a JavaScript function via loadUrl.<br />
However, loadUrl dispatch the thread and you need to let WebView call your handler&#8217;s function inside. So let&#8217;s create two functions: call and finished.</p>
<p><em>Calling JavaScript</em></p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> callJavaScriptFunctionAndGetResultBack<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> val1, <span style="color: #000066; font-weight: bold;">int</span> val2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    myWebView.<span style="color: #006633;">loadUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;javascript:window.MyHandler.setResult( addSomething(&quot;</span><span style="color: #339933;">+</span>val1<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #339933;">+</span>val2<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;) )&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p><em>Catching when the JavaScript call finished</em></p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> javascriptCallFinished<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    Toast.<span style="color: #006633;">makeText</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #0000ff;">&quot;Callback got val: &quot;</span> <span style="color: #339933;">+</span> val, <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>In this example, I&#8217;m passing two integer values in the first call function. In the argument, it&#8217;ll call addSomething() JavaScript function, and then<br />
it places the result back by calling MyHandler&#8217;s function, which is an interface object, in order to call Java function over there. Let&#8217;s come back to<br />
Java side. In Java side, since we get reference from the parent Activity class, we just call one of member functions.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JavaScriptHandler <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">//....</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setResult<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">parentActivity</span>.<span style="color: #006633;">javascriptCallFinished</span><span style="color: #009900;">&#40;</span>val<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//....</span></pre>
</div>
</div>
<p>Here is the function to be called in Activity.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> javascriptCallFinished<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>,<span style="color: #0000ff;">&quot;MyActivity.javascriptCallFinished is called : &quot;</span> <span style="color: #339933;">+</span> val<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>&#8230; however this would not give a good result when you write a real app because you often put the value back to UI which need to be run in the main thread!</p>
<p>So use a runOnUiThread (such a nice name). If you need to pass something, you must add final keyword, which allows the variable to be used inline Runnable class.</p>
<p>Finally, the &#8220;Finished&#8221; function will be look like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> javascriptCallFinished<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>,<span style="color: #0000ff;">&quot;MyActivity.javascriptCallFinished is called : &quot;</span> <span style="color: #339933;">+</span> val<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// I need to run set operation of UI on the main thread.</span>
    <span style="color: #666666; font-style: italic;">// therefore, the above parameter &quot;val&quot; must be final</span>
    runOnUiThread<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            myResult.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Callback got val: &quot;</span> <span style="color: #339933;">+</span> val<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>Below is the diagram how it goes from Java to JavaScript and from JavaScript to Java.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/03/AndroidJavaScriptBridgeDrawing2.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2012/03/AndroidJavaScriptBridgeDrawing2-550x412.png" alt="" title="AndroidJavaScriptBridgeDrawing2" width="550" height="412" class="alignnone size-large wp-image-2535" /></a><br />
That&#8217;s it! This could be confusing in the first look, so please download the sample code. The project is created with IntelliJ and this is 100 times better IDE than eclipse.</p>
<h4>Download</h4>
<p><a href="https://github.com/kiichi/AndroidJavasScript">https://github.com/kiichi/AndroidJavasScript</a></p>
<h4>Demo</h4>
<p><iframe src="http://player.vimeo.com/video/38637562?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<h4>Reference</h4>
<p>Most of information were published on those documentation pages:</p>
<p>http://developer.android.com/guide/webapps/webview.html</p>
<p>http://developer.android.com/resources/articles/using-webviews.html</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/03/16/android-development-javascript-bridge-example-fully-explained/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Rectangles Puzzle App For Android Released</title>
		<link>http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 03:54:06 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[irectangles]]></category>
		<category><![CDATA[puzzle]]></category>
		<category><![CDATA[puzzle game]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2473</guid>
		<description><![CDATA[We launch  Rectangles App for Android.]]></description>
			<content:encoded><![CDATA[<p>You might have read my previous <a href="http://blog.objectgraph.com/index.php/2011/12/30/intellij-android-like/" title="Article">article</a> about IntelliJ helping me get me back in Android development, Here is the output of that initiative.</p>
<p>I am pleased to announce Android version of our popular iRectangles puzzle for iOS. </p>
<p>You can download it <a href="https://market.android.com/details?id=com.objectgraph.rectangles">here</a> for Free.</p>
<p><a href="https://market.android.com/details?id=com.objectgraph.rectangles"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/android-market-icon.gif"></a></p>
<p>For people who might not know.. Rectangles is the next generation of puzzle game from the same inventor of Sudoku!<br />
The objective of the game is to create rectangles that fill the entire board. Each of the rectangle should correspond to the number of cells posted.<br />
You can select the cells to create a rectangle by simply dragging your finger on the board. To deselect just double tap on the selected cells.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/02/Feature.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Feature-550x268.png" alt="" title="Feature" width="550" height="268" class="alignnone size-large wp-image-2474" /></a></p>
<p>Video</p>
<p><iframe width="640" height="480" src="http://www.youtube.com/embed/dtTBxuwoaaU" frameborder="0" allowfullscreen></iframe><br />
<a href="https://market.android.com/details?id=com.objectgraph.rectangles"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/android-market-icon.gif"></a></p>
<p>Additional Screenshots</p>
<p><a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/feature/' title='Feature'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Feature-150x150.png" class="attachment-thumbnail" alt="Feature" title="Feature" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/large_icon_114x114/' title='large_icon_114x114'><img width="114" height="114" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/large_icon_114x114.png" class="attachment-thumbnail" alt="large_icon_114x114" title="large_icon_114x114" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-15-55/' title='Screenshot_2012-02-27-19-15-55'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-15-55-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-15-55" title="Screenshot_2012-02-27-19-15-55" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-15-59/' title='Screenshot_2012-02-27-19-15-59'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-15-59-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-15-59" title="Screenshot_2012-02-27-19-15-59" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-11-08/' title='Screenshot_2012-02-27-19-11-08'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-11-08-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-11-08" title="Screenshot_2012-02-27-19-11-08" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-03-18/' title='Screenshot_2012-02-27-19-03-18'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-03-18-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-03-18" title="Screenshot_2012-02-27-19-03-18" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-03-22/' title='Screenshot_2012-02-27-19-03-22'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-03-22-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-03-22" title="Screenshot_2012-02-27-19-03-22" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-03-47/' title='Screenshot_2012-02-27-19-03-47'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-03-47-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-03-47" title="Screenshot_2012-02-27-19-03-47" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-04-00/' title='Screenshot_2012-02-27-19-04-00'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-04-00-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-04-00" title="Screenshot_2012-02-27-19-04-00" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-07-58/' title='Screenshot_2012-02-27-19-07-58'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-07-58-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-07-58" title="Screenshot_2012-02-27-19-07-58" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-08-04/' title='Screenshot_2012-02-27-19-08-04'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-08-04-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-08-04" title="Screenshot_2012-02-27-19-08-04" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-08-11/' title='Screenshot_2012-02-27-19-08-11'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-08-11-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-08-11" title="Screenshot_2012-02-27-19-08-11" /></a><br />
<a href='http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/screenshot_2012-02-27-19-08-16/' title='Screenshot_2012-02-27-19-08-16'><img width="150" height="150" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screenshot_2012-02-27-19-08-16-150x150.png" class="attachment-thumbnail" alt="Screenshot_2012-02-27-19-08-16" title="Screenshot_2012-02-27-19-08-16" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/02/28/rectangles-puzzle-app-for-android-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Review] WiPry &#8211; Mesure WiFi Signals (iPhone Accessory)</title>
		<link>http://blog.objectgraph.com/index.php/2012/02/20/review-wipry-mesure-wifi-signals-iphone-accessory/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/02/20/review-wipry-mesure-wifi-signals-iphone-accessory/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 01:17:46 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[802.11]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iOS5]]></category>
		<category><![CDATA[private framework]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wifimanager]]></category>
		<category><![CDATA[wipry]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2406</guid>
		<description><![CDATA[Have you ever wonder how the WiFi signals look like? I would like to introduce WiPry, which is a neat iPhone accessory and it allows users to visualize various WiFi channels around you. The device costs only $99 and the installation process is extremely simple. Hook up the little black antenna into your iPhone, then [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wonder how the WiFi signals look like? I would like to introduce <a href="http://www.oscium.com/products/wipry-spectrum-spectrum-analyzer">WiPry</a>, which is a neat iPhone accessory and it allows users to visualize various WiFi channels around you.</p>
<p><img class="alignnone size-medium wp-image-2450" title="Screen Shot 2012-02-06 at 11.08.27 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.08.27-AM-300x224.png" alt="" width="300" height="224" /></p>
<p>The device costs only $99 and the installation process is extremely simple. Hook up the little black antenna into your iPhone, then wait for 1 second for LED on. If you did not install Free WiPry app before, it will automatically ask you to download  the app for you.</p>
<p>&nbsp;</p>
<p><img class="alignnone size-medium wp-image-2451" title="Screen Shot 2012-02-06 at 11.08.35 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.08.35-AM-219x300.png" alt="" width="219" height="300" /></p>
<p>&nbsp;</p>
<p><img class="alignnone size-medium wp-image-2452" title="Screen Shot 2012-02-06 at 11.08.41 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.08.41-AM-220x300.png" alt="" width="220" height="300" /></p>
<p>&nbsp;</p>
<p><img class="alignnone size-medium wp-image-2453" title="Screen Shot 2012-02-06 at 11.08.48 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.08.48-AM-300x190.png" alt="" width="300" height="190" /></p>
<p>The main screen looks like a heat map, which active channels are represented as red-yellow spikes. Press the icon to toggle different channels and use your finger to drag across all channels. For example, if you are operating your WiFi router on channel 6, scrub the frame to the middle of screen. You will see some &#8220;hot area&#8221; within the range.</p>
<p><img class="alignnone size-medium wp-image-2454" title="Screen Shot 2012-02-06 at 11.08.57 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.08.57-AM-300x199.png" alt="" width="300" height="199" /></p>
<p>This is the example of channel 1 signals in my work environment.</p>
<p><img class="alignnone size-medium wp-image-2455" title="Screen Shot 2012-02-06 at 11.09.10 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.09.10-AM-300x196.png" alt="" width="300" height="196" /></p>
<p>Other channels like 10 or 11 dominates in this screenshot.</p>
<p><img class="alignnone size-medium wp-image-2456" title="Screen Shot 2012-02-06 at 11.09.17 AM" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-06-at-11.09.17-AM-300x199.png" alt="" width="300" height="199" /></p>
<p>Select your channels to investigate.</p>
<p>&nbsp;</p>
<p>The reason that I started looking for WiFi signal scanners is because iOS5 completely hide the <strong>Apples 802.11 WiFi manager</strong> framework, even it&#8217;s for private API usage. Our academic project, <a href="http://geo.objectgraph.com/2011/10/27/wifi-mapping-project-with-ipad-at-long-island-university/">WiFi Mapping</a>, used to use the functionality but it&#8217;s not available anymore. I start exploring different data collecting methods outside of iOS native, such as accessories, Android or Windows Phone.</p>
<p>As far as I see the current version of WiPry, I could not find SSID information along the signal strength. This could be the same restriction from Apple for those semiconductor companies (just like I experienced in above example&#8230;). Basically, Apple is not happy to give features that developers or manufactures are able to build a WiFi scanner app / device.</p>
<p>WiPry could be useful to analyze conflicted channels for network engineer; however, I could not use it for my WiFi mapper app due to lack of SSID information. I show this to folks in our network team and they show me some interests to purchase this device. The response on the screen is real-time and the user is expected to have some kind of special knowledge about WiFi. I would like to hear from real network engineers&#8217; opinion. Please leave comments if you have any thoughts.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/02/20/review-wipry-mesure-wifi-signals-iphone-accessory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Review] Printer Server for iPad / iPhone &#8211; Lantronix</title>
		<link>http://blog.objectgraph.com/index.php/2012/02/07/review-printer-server-for-ipad-iphone-lantronix/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/02/07/review-printer-server-for-ipad-iphone-lantronix/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 12:35:14 +0000</pubDate>
		<dc:creator>soe</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[air print]]></category>
		<category><![CDATA[lantronix]]></category>
		<category><![CDATA[print server]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2395</guid>
		<description><![CDATA[Today I&#8217;d like to introduce a very easy to use device which connect the gap between network printers and iOS devices. Lantronix xPrintServer is a device that can easily convert all your network printers into wifi enable air printers. Let&#8217;s open the box: Lantronix xPrintServer &#160; Size: LxWxH 4.50&#8243; x 2.37&#8243; x .87&#8243;, Weight:.27 Kg/0.6 [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;d like to introduce a very easy to use device which connect the gap between network printers and iOS devices. Lantronix xPrintServer is a device that can easily convert all your network printers into wifi enable air printers.<br />
Let&#8217;s open the box:</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073421.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073421.jpg" alt="20120207-073421.jpg" /></a><br />
<strong>Lantronix xPrintServer</strong></p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073430.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073430.jpg" alt="20120207-073430.jpg" /></a><br />
<strong>Size: LxWxH 4.50&#8243; x 2.37&#8243; x .87&#8243;, </strong></p>
<p><strong>Weight:.27 Kg/0.6 pounds </strong><strong>(xPrintServer device + power supply)</strong></p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073437.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073437.jpg" alt="20120207-073437.jpg" /></a><br />
<strong>Ethernet and power connections</strong></p>
<p>&nbsp;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073443.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/20120207-073443.jpg" alt="20120207-073443.jpg" /></a><br />
<strong>Power Adapter</strong></p>
<p>&nbsp;</p>
<p>Set up is very simple and straight forward. There&#8217;s no need to download any software or driver. You just need to connect the device to your network (router, switch, etc.) by using ethernet cable. The device will automatically discover all your network printers. Now all you need to do is connect your iPhone or iPad to the network via wifi, select the printer and print the documents.</p>
<ul>
<li><strong>Connect Lantronix xPrintServer to your network and power adapter</strong></li>
<li><strong>Open your idevices to the same network via wifi</strong></li>
<li><strong>Choose what you want to print, select print and select your printer</strong></li>
</ul>
<p><a href="http://blog.objectgraph.com/index.php/2012/02/07/review-printer-server-for-ipad-iphone-lantronix/xprinterserver_printerselection/" rel="attachment wp-att-2438"><img class="alignnone size-medium wp-image-2438" title="xprinterserver_printerselection" src="http://blog.objectgraph.com/wp-content/uploads/2012/02/xprinterserver_printerselection-300x279.png" alt="" width="300" height="279" /></a></p>
<p>&nbsp;</p>
<p>You can get more details at their website: <a href="http://www.lantronix.com/it-management/mobile-print-servers/xprintserver.html">lantronix.com</a></p>
<p>You can grab one for $149.95 <a href="http://store.lantronix.com/product_p/xps1001ne-01.htm">Here</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/02/07/review-printer-server-for-ipad-iphone-lantronix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geo Measure Now Available In Japanese</title>
		<link>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 01:32:47 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[Geo]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[area distance measurement]]></category>
		<category><![CDATA[geomeasure]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2383</guid>
		<description><![CDATA[I am happy to report the availability of a new version of Geo Measure localized for Japanese language. We hope to release other languages based on demand. We also added a new measure for area (Tsubo) Here are some screenshots from Japanese version: Also the iPad version has also been localized for Japan Download the [...]]]></description>
			<content:encoded><![CDATA[<p>I am happy to report the availability of a new version of Geo Measure localized for Japanese language. We hope to release other languages based on demand.</p>
<p>We also added a new measure for area (<a href="http://en.wikipedia.org/wiki/Japanese_units_of_measurement#Area">Tsubo</a>)</p>
<p>Here are some screenshots from Japanese version:</p>
<table>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss1.png" alt="" title="ss1" width="180" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss2.png" alt="" title="ss1" width="180" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss3.png" alt="" title="ss1" width="180" />
</td>
</tr>
</table>
<p>Also the iPad version has also been localized for Japan</p>
<p>Download the Version 1.1 from the app store.</p>
<p><a href="http://itunes.apple.com/us/app/geo-measure-map-area-distance/id451326903?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android Development: How to use sqlite in Android</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 00:47:43 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[execSQL]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2368</guid>
		<description><![CDATA[One of nice part of Android is sqlite data access is very simple. You don't worry about the path to the sqlite database file and there are a couple of functions to make your file easier.]]></description>
			<content:encoded><![CDATA[<p>One of nice part of Android is sqlite data access is very simple. You don&#8217;t worry about the path to the sqlite database file and there are a couple of functions to make your file easier.</p>
<p><strong>Creating DB</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">SQLiteDatabase db <span style="color: #339933;">=</span> openOrCreateDatabase<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mydb&quot;</span>,MODE_PRIVATE,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>This is a neat function which does open and create at the same time. You need to name your database (e.g. &#8220;mydb&#8221;) and specify the mode to open. In this example, I&#8217;m opening the database as private mode that allows only your app to touch the file.</p>
<p><strong>Execute SQL</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CREATE TABLE IF NOT EXISTS mydata (first_name,last_name,age)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO mydata (first_name,last_name,age) VALUES('Jon','Doe',20)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Since it&#8217;s already opened, executing CRUID operation is available via execSQL function.</p>
<p><strong>Query data</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> db.<span style="color: #006633;">rawQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM mydata ORDER BY age&quot;</span>,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">moveToFirst</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #009900;">&#123;</span>
       Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>, cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">moveToNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>To query data, you need two steps:</p>
<p>1. Create a cursor from the result of your select statement<br />
2. Move the cursor and retrieve data via get&#8230; functions. </p>
<p>I often make a mistake to retrieve data from the cursor without calling <strong>moveToFirst() </strong>function. Let&#8217;s call it first and this returns if there is a row to return or not. After moving to the first row, keep calling <strong>moveToNext()</strong> function until you reach the end of rows.</p>
<p><strong>Closing</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">cursor.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
db.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Let&#8217;s make sure to close all connection to db. Avoid unnecessary memory usage.</p>
<p>That&#8217;s it. If you want to see a sample project (created by IntelliJ), please click <a href="https://github.com/kiichi/AndroidSQLiteTest/">here</a>. You can browse the entire source code from <a href="https://github.com/kiichi/AndroidSQLiteTest/blob/master/src/com/objectgraph/MyActivity.java">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Chinese New Year. iPhone Feng Shui Updated for Year of the Dragon &#8211; 2012!</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 08:20:28 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[FengShui]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[chinese astrology]]></category>
		<category><![CDATA[Chinese New Year]]></category>
		<category><![CDATA[feng shui]]></category>
		<category><![CDATA[fengshui]]></category>
		<category><![CDATA[year of the dragon]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2344</guid>
		<description><![CDATA[Happy New Year! Check your forecast with our updated FengShui app 2012 Edition. Year of the Dragon Gong Yi Fa Cai 恭喜發財! In 2012, the Chinese New Year falls on January 23rd in China, which occurs before the official solar start of the year on February 4th, known as Li Chun 立春 or Spring Begins. [...]]]></description>
			<content:encoded><![CDATA[<p>Happy New Year!</p>
<p>Check your forecast with our updated FengShui app 2012 Edition. </p>
<p><a href="http://itunes.apple.com/us/app/feng-shui-chinese-astrology/id418671201?mt=8" target="_blank"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
<p>Year of the Dragon</p>
<p>Gong Yi Fa Cai 恭喜發財! In 2012, the Chinese New Year falls on January 23rd in<br />
China, which occurs before the official solar start of the year on February 4th, known as Li Chun 立春 or Spring Begins. It is a powerful and dangerous year that starts fluidly; be sure to act smart and move fast. The calendar of this year is very complicated because the first new moon after the Winter Solstice on December 21, 2011 is December 23, 2012, followed by the second new moon and start of the lunar New Year, January 23, 2012 (January 22nd<br />
in Asia). This tight start indicates a “whipping” effect that will bring about strong winds and discontent. Be sure to leave the front door of your home open this evening, especially if it is facing in a beneficial direction, so that you can gather good fortune throughout the night. It is an important year to use Feng Shui, as there will be very dangerous periods during the year for which it will feel as if you are fighting for your life to survive.</p>
<p>Screenshots:</p>
<table>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_1.png" alt="sc1" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_2.png" alt="sc1" title="sc1" width="200" class="alignnone size-full wp-image-1739" />
</td>
</tr>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_3.png" alt="sc3" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_4.png" alt="sc4" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
</tr>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_6.png" alt="sc5" title="sc1" width="200" class="alignnone size-full wp-image-1739" />
</td>
<td>
&nbsp;
</td>
</tr>
</table>
<p>You will download now!</p>
<p><a href="http://itunes.apple.com/us/app/feng-shui-chinese-astrology/id418671201?mt=8" target="_blank"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MoPic is our new app that creates GIF animations</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 03:03:12 +0000</pubDate>
		<dc:creator>serge</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[motion]]></category>
		<category><![CDATA[movie]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2312</guid>
		<description><![CDATA[We just finished our new app for camera enabled iDevices. We called it MoPic. MoPic is a free app that makes it easy to create fun GIFs and share them with your friends. Create a hilarious GIF animation of your cat in the washing machine, a donut disappearing in the mouth of your buddy as [...]]]></description>
			<content:encoded><![CDATA[<p>We just finished our new app for camera enabled iDevices.</p>
<p>We called it MoPic.</p>
<p>MoPic is a free app that makes it easy to create fun GIFs and share them with your friends.</p>
<p>Create a hilarious GIF animation of your cat in the washing machine, a donut disappearing in the mouth of your buddy as it’s being eaten, or anything else that comes to your mind. The possibilities are endless. Animations created with MoPic can easily be shared with your family and friends. Make them laugh endlessly as these GIFs replay these funny moments over and over again.</p>
<p><a href="http://itunes.apple.com/us/app/mopic-video-animation-gif/id492113893?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png"></a>.</p>
<p>How it works:<br />
1. Tap on “Take a Video” or “Choose from Library” buttons to select your video or single frames.<br />
2. Tap on “Done” to generate a preview of the GIF and adjust the speed<br />
3. Share it with your friends over Email, Twitter or Save it for later. (More options in upcoming updates)</p>
<p>Features:<br />
✓ Generate random GIFs based on the video you provide<br />
✓ Select frames you would like to use in your GIF animation<br />
✓ Share it with your friends.<br />
✓ Works only with 30 FPS at the moment.</p>
<table>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss1-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss2-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
</tr>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss3-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss4-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
</tr>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss5-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td></td>
</tr>
</table>
<p>Compatible Hardware: iPhone 3GS, iPhone 4, 4th gen iPod Touch, iPad 2 (in 2x mode only)<br />
Compatible OS: iOS 4.1 and greater.</p>
<p>Please write us and feel free to give us your feedback or request new features that you would like to see in future updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
