<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-689079166786960591</id><updated>2024-09-14T18:38:42.182+02:00</updated><category term="iPad"/><category term="iPhone"/><category term="Os X"/><category term="screenshots"/><category term="Android"/><category term="Objective-C"/><category term="App Store"/><category term="Services"/><category term="cocoa"/><category term="xml"/><title type='text'>Escogitare</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-5133483766202175545</id><published>2012-06-07T11:54:00.000+02:00</published><updated>2015-05-09T16:01:35.555+02:00</updated><title type='text'>Blog moved</title><content type='html'>The new blog address is: &lt;a href=&quot;http://escogitare.com/&quot;&gt;http://escogitare.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/5133483766202175545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2012/06/blog-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/5133483766202175545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/5133483766202175545'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2012/06/blog-moved.html' title='Blog moved'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-3051595837563353652</id><published>2011-10-03T21:05:00.000+02:00</published><updated>2011-10-03T21:16:44.316+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Os X"/><title type='text'>Icons on iOS and OS X</title><content type='html'>Sometime I need some small table to resume quickly the artwork required for the iOS and OsX applications. They are often the same image, but in different resolutions. Here they are:
&lt;br /&gt;
&lt;h3&gt;





OsX&lt;/h3&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;br /&gt;&lt;/th&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;Resolution&lt;/th&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;Notes&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Icons&lt;/th&gt;&lt;td&gt;1024 x 1024 pixels&lt;br /&gt;
512 x 512 pixels&lt;br /&gt;
256 x 256 pixels&lt;br /&gt;
128 x 128 pixels&lt;br /&gt;
32 x 32 pixels&lt;br /&gt;
16 x 16 pixels&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Toolbar icons&lt;br /&gt;
(inside control)&lt;/th&gt;&lt;td&gt;19 x 19 pixels&lt;/td&gt;&lt;td&gt;Outline style, recommanded to be black&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Toolbar icon buttons&lt;/th&gt;&lt;td&gt;32 x 32 pixels&lt;/td&gt;&lt;td&gt;Color with antialiasing&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Sidebar icons&lt;/th&gt;&lt;td&gt;16 x 16 pixels&lt;br /&gt;
18 x 18 pixels&lt;br /&gt;
32 x 32 pixels&lt;/td&gt;&lt;td&gt;Black and white with alpha, all three resolutions required&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
More information for Os X here: 
&lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/IconsImages/IconsImages.html&quot;&gt;Icon Design Guidelines&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;





iOS&lt;/h3&gt;
&lt;table border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;br /&gt;&lt;/th&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;Resolution&lt;/th&gt;&lt;th style=&quot;background-color: #cfe2f3;&quot;&gt;Notes&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Icon for iPhone&lt;/th&gt;&lt;td&gt;57 x 57 pixels&lt;/td&gt;&lt;td&gt;Suggested name: &lt;i&gt;Icon.png&lt;/i&gt;. No shadow or round corners required.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Icon for iPhone&lt;br /&gt;
with Retina Display&lt;/th&gt;&lt;td&gt;114 x 114 pixels&lt;/td&gt;&lt;td&gt;Suggested name: &lt;i&gt;Icon@2x.png&lt;/i&gt;. No shadow or round corners required.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Icon for iPad&lt;/th&gt;&lt;td&gt;72 x 72 pixels&lt;/td&gt;&lt;td&gt;Suggested name: &lt;i&gt;Icon-72.png&lt;/i&gt;. No shadow or round corners required.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Small icons iPhone&lt;br /&gt;
(Spotlight and settings)&lt;/th&gt;&lt;td&gt;29 x 29 pixels&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Small icons iPhone&lt;br /&gt;
High Resolution&lt;br /&gt;
(Spotlight and settings)&lt;/th&gt;&lt;td&gt;58 x 58 pixels &lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Small icons iPad&lt;br /&gt;
(Spotlight)&lt;/th&gt;&lt;td&gt;50 x 50 pixels&lt;/td&gt;&lt;td&gt;It trims the side pixels (safe area 48x48)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Small icons iPhone&lt;br /&gt;
(settings)&lt;/th&gt;&lt;td&gt;29 x 29 pixels &lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Toolbar icons for iPhone&lt;/th&gt;&lt;td&gt;20 x 20 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Toolbar icons for iPhone&lt;br /&gt;
High Resolution&lt;/th&gt;&lt;td&gt;40 x 40 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Toolbar icons iPad&lt;/th&gt;&lt;td&gt;20 x 20 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Tab bar icons iPhone&lt;/th&gt;&lt;td&gt;30 x 30 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Tab bar icons iPhone&lt;br /&gt;
High resolution&lt;/th&gt;&lt;td&gt;60 x 60 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #fff2cc;&quot;&gt;Tab bar icons iPad&lt;/th&gt;&lt;td&gt;30 x 30 pixels&lt;/td&gt;&lt;td&gt;Approximately&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
More information for iOS here: &lt;a href=&quot;http://developer.apple.com/library/IOS/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html&quot;&gt;Custom Icon and Image Creation Guidelines&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Open source/free toolbar icon sets&lt;/h3&gt;
Some link to free/open source iPhone toolbar icon set:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.twg.ca/2010/11/retina-display-icon-set/&quot;&gt;TWG Retina Icons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.pixelpressicons.com/?p=108&quot;&gt;PP Free iPhone Toolbar Icons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://glyphish.com/&quot;&gt;Glyphish&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/3051595837563353652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/10/icons-on-ios-and-os-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/3051595837563353652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/3051595837563353652'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/10/icons-on-ios-and-os-x.html' title='Icons on iOS and OS X'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-2359755111073673230</id><published>2011-09-27T21:28:00.001+02:00</published><updated>2011-09-27T22:27:48.350+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="screenshots"/><title type='text'>How to take a screenshot with the Android SDK</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQrc6VgtEfqYTUa5Lu2kz6fbixATxxwLmLb8fD5ZUsR-GtMBblgo_8z7qJAv4LDv3do9paUJjwjONd_HmScC4uW0QWalAd06BEupHa-e_S-Y_5tLXqXE2XSIlo9bk02XS1RuP69AHK0Q/s1600/device-2011-09-27-152428.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQrc6VgtEfqYTUa5Lu2kz6fbixATxxwLmLb8fD5ZUsR-GtMBblgo_8z7qJAv4LDv3do9paUJjwjONd_HmScC4uW0QWalAd06BEupHa-e_S-Y_5tLXqXE2XSIlo9bk02XS1RuP69AHK0Q/s320/device-2011-09-27-152428.png&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;You can take a screenshot in Android using one of the several Market&#39;s application, or using &quot;&lt;b&gt;ddms&lt;/b&gt;&quot;, a tool you can find in the &lt;i&gt;tools&lt;/i&gt; directory of the sdk.&lt;br /&gt;
&lt;br /&gt;
So, go to that directory and start it:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;cd [sdkdir]/tools &lt;br /&gt;
./ddms&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Then go on the &lt;i&gt;Device&lt;/i&gt; menu ant click on &lt;i&gt;Screen capture&lt;/i&gt;. Then save the image file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to take a screenshot from &lt;a href=&quot;http://www.eclipse.org/&quot;&gt;Eclipse&lt;/a&gt;, it is even simpler.&lt;br /&gt;
Just set the &lt;b&gt;DDMS&lt;/b&gt; perspective:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEy6pWQwIqsuCAd9E87-aX2hTnkBLKfSKaHYITtbdD6rLK__hfj2luzSyuujNbwxG2VUgZRYV-PsqL-zVJIgt3wORTtYDOSoH47iw58REE1Creb5BUSsU4BClhv8KK4h8H9dMWkIjcmA/s1600/Schermata+2011-09-27+a+16.17.18.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEy6pWQwIqsuCAd9E87-aX2hTnkBLKfSKaHYITtbdD6rLK__hfj2luzSyuujNbwxG2VUgZRYV-PsqL-zVJIgt3wORTtYDOSoH47iw58REE1Creb5BUSsU4BClhv8KK4h8H9dMWkIjcmA/s320/Schermata+2011-09-27+a+16.17.18.png&quot; width=&quot;308&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Look for the camera button, and click on it to show the following menu:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7k4pIZChsyV-CVNDI7YRQlgLr0a0sB9T9I8ABBCwffrviZ5IZQr03pI4bTg905rUmUckulVekbqZuDkP12ALQ-qyC7aojryclVIeLP3wZL9RfWUt7shjBzbsnCB8jE6xUgWjWx-tzqQ/s1600/Schermata+2011-09-27+a+16.17.36.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7k4pIZChsyV-CVNDI7YRQlgLr0a0sB9T9I8ABBCwffrviZ5IZQr03pI4bTg905rUmUckulVekbqZuDkP12ALQ-qyC7aojryclVIeLP3wZL9RfWUt7shjBzbsnCB8jE6xUgWjWx-tzqQ/s1600/Schermata+2011-09-27+a+16.17.36.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you can find the &quot;Screen Capture&quot; command.&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;goog_1385162234&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1385162235&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/2359755111073673230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/09/how-to-take-screenshot-with-android-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/2359755111073673230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/2359755111073673230'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/09/how-to-take-screenshot-with-android-sdk.html' title='How to take a screenshot with the Android SDK'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQrc6VgtEfqYTUa5Lu2kz6fbixATxxwLmLb8fD5ZUsR-GtMBblgo_8z7qJAv4LDv3do9paUJjwjONd_HmScC4uW0QWalAd06BEupHa-e_S-Y_5tLXqXE2XSIlo9bk02XS1RuP69AHK0Q/s72-c/device-2011-09-27-152428.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-1248485305337377611</id><published>2011-09-19T20:01:00.000+02:00</published><updated>2011-09-20T22:21:35.505+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>How to check if our app is running on an iPad or iPhon</title><content type='html'>The easiest way is using the &lt;code&gt;UI_USER_INTERFACE_IDIOM&lt;/code&gt; macro. Only SDKs 3.2 an later support it. Here an example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) 
{
  NSLog(@&quot;I&#39;m on iPad&quot;);
}&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
In the same way:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone) {
  NSLog(@&quot;I&#39;m on iPhone or on an iPod touch&quot;); 
}&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The macro uses the &lt;code&gt;[[UIDevice currentDevice] userInterfaceIdiom]&lt;/code&gt; method. If you are sure that your SDK supports the userInterfaceIdiom selector, you can also use something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;typ&quot;&gt;[[UIDevice currentDevice] userInterfaceIdiom]==UIUserInterfaceIdiomPad&lt;/span&gt;&lt;/code&gt;

</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/1248485305337377611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/09/how-to-check-if-our-app-is-running-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/1248485305337377611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/1248485305337377611'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/09/how-to-check-if-our-app-is-running-on.html' title='How to check if our app is running on an iPad or iPhon'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-4348426676450869597</id><published>2011-09-08T18:58:00.002+02:00</published><updated>2011-09-08T18:59:54.519+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Services"/><title type='text'>Android&#39;s services</title><content type='html'>Android uses &lt;a href=&quot;http://developer.android.com/guide/topics/fundamentals/services.html&quot;&gt;services&lt;/a&gt; to perform long running jobs, or background tasks (think to a network interaction or an mp3 player). How can we start a service?&lt;br /&gt;
&lt;br /&gt;
We should begin extending the &lt;a href=&quot;http://developer.android.com/reference/android/app/Service.html&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;android.app.Service&lt;/span&gt;&lt;/a&gt; class:&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
@font-face
	{font-family:&quot;ＭＳ 明朝&quot;;
	mso-font-charset:78;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
	{font-family:&quot;ＭＳ 明朝&quot;;
	mso-font-charset:78;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:-536870145 1073743103 0 0 415 0;}
@font-face
	{font-family:Monaco;
	panose-1:2 0 5 0 0 0 0 0 0 0;
	mso-font-charset:0;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 0 0 0 1 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:Cambria;
	mso-ascii-font-family:Cambria;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:&quot;ＭＳ 明朝&quot;;
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Cambria;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-ansi-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-family:Cambria;
	mso-ascii-font-family:Cambria;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:&quot;ＭＳ 明朝&quot;;
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Cambria;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;}
@page WordSection1
	{size:595.0pt 842.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.WordSection1
	{page:WordSection1;}
--&gt;
&lt;/style&gt;






&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; TestService &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; Service {&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #646464; font-family: Monaco;&quot;&gt;@Override&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; IBinder
onBind(Intent arg0) {&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;null&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; onCreate () {&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Log.&lt;i&gt;i&lt;/i&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;onCreate&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;, &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;onCreate&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #646464; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;
onStartCommand(Intent intent, &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; flags, &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; startId) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.&lt;i&gt;i&lt;/i&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;onStartCommand&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;, &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;onStartCommand&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;



&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Toast.&lt;i&gt;makeText&lt;/i&gt;(&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;, &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #2a00ff; font-family: Monaco;&quot;&gt;&quot;Hi, this is a service!&quot;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Toast.&lt;/span&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #0000c0; font-family: Monaco;&quot;&gt;LENGTH_LONG&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;).show();&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #0000c0; font-family: Monaco;&quot;&gt;START_STICKY&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco; font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The two most important methods, for the purposes
of this post, are &lt;i&gt;onCreate&lt;/i&gt; and &lt;i&gt;onStartCommand&lt;/i&gt;. Android invokes the first, when
the service is created, and the second one, when it is executed. The
&lt;i&gt;Toast.makeText(…)&lt;/i&gt; command is a nice way to give notifications to the users.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Please note that the &lt;i&gt;onStartCommand&lt;/i&gt;
callback exists only in the versions &lt;b&gt;2.0 and later&lt;/b&gt;. In older versions you should
override the onStart method (now deprecated).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Once you have you service’s skeleton, you
can register with the operating system, adding a line to the manifest:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco; font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: teal; font-family: Monaco;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #3f7f7f; font-family: Monaco;&quot;&gt;service&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:name&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;TestService&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: #7f007f;&quot;&gt;android:enabled&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;/i&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;span style=&quot;color: #3f7f7f;&quot;&gt;service&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Or in a easier way, using the Eclipse interface:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUeNpZ7Tc4xLLpyofycDNUozpMoMAUboYWZtMvnJ1souzZC6DMzY1rJ7jZcw0fRzc57V9e2Uwf1cdfdjRQYC509UUm7x8cPLQNCe16S-2LoaGxmPw6mPIh5juvoczcpGzXJdB3jBW0Gg/s1600/Schermata+2011-09-08+a+12.46.41.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUeNpZ7Tc4xLLpyofycDNUozpMoMAUboYWZtMvnJ1souzZC6DMzY1rJ7jZcw0fRzc57V9e2Uwf1cdfdjRQYC509UUm7x8cPLQNCe16S-2LoaGxmPw6mPIh5juvoczcpGzXJdB3jBW0Gg/s320/Schermata+2011-09-08+a+12.46.41.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;At the end is time to start our service,
using two instructions:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;Intent intent = &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; Intent(&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;, TestService.&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;);&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startService(intent);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We create an&lt;a href=&quot;http://developer.android.com/reference/android/content/Intent.html&quot;&gt;&lt;span style=&quot;background: none repeat scroll 0% 0% silver;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt; &lt;a href=&quot;http://developer.android.com/reference/android/content/Intent.html&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;android.content.Intent&lt;/span&gt;&lt;/a&gt; instance, and then we use
it in the startService method. The Intent, ask you for a context (your calling
Activity is fine), and the implementation class. He will take care of the
instantiation. The startService will call your onStartCommand procedure, passing
it also the intent instance. A nice place to do it could be in the onClick
method:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; onClick(View v) {&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;switch&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; (v.getId()) {&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; R.id.&lt;/span&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #0000c0; font-family: Monaco;&quot;&gt;buttonStart&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;:&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intent
intent = &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt; Intent(&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;, TestService.&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;);&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startService(intent);&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f0055; font-family: Monaco;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Monaco;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; font-family: Monaco;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/4348426676450869597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/09/androids-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/4348426676450869597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/4348426676450869597'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/09/androids-services.html' title='Android&#39;s services'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUeNpZ7Tc4xLLpyofycDNUozpMoMAUboYWZtMvnJ1souzZC6DMzY1rJ7jZcw0fRzc57V9e2Uwf1cdfdjRQYC509UUm7x8cPLQNCe16S-2LoaGxmPw6mPIh5juvoczcpGzXJdB3jBW0Gg/s72-c/Schermata+2011-09-08+a+12.46.41.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-1145297759353326712</id><published>2011-09-02T11:38:00.003+02:00</published><updated>2011-10-03T21:17:29.442+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="screenshots"/><title type='text'>How to take screenshots directly on the iPhones</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jUdoT2sytyspleDrT8rXJGEEnVA9vXxgYm5ZcDW8slpzOzrgsjt14fAfkemc-p-oIgnXlR83RSDwcaxso6Pfq7jA87kfv0otjf4qOOsI6zlS3r2kX6TiyNnynOfQkrponIDxCl43AA/s1600/iphone-4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jUdoT2sytyspleDrT8rXJGEEnVA9vXxgYm5ZcDW8slpzOzrgsjt14fAfkemc-p-oIgnXlR83RSDwcaxso6Pfq7jA87kfv0otjf4qOOsI6zlS3r2kX6TiyNnynOfQkrponIDxCl43AA/s1600/iphone-4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
If you want to take a screen-shot directly from your iPhone/iPod touch/iPad, and find it directly in your photo library, there is a simple procedure:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Press&lt;/b&gt; the &lt;span style=&quot;color: blue;&quot;&gt;Home button&lt;/span&gt;, &lt;b&gt;without&lt;/b&gt; releasing it;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Press and release&lt;/b&gt; the &lt;span style=&quot;color: blue;&quot;&gt;Sleep button;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Release&lt;/b&gt; the &lt;span style=&quot;color: blue;&quot;&gt;Home button&lt;/span&gt;.&lt;/li&gt;
&lt;/ol&gt;
That&#39;s all! Now go in your &lt;i&gt;camera roll&lt;/i&gt;, and enjoy the image of screen. Some more thing on screen-shots &lt;a href=&quot;http://escogitare.blogspot.com/2011/04/how-to-prepare-screenshots-for-apples.html&quot;&gt;here&lt;/a&gt;!&lt;br /&gt;
The (so called) Home and Sleep buttons are marked in red in the picture.</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/1145297759353326712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/09/more-on-screenshoting-iphones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/1145297759353326712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/1145297759353326712'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/09/more-on-screenshoting-iphones.html' title='How to take screenshots directly on the iPhones'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jUdoT2sytyspleDrT8rXJGEEnVA9vXxgYm5ZcDW8slpzOzrgsjt14fAfkemc-p-oIgnXlR83RSDwcaxso6Pfq7jA87kfv0otjf4qOOsI6zlS3r2kX6TiyNnynOfQkrponIDxCl43AA/s72-c/iphone-4.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-3551635185045849135</id><published>2011-04-20T11:50:00.001+02:00</published><updated>2011-04-20T11:52:41.143+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="Os X"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Load an XML file in Mac Os X using Cocoa: NSXMLDocument</title><content type='html'>Here another snippet on how to load an XML file using the NSXMLDocument class. Our goal is to show an “Open File” dialog box (as said in the last post), chose an xml file, and put it in a data structure (NSXMLDocument) &lt;br /&gt;
&lt;br /&gt;
Here’s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;-(BOOL) LoadXml : (NSError **)err
{
    NSURL *fileUrl = nil;
    
    NSOpenPanel* openDlg = [NSOpenPanel openPanel];
    [openDlg setCanChooseFiles:YES];
    [openDlg setCanChooseDirectories:NO];
    [openDlg setAllowsMultipleSelection: NO];
    [openDlg setAllowedFileTypes:[NSArray arrayWithObjects:@&quot;xml&quot;, 
             nil]];
    if ( [openDlg runModal] == NSOKButton )
    {
        fileUrl = [openDlg URL];
    }
    if (fileUrl==nil)
    {
        return NO;
    }
    
    xmlDoc = [[NSXMLDocument alloc] initWithContentsOfURL:fileUrl 
       options:(NSXMLNodePreserveWhitespace|NSXMLNodePreserveCDATA)
       error:err];
    if (xmlDoc == nil) {
        xmlDoc = [[NSXMLDocument alloc] initWithContentsOfURL:fileUrl
           options:NSXMLDocumentTidyXML error:&amp;err];
    }
    if (xmlDoc == nil) 
  return NO;
    
    ...
}
&lt;/pre&gt;&lt;br /&gt;
The only “strange” thing suggested by the Apple’s example and reported here, is the double initialization of NSXMLDocument, with different parameters: the first one with &lt;tt&gt;NSXMLNodePreserveWhitespace|NSXMLNodePreserveCDATA&lt;/tt&gt;, the second one with &lt;tt&gt;NSXMLDocumentTidyXML&lt;/tt&gt;.  &lt;br /&gt;
&lt;br /&gt;
We are trying to recover from parsing errors. &lt;tt&gt;NSXMLDocumentTidyXML&lt;/tt&gt; reformats the document before the parsing. Hopefully it can correct some error, but it modifies the original file (take a look at the &lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSXMLDocument_Class/Reference/Reference.html&quot;&gt;documentation&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
More information is in the “&lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSXML_Concepts/NSXML.html&quot;&gt;Introduction to Tree-Based XML Programming Guide for Cocoa&lt;/a&gt;” on the Apple Devveloper web site.</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/3551635185045849135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/04/load-xml-file-nsxmldocument.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/3551635185045849135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/3551635185045849135'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/04/load-xml-file-nsxmldocument.html' title='Load an XML file in Mac Os X using Cocoa: NSXMLDocument'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-4290657112986919946</id><published>2011-04-12T18:17:00.005+02:00</published><updated>2011-04-12T20:57:57.290+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Os X"/><title type='text'>Open a file from the Mac OSX GUI: NSOpenPanel</title><content type='html'>This is a quick snippet that presents how to show a dialog to choose a file in Mac OS X programming in Objective-C. We will use the &lt;b&gt;NSOpenPanel&lt;/b&gt;  class.&lt;br /&gt;&lt;br /&gt;Our first step is to write an IBAction routine, to answer to the user input, and link it to the interface (using XCode).&lt;br /&gt;&lt;pre&gt;-(IBAction) action_OpenFile: (id) sender&lt;br /&gt;{&lt;br /&gt;}&lt;/pre&gt;Then we can populate it instantiating the NSOpenPanel class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;NSOpenPanel* openPanel = [NSOpenPanel openPanel];&lt;/pre&gt;&lt;br /&gt;This instantiate the class using the autorelease feature, so you don’t have to release it. Now you can personalize it using the features you need. For example the lines allow the user to choose just one file and not the directories:&lt;br /&gt;&lt;pre&gt;[openPanel setCanChooseFiles:YES];&lt;br /&gt;[openPanel setCanChooseDirectories:NO];&lt;br /&gt;[openPanel setAllowsMultipleSelection: NO];&lt;/pre&gt;&lt;br /&gt;But what about the file types?&lt;br /&gt;You may want to allocate an array of NSString with the list of allowed file types, and assign it to the panel. The following lines limit the users to choose the text files (txt or doc):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;NSArray *tarr = [NSArray arrayWithObjects:@&quot;txt&quot;, @&quot;doc&quot;, nil];&lt;br /&gt;[openPanel setAllowedFileTypes:tarr ];&lt;/pre&gt;&lt;br /&gt;Now you can show the panel, check if the user pressed the OK button, and retrieve the url of the selected file:&lt;br /&gt;&lt;pre&gt;if ( [openPanel runModal] == NSOKButton ){&lt;br /&gt; fileUrl = [openPanel URL];&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Other methods &lt;span style=&quot;Courier New&amp;quot;,Courier,monospace;font-family:&amp;quot;;&quot; &gt;runModal*&lt;/span&gt; exist to show the panel, but most of them are declared deprecated in the last OSX versions.&lt;br /&gt;&lt;br /&gt;Here the final code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;-(IBAction) action_OpenFile: (id) sender&lt;br /&gt;{&lt;br /&gt; NSOpenPanel* openPanel = [NSOpenPanel openPanel];&lt;br /&gt; [openPanel setCanChooseFiles:YES];&lt;br /&gt; [openPanel setCanChooseDirectories:NO];&lt;br /&gt; [openPanel setAllowsMultipleSelection: NO];&lt;br /&gt; NSArray *tarr = [NSArray arrayWithObjects:@&quot;txt&quot;, @&quot;doc&quot;, nil];&lt;br /&gt; [openPanel setAllowedFileTypes:tarr ];&lt;br /&gt; if ( [openPanel runModal] == NSOKButton )&lt;br /&gt; {&lt;br /&gt;    fileUrl = [openPanel URL];&lt;br /&gt;    // ...&lt;br /&gt;    // Use the file&lt;br /&gt;    // ...   &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Emilio&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/4290657112986919946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/04/open-file-from-mac-osx-gui-nsopenpanel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/4290657112986919946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/4290657112986919946'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/04/open-file-from-mac-osx-gui-nsopenpanel.html' title='Open a file from the Mac OSX GUI: NSOpenPanel'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-689079166786960591.post-8180380971572313240</id><published>2011-04-07T00:45:00.005+02:00</published><updated>2011-09-27T22:28:44.745+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="App Store"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="screenshots"/><title type='text'>iPhone screenshots for the App Store</title><content type='html'>&lt;style&gt;
&lt;!-- /* Font Definitions */@font-face {font-family:&quot;ＭＳ 明朝&quot;; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:128; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:1 134676480 16 0 131072 0;}@font-face {font-family:&quot;ＭＳ 明朝&quot;; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:128; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:fixed; mso-font-signature:1 134676480 16 0 131072 0;}@font-face {font-family:Cambria; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:-536870145 1073743103 0 0 415 0;} /* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:&quot;&quot;; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:Cambria; mso-ascii-font-family:Cambria; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:&quot;ＭＳ 明朝&quot;; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:&quot;Times New Roman&quot;; mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:Cambria; mso-ascii-font-family:Cambria; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:&quot;ＭＳ 明朝&quot;; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:&quot;Times New Roman&quot;; mso-bidi-theme-font:minor-bidi;}@page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}--&gt;
&lt;/style&gt;  &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Apple suggests formatting the screenshots for iPhone and iPad with a specific resolution, and, possibly, without the status bar. If you use XCode to take the screenshots you can find that they are not exactly that way, and they are stored in png format.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Updating the screenshots could be a boring task, so why don’t you write a script taking advantage of &lt;a href=&quot;http://www.imagemagick.org/&quot;&gt;ImageMagick&lt;/a&gt; that automatically crop your images and convert them in &lt;a href=&quot;http://it.wikipedia.org/wiki/Joint_Photographic_Experts_Group&quot;&gt;jpg&lt;/a&gt;? In that way they will be ready to be posted on the App Store and on your web site.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;We want to do the &lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;following steps&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;b&gt;Crop&lt;/b&gt; the images to a specific width and height&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;b&gt;Convert&lt;/b&gt; them in &lt;b&gt;jpg&lt;/b&gt; to reduce their weight&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span lang=&quot;EN-US&quot;&gt;Prepare some &lt;b&gt;thumbnail&lt;/b&gt; for our web site&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;ImageMagick has several tools, we will just use &lt;i&gt;mogrify&lt;/i&gt;. Our first goal is to cut the status bar. If you took the screenshot from an iPhone with the Retina Display, the bar will be 40 pixels tall. On the iPad will be 20 pixels tall. For example here there is a screenshot taken from our &lt;a href=&quot;http://www.escogitare.com/sudoku&quot;&gt;Sudoku&lt;/a&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7O34x9t0jyumEtHW2YK2WF24mKGeHNZc7zC82z1SpMFAtrH706OJM1WNY3ZaGw6XGMyY-EX97L1k2FCql4JajdfcGLXC1tcV3yirhdYgjlZ_HSfL2qFBXRRfXOzFx0A78Vhd8536dg/s1600/screenshot-01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7O34x9t0jyumEtHW2YK2WF24mKGeHNZc7zC82z1SpMFAtrH706OJM1WNY3ZaGw6XGMyY-EX97L1k2FCql4JajdfcGLXC1tcV3yirhdYgjlZ_HSfL2qFBXRRfXOzFx0A78Vhd8536dg/s320/screenshot-01.jpg&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;The operation we want to apply is the “crop”. The original image’s size is 640x960 pixels on portrait Retina Displays (768x1024 on iPads). We want to take the area starting at 40 pixels from the top, with the size of 640x920 pixels. The way mogrify do this, is using the &lt;i&gt;–crop&lt;/i&gt; flag:&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;color: #cfe2f3;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;mogrify –crop 640x920+0+40 imagename.png&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;If we want contextually convert the image to the jpeg format we can add the ‘&lt;i&gt;-format&lt;/i&gt;’ flag&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;color: #cfe2f3;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;mogrify -format jpg  –crop 640x920+0+40 imagename.png&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;What about the thumbnails creation? You just need to add another flag, ‘&lt;i&gt;-thumbnail&lt;/i&gt;’ with the maximum thumbnail’s width and height&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;color: #cfe2f3;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;mogrify -format jpg  –crop  640x920+0+40 -thumbnail 120x120 imagename.png&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2qgwy7cN28ONrkAmEUJAHGjoZFuot8EkyFQsIqZrSms9lGWwRDeS_7Xi8inBD3KxQx7DD9qMTwfD-nKe00rWgHNLjhigoazTo2pT1mJTRcNI1RP4p5RHhyphenhyphen8WSv80mIhFEUkIZKwNhqA/s1600/screenshot_en-01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2qgwy7cN28ONrkAmEUJAHGjoZFuot8EkyFQsIqZrSms9lGWwRDeS_7Xi8inBD3KxQx7DD9qMTwfD-nKe00rWgHNLjhigoazTo2pT1mJTRcNI1RP4p5RHhyphenhyphen8WSv80mIhFEUkIZKwNhqA/s320/screenshot_en-01.jpg&quot; width=&quot;222&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot;&gt;For more information you can check the &lt;a href=&quot;http://www.imagemagick.org/&quot;&gt;ImageMagick Web Site (www.imagemagick.org)&lt;/a&gt;, or take a  look at their books:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;iframe class=&quot; qigexalvfnitudqmrymp rmoqamrcvgskjfdhplaj qvhpokxmdvicgrtvttss&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=FFFFFF&amp;amp;IS2=1&amp;amp;npa=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=escogitare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=qf_sp_asin_til&amp;amp;asins=1904811868&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;iframe class=&quot; qigexalvfnitudqmrymp rmoqamrcvgskjfdhplaj qvhpokxmdvicgrtvttss&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=FFFFFF&amp;amp;IS2=1&amp;amp;npa=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=escogitare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=qf_sp_asin_til&amp;amp;asins=1590595904&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Here is the complete script. It assumes that you called the screenshots with the names: screenshot_iphone_&lt;i&gt;n&lt;/i&gt;.png and screenshot_ipad_&lt;i&gt;n&lt;/i&gt;.png (where &lt;i&gt;n&lt;/i&gt; is the picture number, e.g., screenshot_iphone_1.png, screenshot_iphone_2.png, …), and it stores the thumbnails in a subdirectory.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote style=&quot;color: #cfe2f3; font-family: courier new;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;#!/bin/sh&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Installation directory of ImageMagick (if not in PATH)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;IMDIR=&#39;/ImageMagick-6.6.7/bin&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Crop flag for iPhone with Retina Display&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;CROP=&#39;-crop 640x920+0+40&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Crop flag for iPad&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;CROPIPAD=&#39;-crop 768x1004+0+20&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Thumbnails directory&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;THUMBSDIR=thumbs&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Thumbnail flag&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;THUMB=&#39;-thumbnail 120x120&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Adjust the screenshots&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;$IMDIR/mogrify -verbose -format jpg  $CROP screenshot_iphone*.png&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;$IMDIR/mogrify -verbose -format jpg  $CROPIPAD screenshot_ipad*.png&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; face=&quot;&amp;quot;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;# Make the thumbnails&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;mkdir $THUMBSDIR&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;$IMDIR/mogrify -format jpg $CROP -path $THUMBSDIR $THUMB screenshot_iphone*.png&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; face=&quot;&amp;quot;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;$IMDIR/mogrify -format jpg $CROPIPAD -path $THUMBSDIR $THUMB screenshot_ipad*.png&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://escogitare.blogspot.com/feeds/8180380971572313240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://escogitare.blogspot.com/2011/04/how-to-prepare-screenshots-for-apples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/8180380971572313240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/689079166786960591/posts/default/8180380971572313240'/><link rel='alternate' type='text/html' href='http://escogitare.blogspot.com/2011/04/how-to-prepare-screenshots-for-apples.html' title='iPhone screenshots for the App Store'/><author><name>Escogitare</name><uri>http://www.blogger.com/profile/01814121178801441679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl7O34x9t0jyumEtHW2YK2WF24mKGeHNZc7zC82z1SpMFAtrH706OJM1WNY3ZaGw6XGMyY-EX97L1k2FCql4JajdfcGLXC1tcV3yirhdYgjlZ_HSfL2qFBXRRfXOzFx0A78Vhd8536dg/s72-c/screenshot-01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>