Recent activity
Subscribe to this feed
Mo shared an idea in LUCI on February 04, 2009 14:38:
Android Development GuideHere is a set of links that I recommend you follow to get up to speed with Android development. Most of these are from the official documentation page. I feel like the documentation isn't arranged too great, not everything is where you'd expect, making some things hard to find. In fact, while compiling this list, I came upon some very useful pages that I had missed up to this point. The order of these links are slightly different from the official documentation, and I skip a lot of areas, so make sure you look at the rest of the documentation based on your needs.
Start out by installing the Android SDK and related tools.
http://code.google.com/android/intro/...
After that, follow these step-by-step instructions for a simple Hello World app. This will confirm you have your SDK and development environment set up correctly, and also give you a good introduction to basic Android concepts.
http://code.google.com/android/intro/...
Now get your hands even more dirty, and complete the Notepad tutorial. I strongly recommend this, even if it starts out boring! You'll learn more about UI creation, creating menus, using SQLite, creating apps with multiple screens, and dealing with life-cycle events. This tutorial assumes you're comfortable with Java, but you should be fine if you have experience with any OO language. If not, maybe you can go through the tutorial with a more experienced partner. The entire tutorial should take between 1-2 hours.
http://code.google.com/android/intro/...
Now would be a good time to gain a better understanding of some of the underlying concepts. Some of these are stuff we discussed, but you should still read these. The Activity reference page is probably the most important and will apply to almost all applications.
http://code.google.com/android/intro/...
http://code.google.com/android/refere...
http://code.google.com/android/refere...
More serious developers should read these too:
http://code.google.com/android/intro/...
http://code.google.com/android/intro/...
http://code.google.com/android/refere...
http://code.google.com/android/refere...
http://code.google.com/android/devel/...
http://code.google.com/android/kb/fra...
You're probably going to want a nice UI for whatever app you develop. Here are some short guides on various UI implementation topics:
http://code.google.com/android/devel/...
If you find yourself wondering about data storage options, take a look at this:
http://code.google.com/android/devel/...
Some features available in Android are protected. To use these, you must declare specific permissions. Features that are protected include internet access, fetching location info, using the camera, and many more. When users install an application, they are informed of the permissions being requested by the app. This will tell you what you need to know:
http://code.google.com/android/devel/...
Here is an incredibly useful page. Common Tasks and How To Do Them in Android. I had to figure some of this stuff out on my own before discovering this page, I can tell you it was not fun.
http://code.google.com/android/kb/com...
Another very useful source of coding wisdom are the API demos that come with the SDK. This should be pre-installed in the emulator. I recommend going through all the items in the demo, to get a sense of what's available. If you find some functionality that is similar to what you need in your app, you can locate the source code for that particular functionality and copy it into your project. Create a new project in Eclipse using the existing API Demos project folder to view and fool around with the source code. This can be a very enlightening experience. Details here:
http://code.google.com/android/intro/...
Another set of sample apps with source code is available on Google Code. These are more sophisticated programs, including games and multimedia and online apps. The code isn't as easy to read as the API Demos, but it can still be useful if you find something you need in your own app. If you import the source code into Eclipse, you can actually compile and run the apps on the emulator. Here's where you can find it (go to the source tab and click browse and look under the "trunk" node):
http://code.google.com/p/apps-for-and...
Here is some useful information for debugging application in Eclipse:
http://code.google.com/android/intro/...
http://code.google.com/android/intro/...
Here are some other tools that may come in handy. adb will give you command line access. ddms connects eclipse to the emulator (or device).
http://code.google.com/android/intro/...
Info on location APIs and how to fake location data on the emulator:
http://code.google.com/android/toolbo...
Sensors (accelerometers, compass, orientation) are accessible through the android.hardware package, which may not be immediately obvious. There isn't much documentation on using the sensors. Do read the SensorListener and SensorManager reference pages. There is a thorough sensor example in the API Demos.
http://code.google.com/android/refere...
Speaking of sensors, how can you simulate sensor data in the emulator? Here's how:
http://code.google.com/p/openintents/...
http://www.openintents.org/en/node/23
If you're really into it, you can even get the emulator to respond to sensor data from a Wii-mote! (Not tested by me!)
http://blog.dalethatcher.com/2008/04/...
In the same vein, you can use a webcam to provide camera imagery to your app! (Not tested by me, looks complicated!)
http://www.tomgibara.com/android/came...
If you manage to get the last two links working, your emulator will be on par with the actual G1 phone in terms of API features! Want it to match the G1 in terms of looks?
http://www.jsharkey.org/blog/2008/10/...
Unless your app is really simple, it will probably require some sort of threading. Here's a good article on threading in Android:
http://www.ociweb.com/jnb/jnbJan2009....
Links to useful development blogs and forums:
http://www.curious-creature.org/categ...
http://www.jsharkey.org/blog/
http://www.tomgibara.com/android/
http://mylifewithandroid.blogspot.com/
http://android-developers.blogspot.com/
http://developerlife.com/tutorials/?c...
http://www.helloandroid.com/tutorials
http://androidcommunity.com/ (go on the forums)
Mo replied on November 23, 2008 09:28 to the question "Wikipedia Dump Woes" in LUCI:
Mo replied on November 22, 2008 08:28 to the question "Wikipedia Dump Woes" in LUCI:
I was finally able to import the data to mysql without any hitches. 7,649,051 pages. I'm guessing they're not all "content pages".
Here's how I resolved the problems I was having:
- On the mwdumper page, a bunch of tips are given toward the end. Like removing indexes from the database tables. Listen to them!
- Increase the java heap size (-Xmx1000m)
- MOST IMPORTANTLY increase the max packet size in mysql. Here's a link with more info: http://dev.mysql.com/doc/refman/5.0/e...
There's a comment at the end that explains how to do it through the mysql administrator GUI. I used the suggested 32mb.
I'm still downloading the static html dump...
Mo replied on November 22, 2008 05:07 to the question "Wikipedia Dump Woes" in LUCI:
Blast! :| :(
The import tool crashed. It gave me a duplicate key error. Have no idea why that would happen. I noticed it's actually mentioned on the page on mwdumper (above), but the solution someone has proposed doesn't apply to me. The tables were all empty when I started... :-s
Btw, I also made a silly attempt to parse the 19GB xml file directly in code. I think you all can guess what happened! :)
Mo replied on November 22, 2008 04:43 to the question "Wikipedia Dump Woes" in LUCI:
I have some updates.
I was able to import the xml dump to mysql (hopefully, it's still processing!).
Here's what I did:
1. Create the database schema. Run this sql script:
http://svn.wikimedia.org/viewvc/media...
You'll need to replace all the /*$wgDBprefix*/ comments with your db name followed by a dot. e.g. "wikidb." This should create all the tables, etc.
Alternately, you could install MediaWiki, that will create the database, and will have the bonus of allowing you to browse your imported wikipedia dump offline. But I wasn't able to install MediaWiki, I ran into problems with Apache/Php/MySql on my windows machine...
2. Import the xml dump to your newly created database. Instructions for this is provided in the following link, I used the batch file described for Win XP. If you're copy pasting, remember to change the file names accordingly, including the mysql connector version, etc.
http://www.mediawiki.org/wiki/Mwdumper
Seems like this will take a while to complete, and I'm still downloading the static html dump in the meantime. I think parsing the MediaWiki format should actually be pretty easy... but I still am not sure which source to use.
Mo asked a question in LUCI on November 22, 2008 03:32:
Wikipedia Dump WoesI've been struggling for the last couple hours to import the wikipedia dump. Haven't had much luck though. Anybody have a successful attempt? I know at least one person would appreciate it if you shared the steps you took, etc.
On a sorta separate note, I've come to understand that the dump would contain the article content in the wikimedia formatting. Anyone attempt to parse that yet?
Finally, I'm currently downloading the "static html" dump of wikipedia. It's slightly older, and is 14GB, but I'm hoping it will solve both the issues above. http://static.wikipedia.org/
It's gonna be 5 hours before it's downloaded, I'll post again once I know more...
Mo reported a problem in LUCI on November 10, 2008 21:28:
Packaging: To JAR or not to JARWhen I tried to package my extension, using a jar file did not work. But simply zipping everything in the extension folder (where install.rdf, chrome.manifest and content is) to a xpi file worked. Dunno what's up with that!
To clarify:
The packaging instructions here worked:
https://developer.mozilla.org/en/Buil...
The packaging instructions here did not:
https://developer.mozilla.org/en/Crea...
Mo shared an idea in LUCI on November 10, 2008 19:16:
Switching TabsIf you want to update the sidebar whenever you switch tabs, "on page load" isn't enough. For that, you'll need to use Progress Listeners. The example in https://developer.mozilla.org/en/Code... is exactly what you'll need.
But that has a problem too, it raises the event as soon as the address bar value changes, before the content is loaded. Therefore, trying to get all the links will result in an empty list.
The solution? Combine the page load example with this example, register your handler for both events. That way, when a new page loads, the handler will be called twice, the first time will be on the address bar change, so it won't see any links, but the second time will be on page load (more specifally, on DOM content load), and the links will be there.
Mo replied on October 25, 2008 08:44 to the question "Using Immutable view or Mutable view ?" in LUCI:
Mo shared an idea in LUCI on October 21, 2008 02:05:
Wikipedia Title LengthIf you're designing a database schema, it might help to be aware of pages such as:
http://en.wikipedia.org/wiki/Night_of...
Mo replied on October 21, 2008 00:26 to the problem "Wikipedia robots.txt and IP blocking" in LUCI:
Mo asked a question in LUCI on October 20, 2008 18:23:
Lipogram E or F?I remember there being talk of changing the lipogram to the letter "e"... Don, can you please clarify?
Mo reported a problem in LUCI on October 17, 2008 21:59:
Wikipedia robots.txt and IP blockingI'd like to bring everyone's attention to the following:
http://en.wikipedia.org/wiki/Wikipedi...
Some quotes:
"Robots.txt has a rate limit of one per second set using the Crawl-delay setting."
"Please don't try to circumvent it - we'll just block your whole IP range."
Wouldn't it be fun to get all of UCI barred from wikipedia? :D
Also, the robots.txt is interesting and has lots of comments:
http://en.wikipedia.org/robots.txt
Mo shared an idea in LUCI on October 17, 2008 19:34:
Wikipedia StatisticsWant to know the number of pages in wikipedia?
http://en.wikipedia.org/wiki/Special:...
I'm not sure what the distinction is between "page" and "content page". But I feel like we should somehow narrow down to the content pages only in our crawls.
Mo asked a question in LUCI on October 17, 2008 19:18:
Discussion and History pagesDo we want to include the "discussion" and "history" page for each wikipedia article? My vote (if it counts!) is no, specially regarding "history".
I also see no point at all in including the "edit this page" pages.
Anyone else want to chime in with their thoughts?
Loading Profile...
