Monday, July 12, 2010

Android Dev Tips

Tip 1: Import a sqlite DB from somewhere else (let us say db.sqlite)
tools$ ./adb push ~/android/db.sqlite /data/data/
1934 KB/s (443392 bytes in 0.223s)

While Activity.setContentView takes an id of a Layout, TabSpec.setContent takes an id of a View.

Tip 3: Android: Get the Application Version in an activity
PackageInfo info = getPackageManager().getPackageInfo( getPackageName(), 0 );
String version = info.versionName;

Tip 4: Android onNewIntent() is never called.

In the android manifest file for the activity, add the following attribute

Tuesday, July 06, 2010

FreeNode IRC CheatSheet

Q. How do I start a new channel on FreeNode?

Just join a channel. If it does not exist, it will be created for you.

Q. How do I register ChanServ to my channel on FreeNode?

/msg chanserv register #

Replace channel with your name of the channel.

Q. Set ChanServ bot on guard?

/msg chanserv set # guard on

KNetworkManager and VPN

Since Fedora 13, I have been unable to use the nm-applet on KDE. It seems like KNetworkManager is the default in KDE on Fedora 13.

Try to get the knetworkmanager-openvpn and knetworkmanager-vpnc packages installed on your fedora instance.

$> sudo yum install knetworkmanager-openvpn
$> sudo yum install knetworkmanager-vpnc

The nm-applet settings for vpn are all lost. So you will need to login to gnome to get those settings and input them into knetworkmanager.

But there are some pending bugs because the knetworkmanager vpn is not really working for me (and also a co-worker). Keeping fingers crossed to see if a future update will fix it.