<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://uberthings.com/teaching/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=67.101.148.212</id>
	<title>Mobile Application Design - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://uberthings.com/teaching/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=67.101.148.212"/>
	<link rel="alternate" type="text/html" href="https://uberthings.com/teaching/wiki/index.php?title=Special:Contributions/67.101.148.212"/>
	<updated>2026-05-30T15:52:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://uberthings.com/teaching/wiki/index.php?title=Yahoo!_One_Day_Java_ME_Crash_Course_8_Feb_2007&amp;diff=1783</id>
		<title>Yahoo! One Day Java ME Crash Course 8 Feb 2007</title>
		<link rel="alternate" type="text/html" href="https://uberthings.com/teaching/wiki/index.php?title=Yahoo!_One_Day_Java_ME_Crash_Course_8_Feb_2007&amp;diff=1783"/>
		<updated>2007-02-08T11:58:51Z</updated>

		<summary type="html">&lt;p&gt;67.101.148.212: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Menu ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
* [http://uberthings.com/teaching/wiki/index.php?title=Setup Setup] / Installation&lt;br /&gt;
* Useful [[Links]]&lt;br /&gt;
* Your first program&lt;br /&gt;
** [[Hello (Form version)]]&lt;br /&gt;
** [[Hello (Canvas version)]]&lt;br /&gt;
* [[Deploying]] - getting your apps running on real devices&lt;br /&gt;
&lt;br /&gt;
=== User Interfaces ===&lt;br /&gt;
==== Forms ==== &lt;br /&gt;
* [[Forms-A-Go-Go]] - a smorgasbord of form examples&lt;br /&gt;
* [[ZombieDetector]] - a teeny bit of logic and forms&lt;br /&gt;
==== Canvases ==== &lt;br /&gt;
* [[CanvasDemo]] - a braindead animation on a canvas&lt;br /&gt;
* [[TastingCanvas]] - an assortment of tasty Canvas treats&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
* [[Name That Key]] - trapping key events&lt;br /&gt;
&lt;br /&gt;
=== Multimedia (MMAPI) ===&lt;br /&gt;
* [[MediaInformationMidlet]] - figure out which mime types your device speaks&lt;br /&gt;
&lt;br /&gt;
==== Camera ====&lt;br /&gt;
* [[CameraMidlet]] - displaying and capturing images&lt;br /&gt;
&lt;br /&gt;
=== HTTP ===&lt;br /&gt;
* [[ImageMonkey]] - Downloading images using HTTP&lt;br /&gt;
&lt;br /&gt;
=== Games === &lt;br /&gt;
* [[GameTest]]&lt;br /&gt;
&lt;br /&gt;
=== XML/RSS parsing === &lt;br /&gt;
* [[RSS Demon]]&lt;br /&gt;
&lt;br /&gt;
=== GPS on iDEN ===&lt;br /&gt;
* [[Position Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth ===&lt;br /&gt;
* [[Bluetooth]]&lt;/div&gt;</summary>
		<author><name>67.101.148.212</name></author>
	</entry>
	<entry>
		<id>https://uberthings.com/teaching/wiki/index.php?title=RSS_Demon&amp;diff=1782</id>
		<title>RSS Demon</title>
		<link rel="alternate" type="text/html" href="https://uberthings.com/teaching/wiki/index.php?title=RSS_Demon&amp;diff=1782"/>
		<updated>2007-02-08T11:08:03Z</updated>

		<summary type="html">&lt;p&gt;67.101.148.212: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* RSS Demon requires that you add the kXML library to your project. &lt;br /&gt;
* Download kXML2 here: http://sourceforge.net/project/showfiles.php?group_id=9157&amp;amp;package_id=58653&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * RSS Demon&lt;br /&gt;
 * a modified version of my XMLDemon example uses kXML2 to parse RSS feeds&lt;br /&gt;
 * &lt;br /&gt;
 * NOTE: Uses techniques and code from Tommi Laukkanen&#039;s RSS Reader - http://www.substanceofcode.com&lt;br /&gt;
 * copyleft Michael Sharon 2006&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
package my; &lt;br /&gt;
&lt;br /&gt;
import java.io.*;&lt;br /&gt;
import java.util.Vector;&lt;br /&gt;
&lt;br /&gt;
import org.kxml2.io.*;&lt;br /&gt;
import org.xmlpull.v1.*;&lt;br /&gt;
&lt;br /&gt;
import javax.microedition.midlet.*;&lt;br /&gt;
import javax.microedition.lcdui.*;&lt;br /&gt;
import javax.microedition.io.*;&lt;br /&gt;
&lt;br /&gt;
public class RSSDemon extends MIDlet implements CommandListener {&lt;br /&gt;
&lt;br /&gt;
	//add any RSS feed here&lt;br /&gt;
	&lt;br /&gt;
	//NY Times Music Feed&lt;br /&gt;
	static final String rssFeedURL = &amp;quot;http://www.nytimes.com/services/xml/rss/nyt/Music.xml&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	//BBC News Feed&lt;br /&gt;
	//static final String rssFeedURL = &amp;quot;http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml&amp;quot;;	&lt;br /&gt;
	&lt;br /&gt;
	//An empty feed which will cause an error&lt;br /&gt;
	//static final String rssFeedURL = &amp;quot;http://uberthings.com/teaching/mobile_application_design/7/empty.xml&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	//BBC&lt;br /&gt;
	//The title of your RSS feed&lt;br /&gt;
	static final String TITLE = &amp;quot;NY Times Music&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	//Vector stores a variable number of items from the feed&lt;br /&gt;
	Vector foundItems = new Vector();&lt;br /&gt;
	&lt;br /&gt;
	//Holds all our items&lt;br /&gt;
	List itemList = new List(TITLE, Choice.IMPLICIT);&lt;br /&gt;
	&lt;br /&gt;
	TextBox textBox = new TextBox(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;, 256, TextField.ANY);&lt;br /&gt;
	&lt;br /&gt;
	Display display;&lt;br /&gt;
&lt;br /&gt;
	Command backCmd = new Command(&amp;quot;Back&amp;quot;, Command.BACK, 0);&lt;br /&gt;
&lt;br /&gt;
	public void startApp() {&lt;br /&gt;
		&lt;br /&gt;
		//get a reference to the display object&lt;br /&gt;
		display = Display.getDisplay(this);&lt;br /&gt;
		&lt;br /&gt;
		//set up listeners and commands&lt;br /&gt;
		itemList.setCommandListener(this);&lt;br /&gt;
		textBox.setCommandListener(this);&lt;br /&gt;
		textBox.addCommand(backCmd);&lt;br /&gt;
		&lt;br /&gt;
		//show the list of items&lt;br /&gt;
		display.setCurrent(itemList);&lt;br /&gt;
		&lt;br /&gt;
		//create a new thread and start it&lt;br /&gt;
		new ReadThread().start();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public void pauseApp() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public void commandAction(Command c, Displayable d) {&lt;br /&gt;
&lt;br /&gt;
		if (c == List.SELECT_COMMAND) {&lt;br /&gt;
&lt;br /&gt;
			//retrieve the specific item that we have selected&lt;br /&gt;
			String text = (String) foundItems.elementAt(itemList.getSelectedIndex());&lt;br /&gt;
&lt;br /&gt;
			if (textBox.getMaxSize() &amp;lt; text.length())&lt;br /&gt;
				textBox.setMaxSize(text.length());&lt;br /&gt;
&lt;br /&gt;
			textBox.setString(text);&lt;br /&gt;
			display.setCurrent(textBox);&lt;br /&gt;
		} else if (c == backCmd)&lt;br /&gt;
			display.setCurrent(itemList);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public void destroyApp(boolean really) {&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	class ReadThread extends Thread {&lt;br /&gt;
&lt;br /&gt;
		public void run() {&lt;br /&gt;
			try {&lt;br /&gt;
				HttpConnection httpConnection = (HttpConnection) Connector.open(rssFeedURL);&lt;br /&gt;
				&lt;br /&gt;
				KXmlParser parser = new KXmlParser();&lt;br /&gt;
&lt;br /&gt;
				System.out.println(&amp;quot;Grabbing XML and parsing&amp;quot;);&lt;br /&gt;
				parser.setInput(new InputStreamReader(httpConnection.openInputStream()));&lt;br /&gt;
				&lt;br /&gt;
				System.out.println(&amp;quot;looking for first tag&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				/** &amp;lt;?xml...*/&lt;br /&gt;
		        parser.nextTag();&lt;br /&gt;
&lt;br /&gt;
		        //ignore other tags, wait for &amp;lt;item&amp;gt; tag&lt;br /&gt;
		        parser.require(parser.START_TAG, null, null);&lt;br /&gt;
		        while(!&amp;quot;item&amp;quot;.equals(parser.getName()) ){&lt;br /&gt;
		            /** Check if document doesn&#039;t include any item tags */&lt;br /&gt;
		            if( parser.next() == parser.END_DOCUMENT )&lt;br /&gt;
		                throw new IOException(&amp;quot;No items in RSS feed!&amp;quot;);&lt;br /&gt;
		        }			&lt;br /&gt;
				&lt;br /&gt;
		        /** Parse &amp;lt;item&amp;gt; tags */&lt;br /&gt;
		        do {&lt;br /&gt;
		        readItem(parser);     &lt;br /&gt;
		        } while(&amp;quot;item&amp;quot;.equals(parser.getName()));&lt;br /&gt;
&lt;br /&gt;
			} catch (Exception e) {&lt;br /&gt;
				e.printStackTrace();&lt;br /&gt;
				foundItems.addElement(e.toString());&lt;br /&gt;
				itemList.append(&amp;quot;Error&amp;quot;, null);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Read a story and append it to the list&lt;br /&gt;
		void readItem(KXmlParser parser)&lt;br /&gt;
			throws IOException, XmlPullParserException {&lt;br /&gt;
&lt;br /&gt;
			 parser.require(parser.START_TAG, null, null);&lt;br /&gt;
&lt;br /&gt;
			 String title = null;&lt;br /&gt;
			 String description = null;&lt;br /&gt;
&lt;br /&gt;
		            // Handles one &amp;lt;item&amp;gt; tag at a time&lt;br /&gt;
		            while (parser.nextTag() != parser.END_TAG) {&lt;br /&gt;
		                parser.require(parser.START_TAG, null, null);&lt;br /&gt;
		                String name = parser.getName();&lt;br /&gt;
		                String text = parser.nextText();&lt;br /&gt;
		                &lt;br /&gt;
		                //replace HTML entities&lt;br /&gt;
		                text = replace(text, &amp;quot;&amp;amp;auml;&amp;quot;, &amp;quot;‰&amp;quot;);&lt;br /&gt;
		                text = replace(text, &amp;quot;&amp;amp;ouml;&amp;quot;, &amp;quot;ˆ&amp;quot;);&lt;br /&gt;
		                text = replace(text, &amp;quot;√§&amp;quot;, &amp;quot;‰&amp;quot;);&lt;br /&gt;
		                text = replace(text, &amp;quot;√∂&amp;quot;, &amp;quot;ˆ&amp;quot;);&lt;br /&gt;
		                &lt;br /&gt;
		                // Save item property values&lt;br /&gt;
		                if (name.equals(&amp;quot;title&amp;quot;)) {&lt;br /&gt;
		                    title = text;&lt;br /&gt;
		                }&lt;br /&gt;
		                else if (name.equals(&amp;quot;description&amp;quot;)) {&lt;br /&gt;
		                    description = text;&lt;br /&gt;
		                }&lt;br /&gt;
&lt;br /&gt;
		                parser.require(parser.END_TAG, null, name);&lt;br /&gt;
		            }&lt;br /&gt;
		            &lt;br /&gt;
		            // Debugging information&lt;br /&gt;
		            System.out.println (&amp;quot;Title:       &amp;quot; + title);&lt;br /&gt;
		            System.out.println (&amp;quot;Description: &amp;quot; + description);&lt;br /&gt;
&lt;br /&gt;
		            if (title != null) {&lt;br /&gt;
						foundItems.addElement(&amp;quot;&amp;quot;+description);&lt;br /&gt;
						itemList.append(title, null);&lt;br /&gt;
					}&lt;br /&gt;
		            &lt;br /&gt;
		            parser.nextTag();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	  /* Replace all instances of a String in a String.&lt;br /&gt;
     *   @param  s  String to alter.&lt;br /&gt;
     *   @param  f  String to look for.&lt;br /&gt;
     *   @param  r  String to replace it with, or null to just remove it.&lt;br /&gt;
     */  &lt;br /&gt;
    public static String replace( String s, String f, String r )&lt;br /&gt;
    {&lt;br /&gt;
       if (s == null)  return s;&lt;br /&gt;
       if (f == null)  return s;&lt;br /&gt;
       if (r == null)  r = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
       int index01 = s.indexOf( f );&lt;br /&gt;
       while (index01 != -1)&lt;br /&gt;
       {&lt;br /&gt;
          s = s.substring(0,index01) + r + s.substring(index01+f.length());&lt;br /&gt;
          index01 += r.length();&lt;br /&gt;
          index01 = s.indexOf( f, index01 );&lt;br /&gt;
       }&lt;br /&gt;
       return s;&lt;br /&gt;
    }  &lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>67.101.148.212</name></author>
	</entry>
</feed>