<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>a.muse: Tag android</title>
    <link>http://www.jessirae.com/blog/articles/tag/android</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Devchix Task List Android App</title>
      <description>&lt;p&gt;This post is to basically explain how the &lt;a href="http://www.devchix.com"&gt;Devchix&lt;/a&gt; to do list android app that &lt;a href="http://www.rubygeek.com"&gt;Nola&lt;/a&gt; and I have been working on works.  Currently, we are working on Iteration 1 of our &lt;a href="http://wiki.devchix.com/index.php?title=Android_Project:_Daily_ToDo_List"&gt;plan&lt;/a&gt;.  Here&amp;#8217;s how I understand what we have working so far:
In our app, users can switch between 2 activities using the menu option, &amp;#8220;Add Task&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;When our app is first opened the first activity that is rendered is the ViewTasks activity.  We first start with some setup steps&amp;#8230;. we inflate our layout, create our task database and open a connection to that database.  We create a cursor that will just represent all tasks that we have put in our database and we call the startManagingCursor method, so that we do not have to do that ourselves.&lt;/p&gt;


	&lt;p&gt;We get a ListView from our ListActivity; this ListView will be our list of tasks.
In our ViewTask activity, we have a subclass class called TaskAdapter, that will help us get data out of our cursor and into our list view.  Lastly, we set our TaskAdapter as an adapter on the ListView we just created.&lt;/p&gt;


	&lt;p&gt;When the user clicks on the menu button, we will see the two menu options whose names we grabbed out of our strings.xml.  And because we have implemented the onMenuItemSelected to detect which option the user selects, we the user selects the &lt;em&gt;Add Task&lt;/em&gt; option, our second activity will be started where users can enter the name of the task and save the task to the tasks database.&lt;/p&gt;


	&lt;p&gt;If there are already Tasks in the task database, then TaskAdapter will inflate a new row from the records we get back from our query and then have the  TaskWrapper place the contents of the cursor into a Task object.  The task object represents has getters and setters for setting the various task fields, which may be overkill right now because we don&amp;#8217;t have many fields but as our application grows and expands to do more complex things with task information this may make our code more modular.&lt;/p&gt;


	&lt;p&gt;Other than creating the table, I don&amp;#8217;t believe the methods we have in the TasksDbAdapter class are currently being used.  Depending on how we want to clean the code up, we may be able to refactor this class&amp;#8212;either move the db creation into the ViewTask activity or move the other queries out into the TasksDbAdapter.&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s the link to the &lt;a href="http://code.google.com/p/devchix/"&gt;Devchix Task List Android App&lt;/a&gt; on Google Code.&lt;/p&gt;
</description>
      <pubDate>Thu, 24 Sep 2009 22:01:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:5ea28009-b5b8-4069-a19e-2f96207cee79</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2009/09/24/devchix-task-list-android-app</link>
      <category>android</category>
      <category>technology</category>
      <category>tasks</category>
      <category>java</category>
      <category>android</category>
      <category>devchix</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12810</trackback:ping>
    </item>
    <item>
      <title>Android Bootcamp</title>
      <description>Last week I attended Big Nerd Ranch&amp;#8217;s &lt;a href="http://www.bignerdranch.com/classes/android.shtml"&gt;Android bootcamp&lt;/a&gt;.  Wow! What an awesome week!  
&lt;center&gt;
&lt;img src="http://jessirae.com/blog/files/bnr.jpg" alt="" /&gt;
&lt;/center&gt;
So, I was only marginally familiar with the Andoird &lt;span class="caps"&gt;SDK&lt;/span&gt; before I attended the bootcamp.  These are the kinds of things I knew before going to class&amp;#8230;
&lt;ol&gt;
&lt;li&gt;Adb logcat is a command that opens the log of what&amp;#8217;s really going on under the hood.  Adb stands for android debug bridge. Typing &lt;em&gt;adb logcat&lt;/em&gt; at a terminal/command prompt while the emulator is running provides you with a very useful console log.
&lt;/li&gt;
&lt;li&gt;
Screen layouts are controlled by xml, an android specific xml format.
&lt;/li&gt;
&lt;li&gt;
Resources classes are compiled from the layout, strings and other xml files in res folder and can be referenced in code by R.layout.name_of_layout_xml.  These resources can make little red x&amp;#8217;s in Eclipse show up even when there isn&amp;#8217;t a real problem with your code because you just need to clean/build.
&lt;/li&gt;
&lt;li&gt;Apps aren&amp;#8217;t deployed as wars or jars. They are deployed in an apk.
&lt;/li&gt;
&lt;li&gt;
The &lt;a href="http://code.google.com/android/intro/lifecycle.html"&gt;activity lifecycle&lt;/a&gt; includes a number of methods that you can override, including onCreate and onPause.
&lt;/li&gt;&lt;li&gt;
I had done some &lt;a href="http://code.google.com/android/intro/tutorial.html"&gt;tutorials,&lt;/a&gt;
bought some books, and looked over &lt;a href="http://androidguys.com/"&gt;several&lt;/a&gt; of &lt;a href="http://code.google.com/android/kb/commontasks.html"&gt;sites&lt;/a&gt;
I had also asked for &lt;a href="http://groups.google.com/group/android-developers?pli=1"&gt;help,&lt;/a&gt; but nothing really got the concepts in my head like the training at the Big Nerd Ranch.
&lt;/li&gt;
&lt;/ol&gt;

	&lt;p&gt;We covered a ton of stuff over the course of the week: Layouts&amp;#8212;lists, spinners, radio buttons, Activities (multiple activities), Menus, Saving to Database, Notifications, Toasts, Video, Webkit, Location, Intents, Content Providers, AIDLs, Services, Dailing a number, Maps&amp;#8230; (there were more topics, but these are the ones that really stood out).&lt;/p&gt;


	&lt;p&gt;There were modules on each of these topics complete with code examples and exercises, which has really been helping out now that I am back at home writing Android apps as fast as my little fingers can type.&lt;/p&gt;


	&lt;p&gt;The time our class spent together eating meals was incredibly instructive&amp;#8212;as folks drilled our instructor with Android-related questions. :)
Here are some of &lt;a href="http://docs.google.com/Doc?id=dfxrzknm_37d74jqrg2"&gt;my notes&lt;/a&gt; from class.  After the course, I am re-writing the Android Sheep app and am working on my own &amp;#8220;to do&amp;#8221; list app&amp;#8212;original, huh.&lt;/p&gt;
</description>
      <pubDate>Tue, 24 Mar 2009 22:00:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:649dc11e-f3c8-4258-a65f-6ef5d9b95cb5</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2009/03/24/android-bootcamp</link>
      <category>technology</category>
      <category>android</category>
      <category>google</category>
      <category>java</category>
      <category>android</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12779</trackback:ping>
    </item>
    <item>
      <title>Activate Android Dev Phone with AT&amp;amp;T Go Phone SIM Card</title>
      <description>Here&amp;#8217;s how I activated my &lt;a href="http://code.google.com/android/dev-devices.html"&gt;&lt;span class="caps"&gt;SIM&lt;/span&gt;/hardware-unlocked Android Dev Phone&lt;/a&gt;.
	&lt;ol&gt;
	&lt;li&gt;I popped the &lt;span class="caps"&gt;SIM&lt;/span&gt; card out of my AT&amp;#38;T Go phone (cost approximately $20 at Target).&lt;/li&gt;
		&lt;li&gt;I made sure that there was some $$ on my Go phone account.*  &lt;/li&gt;
		&lt;li&gt;I followed &lt;a href="http://modmygphone.com/forums/showthread.php?t=7791"&gt;these instructions to activate the phone&lt;/a&gt;.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Why did I activate my Android Dev phone with a pay-as-you-go account?&lt;/p&gt;


	&lt;p&gt;My initial desire was to have a device that I could put apps on and test the apps as a user; however, now that I have the phone unlocked, I am thinking that I will want the phone as my primary phone.  We will see; I am so indecisive about this phone.  One reason that I can&amp;#8217;t decide what to do is that I am on Verizon (CDMA); the G1 runs on 3G on &lt;span class="caps"&gt;GSM&lt;/span&gt;, but not at the same frequency as AT&amp;#38;T 3G network.  So, in order to run the G1 on AT&amp;#38;T, I would have to run it on &lt;span class="caps"&gt;EDGE&lt;/span&gt;, which is slower than the 3G.  So, I may end up switching to T-Mobile anyways&amp;#8230; they have a nice flex plan that doesn&amp;#8217;t require a 2yr commitment or your &lt;span class="caps"&gt;SSN&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jessirae.com/blog/files/1219080921a.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;*&lt;em&gt;I believe I had $25 on the phone when I activated the phone.  After about an hour of web surfing and email checking on the phone, all of my minutes/KBs were used up.&lt;/em&gt; :(&lt;/p&gt;
&lt;center&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=classroommovi-20&amp;#38;o=1&amp;#38;p=13&amp;#38;l=ur1&amp;#38;category=wireless&amp;#38;banner=0SESQPYNEXXSWMYDWG02&amp;#38;f=ifr" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"&gt;&lt;/iframe&gt;

&lt;/center&gt;</description>
      <pubDate>Fri, 19 Dec 2008 23:24:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5c9daa3c-0c86-4d0a-a853-c2f8387878fe</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2008/12/19/activate-android-dev-phone-with-at-t-go-phone-sim-card</link>
      <category>android</category>
      <category>technology</category>
      <category>mobile</category>
      <category>sim</category>
      <category>you</category>
      <category>as</category>
      <category>pay</category>
      <category>phone</category>
      <category>go</category>
      <category>att</category>
      <category>activate</category>
      <category>activation</category>
      <category>G1</category>
      <category>android</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12770</trackback:ping>
    </item>
    <item>
      <title>Android Sheep</title>
      <description>&lt;p&gt;&lt;strong&gt;The Goal&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Using the Android development kit, &lt;a href="http://draves.org/blog/archives/000549.html"&gt;create an Android application&lt;/a&gt; that allows users to scroll through images of &lt;a href="http://www.electricsheep.org"&gt;electric sheep&lt;/a&gt; and vote on which images they like.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;First impression of Android: rich, open &lt;span class="caps"&gt;API&lt;/span&gt; with quick-n-easy dev set up&lt;/strong&gt;&lt;/p&gt;


Holy shit! The documentation is like drinking from a &lt;a href="http://www.oreillynet.com/onjava/blog/2007/11/android_first_impressions.html"&gt;water hose&lt;/a&gt;, definitely worse than a JavaDoc.  The pay off is that there is a ton of features that &amp;#8220;come with&amp;#8221; this open source &lt;span class="caps"&gt;SDK&lt;/span&gt;.  As mentioned on &lt;a href="http://www.androidlinux.com/"&gt;android linux&lt;/a&gt;,  
	&lt;blockquote&gt;
		&lt;p&gt;usually you have major companies forming an oligarchy of mobile handset programming, but not so much with Android, anyone, even the girl next door, could be the person making the next great Android based mobile application.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;And if you are familiar with Eclipse and HttpClient and jaxp and a slew of other things int the java world, then developing an Android app should be a snap. :-)&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;First lesson learned: keep your performance tuning cap on&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Go ahead and resize all images to fit the phone screen.  One &lt;a href="http://code.google.com/p/android/issues/detail?id=175"&gt;issue&lt;/a&gt; that &lt;a href="http://www.devchix.org"&gt;Gloria&lt;/a&gt; and I encountered was that switching between images in the image switcher was slow.  I am not sure what the best way to do this is if you do not know the screen size; i mean i guess you would simply detect the screen size and choose the corresponding image size, but this assumes that the appropriately sized image would be available to you.&lt;/p&gt;


	&lt;p&gt;I did change the scaletype to &lt;span class="caps"&gt;CENTER&lt;/span&gt;, but I didn&amp;#8217;t really notice a big performance difference&amp;#8230; I mean I couldn&amp;#8217;t even tell which one was faster.  Per the moderator&amp;#8217;s comments&amp;#8230; the thumbnail isn&amp;#8217;t stretched.  The thumbnail and the png are two different files.  But the &amp;#8216;stretching&amp;#8217; that could be giving us problems is the shrinking of the png to fit it inside the small screen&amp;#8212;I can see this because when the scaletype is set to &lt;span class="caps"&gt;CENTER&lt;/span&gt; or not set at all, the image appears much larger and not all of it fits on the screen.  But so, unless we resize the images, there will always be some stretching/shrinking&amp;#8230; it seems reasonable to close the ticket; we can optimize by resizing if there continues to be a performance issue.  Anyways&amp;#8230; interesting stuff.  I am beginning to see what some of the challenges would be in writing a mobile app.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Second lesson learned: be mindful of your focus&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Either do not set the focus on the ImageView or pass in the gallery so you can set the focus back to the gallery.  I received some &lt;a href="http://groups.google.com/group/android-beginners/browse_thread/thread/137db51ea2f394a2"&gt;great help&lt;/a&gt; from the Android Beginners Google Group.&lt;/p&gt;


&lt;em&gt;Setup Tips&lt;/em&gt;
	&lt;ol&gt;
	&lt;li&gt;Another issue that tripped me up was logging.  Sysouts won&amp;#8217;t work&amp;#8230; or at least Android provides its own logging.  This &lt;a href="http://www.winksaville.com/blog/programming/debug-logging-in-android/"&gt;logging how to&lt;/a&gt; helped me out.  The short of it is use &amp;#8220;adb logcat&amp;#8221; command to view logging done by android.util.Log.&lt;/li&gt;
		&lt;li&gt;Don&amp;#8217;t waste time decompiling; &lt;a href="http://code.google.com/p/android/"&gt;get the source&lt;/a&gt;.  Although it never fails, I end up decompiling stuff anyways.  &lt;code&gt;&amp;lt;^_^&amp;gt;&lt;/code&gt;&lt;/li&gt;
	&lt;/ol&gt;


&lt;center&gt;
&lt;img src="http://www.jessirae.com/blog/images/androidSheep.jpg" width="200" /&gt;
&lt;/center&gt;
&lt;p&gt;&lt;em&gt;Updates to Come&lt;/em&gt;:
I wrote this post some time ago, and there are several cool things that I have learned since that time&amp;#8230; more updates to come.  Currently, I am working on displaying images downloaded from the sheep server given some &lt;a href="http://v2d7b.sheepserver.net/cgi/query.cgi?q=recent_frames&amp;#38;n=50"&gt;set of sheep&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sat, 22 Mar 2008 17:12:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:318597ee-c6d9-4587-9984-18006eb104e0</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2008/03/22/android-sheep</link>
      <category>technology</category>
      <category>android</category>
      <category>logging</category>
      <category>gallery</category>
      <category>imageview</category>
      <category>electricsheep</category>
      <category>android</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12743</trackback:ping>
    </item>
  </channel>
</rss>

