2009-06-28

SIM contact list query doesn't support filtering

content://sim/adn doesn't respect the where clause when querying it. Just so that someone doesn't spend as much time wondering why the freaking thing wouldn't work as I did.

You have to filter it another way. I did by creating a custom CursorAdapter to filter it, but your mileage may vary. It might be better to make a cursor wrapper, or something. Or is there something like that in the library already, and I just missed it?

2009-06-23

Launching applications in Android

To launch an application programmatically in Android given an ApplicationInfo, do:

ApplicationInfo ai;
PackageManager pm = getPackageManager();
try {
    Intent i = pm.getLaunchIntentForPackage(ai.packageName);
    startActivity(i);
} catch (Exception e) {
    Toast t = Toast.makeText(this, "Couldn't launch the application.", Toast.LENGTH_SHORT);
    t.show();
}

Apparently this was harder pre-1.5, where you had to look for the proper activity yourself.

Blogger's data:blog.feedLinks

As you might have noticed, I got sick of the crufty, old, temporary-turned-permanent template here and been playing with making a new one from scratch. So you might expect this place to look even worse and more half-baked for some time to come.

And while I was trying to get the RSS links in the header, I came across the data:blog.feedLinks thingy. I've been extremely puzzled as to why couldn't I <b:loop> it... turns out it's not a list, but a piece of HTML code. Just smack the <data:blog.feedLinks/> in your <head> and be done with it.

To end this rant, I'd really appreciate if blogger had anything resembling a proper reference instead of this freaking I-m-so-stupid-I-can't-use-a-reference-and-need-mom-to-answer-me-questions freaking FAQd up 'online help'.

EDIT: BTW, no, no comments for you. We'll see if it's to stay. Mostly depends on how fed up I'd be with the blogger API, I guess.

2009-06-11

JFS external journal devices on LVM

JFS allows using external journal devices, but has trouble finding them when they are located on LVM (as of jfsutils-1.1.13). It turns out it doesn't search proper dev directories when searching for device by UUID.

It does search /dev/evms though. Simple workaround is to ln -s mapper /dev/evms.

2009-05-13

Power management in Android's kernel

Google was going to be an interesting case of a large company hiring people both from the embedded world and also the existing Linux development community and then producing an embedded device that was intended to compete with the very best existing platforms. I had high hopes that this combination of factors would result in the Linux community as a whole having a better idea what the constraints and requirements for high-quality power management in the embedded world were, rather than us ending up with another pile of vendor code sitting on an FTP site somewhere in Taiwan that implements its power management by passing tokenised dead mice through a wormhole.

To a certain extent, my hopes were fulfilled. We got a git server in California.

mjg59

2009-03-11

Restrained Life Viewer for Linux

Current (1.15.2_LL-1.21.6) binary distribution of Restrained Life Viewer for Linux is broken. The binary is compiled with an extra flag which is not in the settings file, which makes the client crash when trying to wear a blindfold.

Luckily this is easily fixed. The patch below makes you able to enjoy being blindfolded also in Linux.

--- RLV-1.15.2_LL-1.21.6/app_settings/settings.xml      2008-10-25 22:03:09.000000000 +0200
+++ /home/divide/games/SecondLife-i686-1.21.6.99587/app_settings/settings.xml   2009-03-11 13:58:29.000000000 +0100
@@ -12,6 +12,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>RestrainedLifeNoSetEnv</key>
+    <map>
+      <key>Comment</key>
+      <string>Toggles the RestrainedLife atmospheric effects restraint, needed for eg. blindfolds. (False means blindfolds work.) Needs a restart of the viewer.</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>RestrainedLifeDebug</key>
     <map>
       <key>Comment</key>

2009-03-09

The sound of silence

From "The Power of Now" by Eckhart Tolle:

Every sound is born out of silence, dies back into silence, and during its life span is surrounded by silence. Silence enables the sound to be. It is an intrinsic but unmanifested part of every sound, every musical note, every song, every word.

It somehow made me think of John Cage: