<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Android on Opgenorth.NET</title><link>https://www.opgenorth.net/tags/Android/</link><description>Recent content in Android on Opgenorth.NET</description><generator>Hugo</generator><language>en-ca</language><lastBuildDate>Mon, 18 Feb 2013 00:00:00 +0000</lastBuildDate><atom:link href="https://www.opgenorth.net/tags/Android/index.xml" rel="self" type="application/rss+xml"/><item><title>Embed GPS in a JPEG</title><link>https://www.opgenorth.net/archives/write-gps-to-jpg/</link><pubDate>Mon, 18 Feb 2013 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/write-gps-to-jpg/</guid><description>&lt;p&gt;One of the handy things about the JPEG format is the ability to store meta-data inside the image using &lt;a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format"&gt;EXIF&lt;/a&gt;. There are a few libraries out there for the various programming languages that can help you out with this, and Android actually has something built in to the SDK - the class &lt;a href="http://developer.android.com/reference/android/media/ExifInterface.html"&gt;ExifInterface&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Google&amp;rsquo;s documentation on writing latitude and longitude to a JPEG are a bit light on details - they loosely hint at the format that latitude or longitude should have. (See the documentation for &lt;a href="http://developer.android.com/reference/android/media/ExifInterface.html#TAG_GPS_LATITUDE"&gt;ExifInterface.TAG_GPS_LATITUDE&lt;/a&gt;). The API itself is pretty straight forward, but what Google doesn&amp;rsquo;t tell you is HOW the GPS coordinates should encoded.&lt;/p&gt;</description></item><item><title>Using AutoCompleteTextView and SimpleCursorAdapter</title><link>https://www.opgenorth.net/archives/2011-09-06-using-autocompletetextview-and-simplecursoradapter-2/</link><pubDate>Tue, 06 Sep 2011 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2011-09-06-using-autocompletetextview-and-simplecursoradapter-2/</guid><description>&lt;p&gt;I have a simple little pet project (for Android), and one of the things I wanted to do was to to have a text field that would show me previous values as I typed in the text box (see screenshot below). Of course, this control is already a part of the Android SDK - it&amp;rsquo;s our good friend the &lt;a href="http://developer.android.com/reference/android/widget/AutoCompleteTextView.html"&gt;AutoCompleteTextView&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="http://www.opgenorth.net/wp-content/uploads/2011/09/AutoCompleteTextView.png" alt=""&gt;&lt;/p&gt;&#10;&lt;p&gt;To populate the drop-down, I have an SQLite table called vehicle_descriptions, which looks something like the screenshot below. What I want is for a given vehicle (a value derived from another control on my Activity) to show me the value of the description column in the table.&lt;/p&gt;</description></item><item><title>WIND Mobile and my Nexus One</title><link>https://www.opgenorth.net/archives/2010-12-20-wind-mobile-and-my-nexus-one/</link><pubDate>Mon, 20 Dec 2010 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2010-12-20-wind-mobile-and-my-nexus-one/</guid><description>&lt;p&gt;Just recently I switch my mobile carrier from Rogers to &lt;a href="../../www.windmobile.ca" title="WIND mobile"&gt;WIND Mobile&lt;/a&gt;. Their &lt;a href="http://www2.windmobile.ca/en/Pages/unlimitedtalktextdata.aspx" title="Holiday Miracle Plan"&gt;Holiday Miracle plan&lt;/a&gt; was just to good to pass up - even paying the penalty to break my Rogers contract I will still save money in the long run. Anyway, once the number got transferred over, I didn&amp;rsquo;t have a 3G connection, even after selecting the WIND Home APN.  After a bit of google, it seems that what I had to do is to setup an APN.  In case I can&amp;rsquo;t find it later, here are the APN settings:&lt;/p&gt;</description></item><item><title>Using IntelliJ for Android Development â the Sequel</title><link>https://www.opgenorth.net/archives/2010-08-24-using-intellij-for-android-development-the-sequel/</link><pubDate>Tue, 24 Aug 2010 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2010-08-24-using-intellij-for-android-development-the-sequel/</guid><description>&lt;p&gt;A while ago, I posted a blog article about &lt;a href="http://www.opgenorth.net/2009/06/19/using-intellij-for-android-development-2/"&gt;using IntelliJ for Android development&lt;/a&gt;.  Given that was a year ago, and one version of IntelliJ later, I thought I would do a follow up post.  Long story short (and to sound like a TV commercial):  I liked IntelliJ IDEA 9 so much, I bought a license.&lt;/p&gt;&#10;&lt;p&gt;Since I blogged last year, the Android plug-in for IntelliJ has really matured.  I guess the only draw back to it is that you only get the Android plug-in when you buy the Unlimited Edition of IntelliJ – it’s not in the Community Edition.  Here are some general comments/thoughts/observations of mine:&lt;/p&gt;</description></item><item><title>Getting Starting with my ADP1</title><link>https://www.opgenorth.net/archives/2009-09-15-getting-starting-with-my-adp1/</link><pubDate>Tue, 15 Sep 2009 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2009-09-15-getting-starting-with-my-adp1/</guid><description>&lt;p&gt;After a bit of tinkering, I managed to provision my ADP1 setup without a SIM card.  A bit of google, and here is what I did&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Download the Android SDK.  In my case, I unzipped it to C:\android-sdk-windows-1.1_r1.&lt;/li&gt;&#10;&lt;li&gt;Connection the phone via the USB cable to my computer.  When the phone asks for a device.&lt;/li&gt;&#10;&lt;li&gt;You’ll get the new hardware dialog, when prompted for the drivers, you’ll need to specify the location.  The Android SDK has the drivers, in my case they were at C:\android-sdk-windows-1.1_r1\usb_driver\x86.&lt;/li&gt;&#10;&lt;li&gt;Once you have the drivers installed cd to c:\android-sdk-windows-1.1_r1\tools.&lt;/li&gt;&#10;&lt;li&gt;Type adb devices.  This should list all the Android devices that you have connected.  If you don’t see any devices listed, then you have a problem.&lt;/li&gt;&#10;&lt;li&gt;Type adb shell.  This will direct your commands to your ADP1&lt;/li&gt;&#10;&lt;li&gt;Now while at the adb shell, su to root, then : &lt;/li&gt;&#10;&lt;li&gt;cd /data/data/com.android/providers.settings/databases/&lt;/li&gt;&#10;&lt;li&gt;sqlite3 settings.db&lt;/li&gt;&#10;&lt;li&gt;INSERT INTO system (name, value) VALUES (‘device_provisioned’, 1);&lt;/li&gt;&#10;&lt;li&gt;.quit&lt;/li&gt;&#10;&lt;li&gt;Reboot the phone&lt;/li&gt;&#10;&lt;li&gt;adb shell&lt;/li&gt;&#10;&lt;li&gt;am start –a android.intent.action.MAIN –n com.android.settings/.Settings&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Once all that is done, you should be enable to use your ADP1 as if you had a SIM card in it (we’ll except for the phoning part).&lt;/p&gt;</description></item><item><title>Using IntelliJ for Android Development</title><link>https://www.opgenorth.net/archives/2009-06-19-using-intellij-for-android-development-2/</link><pubDate>Fri, 19 Jun 2009 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2009-06-19-using-intellij-for-android-development-2/</guid><description>&lt;p&gt;&lt;em&gt;(Note:  this article is pretty dated, and used IntelliJ 8.&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;So I have this semi-fancy Google &lt;a href="http://developer.android.com/guide/developing/device.html"&gt;Android Dev Phone 1&lt;/a&gt;.  Lately I&amp;rsquo;ve been devoting part of my spare time to learning about programming for &lt;a href="http://www.android.com/"&gt;Android&lt;/a&gt; (the OS of the phone).  Google (probably because they didn&amp;rsquo;t ask for my opinion and/or input) decided to use Java as the lingua franca for Android programming.  If you ask me - and I know you will - they should have used C# and Mono (I might be a bit biased here).  Luckily, years ago I had done Java programming, so I wasn&amp;rsquo;t that intimidated by the use of Java on Android.&lt;/p&gt;</description></item><item><title>Getting Started Coding for my Android Dev Phone 1</title><link>https://www.opgenorth.net/archives/2009-03-26-getting-started-coding-for-my-android-dev-phone-1/</link><pubDate>Thu, 26 Mar 2009 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2009-03-26-getting-started-coding-for-my-android-dev-phone-1/</guid><description>&lt;p&gt;Figured I was due to spend some time setting up a Linux VM and learning how to program my Android Dev Phone 1.  &lt;a href="http://www.eclipse.org"&gt;Eclipse&lt;/a&gt; is what is recommended, so I thought I’d give that a try first.  So, with the help of &lt;a href="www.susestudio.com"&gt;Suse Studio&lt;/a&gt;, I quick built myself a VM with Java 1.6 (&lt;em&gt;Aside:  I love Suse Studio, I can provision a VM in minutes&lt;/em&gt;).  I figured it would be pretty straight forward.  The docs on the Android Developer site for &lt;a href="http://developer.android.com/guide/developing/tools/adt.html#installingplugin"&gt;installing ADT plug-in&lt;/a&gt; seem pretty straight forward and simple, and I remember Eclipse having a very rich ecosystem of plug-ins that were easy to install (something I wish Visual Studio had – hint, hint Microsoft).&lt;/p&gt;</description></item><item><title>Getting Started with My ADP1</title><link>https://www.opgenorth.net/archives/2009-03-14-getting-started-with-my-adp1/</link><pubDate>Sat, 14 Mar 2009 00:00:00 +0000</pubDate><guid>https://www.opgenorth.net/archives/2009-03-14-getting-started-with-my-adp1/</guid><description>&lt;p&gt;After a bit of tinkering, I managed to provision my ADP1 setup without a SIM card.  A bit of google, and here is what I did:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Download the Android SDK.  In my case, I unzipped it to C:\android-sdk-windows-1.1_r1.&lt;/li&gt;&#10;&lt;li&gt;Connection the phone via the USB cable to my computer.  When the phone asks for a device.&lt;/li&gt;&#10;&lt;li&gt;You&amp;rsquo;ll get the new hardware dialog, when prompted for the drivers, you&amp;rsquo;ll need to specify the location.  The Android SDK has the drivers, in my case they were at C:\android-sdk-windows-1.1_r1\usb_driver\x86.&lt;/li&gt;&#10;&lt;li&gt;Once you have the drivers installed cd to c:\android-sdk-windows-1.1_r1\tools.&lt;/li&gt;&#10;&lt;li&gt;Type adb devices.  This should list all the Android devices that you have connected.  If you don&amp;rsquo;t see any devices listed, then you have a problem.&lt;/li&gt;&#10;&lt;li&gt;Type adb shell.  This will direct your commands to your ADP1&lt;/li&gt;&#10;&lt;li&gt;Now while at the adb shell, su to root, then : &lt;/li&gt;&#10;&lt;li&gt;cd /data/data/com.android/providers.settings/databases/&lt;/li&gt;&#10;&lt;li&gt;sqlite3 settings.db&lt;/li&gt;&#10;&lt;li&gt;INSERT INTO system (name, value) VALUES (&amp;lsquo;device_provisioned&amp;rsquo;, 1);&lt;/li&gt;&#10;&lt;li&gt;.quit&lt;/li&gt;&#10;&lt;li&gt;Reboot the phone&lt;/li&gt;&#10;&lt;li&gt;adb shell&lt;/li&gt;&#10;&lt;li&gt;am start -a android.intent.action.MAIN -n com.android.settings/.Settings&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Once all that is done, you should be enable to use your ADP1 as if you had a SIM card in it (we&amp;rsquo;ll except for the phoning part).&lt;/p&gt;</description></item></channel></rss>