1. Conformed to Google OAuth Authentication Mechanism
User's Google ID and password will no longer be stored in the application database. Instead authentication will be done via Google's OAuth mechanism. When the application is launched for the first time, user will be taken to the web browser to sign in to Google. After signing in, a Google page will be shown to allow the user to grant Google Reader access to the Simple Grdr application.
After access is granted, the application will reload with the user's feeds.
2. Added Functions to Add and Remove Feeds
User can add a subscription by pressing the Menu button on the subscriptions list screen and selecting Add Subscription from the options menu.
A dialog box will be shown for the user to enter the feed URL.
User can also remove a subscription by long pressing the desired subscription on the subscriptions list screen and selecting Remove Subscription from the context menu.
3. Added Function to Exit Application
User can now exit the application cleanly by pressing the Menu button on the subscriptions list screen and selecting Exit from the options menu.
References:
Simple Grdr - A Simple Google Reader Client for Android
Simple Grdr - Version 1.1.0
Simple Grdr - Version 1.2.0
2010-08-03
Simple Grdr - Version 1.3.0
2010-05-06
Simple Grdr - Version 1.2.0
1. Added Function to Send Out an Article
This function is accessible from the article list by long-pressing on an article title, or from the article view by pressing on the phone's Menu button. It allows the user to select from a list of channels through which to send out the article's title and URL. Examples of such channels are in-built ones like Gmail and SMS messaging, as well as those exposed by other installed applications such as Seesmic (for sending URL as a tweet).
References:
Simple Grdr - A Simple Google Reader Client for Android
Simple Grdr - Version 1.1.0
2010-05-04
Simple Grdr - Version 1.1.0
1. Added Option to Store Cache on SD Card
Previously, the application cache was stored on phone memory. With the enhancement, user can choose to store the cache on the SD card instead to free up phone memory for more applications.
2. Minor UI Enhancement
User can now easily scroll to the top/bottom of any page. When scrolling, just follow through and move finger all the way to the edge of the screen to have the page go to the end in that direction.
Reference: Simple Grdr - A Simple Google Reader Client for Android
2010-04-19
Simple Grdr - A Simple Google Reader Client for Android
Simple Grdr is, as its name suggests, a simple and user-friendly Google Reader client for Android. Besides simplicity, it also aims to be lightweight and responsive by utilising a lazy caching mechanism.
When you first run the application, you will be instructed to provide your Google ID and password. This can be done in the Preferences screen (press the Menu button and select Preferences).
Upon going back to the main screen, it will authenticate and load your Google Reader subscriptions.
On the susbcriptions screen, a number of actions can be performed:
1. Click on any tag or subscription to bring up the list of unread articles for that tag or subscription.
2. Click on Unread Articles to bring up the list of all unread articles.
3. Click on Starred Articles to bring up the list of articles that you have previously starred.
4. Long-press on any tag or subscription (or Starred Articles or Unread Articles) to bring up a context menu for that article list.
5. Press on the Menu button to bring up the menu items that will allow you to Refresh the subscription list or to go to the Preferences screen.
On the articles list screen:
1. Click on any article to bring up the article content.
2. Long-press on any article to bring up a context menu for that article.
3. Press on the Menu button for more options.
And finally, on the article content screen, the Menu button brings up a number of options for that article.
Links:
Simple Grdr on AndroLib.com
Simple Grdr on AndroidZoom.com
Simple Grdr on Cyrket
2010-02-03
MySQL TIMESTAMP Data Type - Use With Care
Just to share what i encountered with the TIMESTAMP data type in MySQL, so that you don't make the same wrong assumptions.
First, let's create a table with a DATETIME column, and insert a record into the table.
mysql> CREATE TABLE TBL_TEST_DATETIME (ID INTEGER, TEST_DT DATETIME, PRIMARY KEY (ID));
mysql> COMMIT;
mysql> INSERT INTO TBL_TEST_DATETIME (ID) VALUE (0);
mysql> COMMIT;
Notice that i did not specify a value for the TEST_DT column as i wanted it to take a NULL value. Let's query to see the record that was added.
mysql> SELECT * FROM TBL_TEST_DATETIME WHERE ID = 0;
+----+---------+
| ID | TEST_DT |
+----+---------+
| 0 | NULL |
+----+---------+
1 row in set (0.00 sec)
So far so good. Now we'll repeat the test, but using the TIMESTAMP datatype instead of DATETIME.
mysql> DROP TABLE TBL_TEST_DATETIME;
mysql> COMMIT;
mysql> CREATE TABLE TBL_TEST_TIMESTAMP (ID INTEGER, TEST_TMS TIMESTAMP, PRIMARY KEY (ID));
mysql> COMMIT;
mysql> INSERT INTO TBL_TEST_TIMESTAMP (ID) VALUE (0);
mysql> COMMIT;
mysql> SELECT * FROM TBL_TEST_TIMESTAMP WHERE ID = 0;
+----+---------------------+
| ID | TEST_TMS |
+----+---------------------+
| 0 | 2010-01-24 01:37:14 |
+----+---------------------+
1 row in set (0.00 sec)
That's a surprise. We did not specify a value for the TEST_TMS column but still it was populated. Maybe we need to explicitly specify NULL for the value.
mysql> INSERT INTO TBL_TEST_TIMESTAMP (ID, TEST_TMS) VALUE (1, NULL);
mysql> COMMIT;
mysql> SELECT * FROM TBL_TEST_TIMESTAMP WHERE ID = 1;
+----+---------------------+
| ID | TEST_TMS |
+----+---------------------+
| 1 | 2010-01-24 01:40:49 |
+----+---------------------+
1 row in set (0.00 sec)
Well, the TEST_TMS column still got populated with a value even though we explicitly specified NULL in the insert statement.
Note that this was bewildering to me because when i created the table, i did not specify any default value for the the TEST_TMS column, which was just like how i created the TBL_TEST_DATETIME table in the first test.
Of course, i did not count on the fact that MySQL handles a TIMESTAMP column differently from a DATETIME column.
From the MySQL 5.5 Reference Manual (TIMESTAMP Properties):
TIMESTAMP columns are NOT NULL by default, cannot contain NULL values, and assigning NULL assigns the current timestamp. However, a TIMESTAMP column can be allowed to contain NULL by declaring it with the NULL attribute. In this case, the default value also becomes NULL unless overridden with a DEFAULT clause that specifies a different default value. DEFAULT NULL can be used to explicitly specify NULL as the default value. (For a TIMESTAMP column not declared with the NULL attribute, DEFAULT NULL is illegal.) If a TIMESTAMP column allows NULL values, assigning NULL sets it to NULL, not to the current timestamp.
That explains all we have observed in the second test. Let's confirm it.
mysql> DROP TABLE TBL_TEST_TIMESTAMP;
mysql> COMMIT;
mysql> CREATE TABLE TBL_TEST_TIMESTAMP (ID INTEGER, TEST_TMS TIMESTAMP NULL, PRIMARY KEY (ID));
mysql> COMMIT;
mysql> INSERT INTO TBL_TEST_TIMESTAMP (ID) VALUE (0);
mysql> COMMIT;
mysql> SELECT * FROM TBL_TEST_TIMESTAMP WHERE ID = 0;
+----+----------+
| ID | TEST_TMS |
+----+----------+
| 0 | NULL |
+----+----------+
1 row in set (0.00 sec)
There we have it. Remember to explicitly declare a TIMESTAMP column with NULL if you intend for it to hold NULL values.
HTH.
2010-01-25
Setting Up a Minimal Graphical Ubuntu (Karmic Koala)
i had been using Ubuntu previously, until around the time Fedora Leonidas was released, when i decided to give Fedora a try, and since then have stuck with it (also upgrading to the more recent Constantine). One thing that i liked about Fedora which was not present in Ubuntu (Desktop) was the opportunity to select the packages i want during installation. Instead, Ubuntu installs a number of applications by default, most of which i don't use (e.g. Ekiga Softphone and all the games). Sure, i could remove those applications after installation, but that would still leave some previously-dependant packages present when there would actually be no remaining dependency on them.
However, recently i decided to try out the latest version of Ubuntu (Karmic Koala), and got attracted back again. Mainly, its pleasant looking fonts (the same fonts in Fedora somehow didn't look as good) and excellent package management system proved irresistible. Happily, i also found that i could achieve an equivalent of selecting only the packages that i want by starting out with the server version.
1. Install Ubuntu using the Server Installation CD. At the "software selection" stage (DNS server, LAMP server, mail server, etc), select NOTHING. Complete the installation, and reboot and login to the command line interface.
2. RECOMMENDED: Update the existing packages to the latest version by doing
$ sudo aptitude update && sudo aptitude safe-upgrade
(The machine may need to be rebooted one more time after this if the kernel was also upgraded.)
3. Install the minimal packages needed for the graphical interface:
$ sudo aptitude install xorg gnome-core
(Here, i'm going for the Gnome desktop. If you want a really lightweight system, you may want to use Xfce instead. In that case, install the package xfce4 instead of gnome-core.)
4. Launch the graphical interface. There's no need to reboot. Just run
$ startx
Now we have the very minimal graphical desktop installation for Ubuntu with the following applications:
nautilus
gedit
gnome-terminal
gnome-sound-recorder (i have no idea how this got there)
system monitor
preferences
From this point on, we use aptitude or apt-get to install other applications as needed.
5. OPTIONAL: If you want a graphical login screen instead of having to type startx to get to the graphical interface, install GDM:
$ sudo aptitude install gdm
6. OPTIONAL: If you want to use a graphical frontend for installing packages, install Synaptic:
sudo aptitude install synaptic
Reference: http://ubuntuforums.org/showthread.php?t=1334736
HTH.
2010-01-16
Using Android Debug Bridge (ADB) in Linux
i have just done the necessary setup to do some Android development on my Fedora 12 machine using Eclipse (Galileo) and the Android SDK. As i have a HTC Dream (or G1) with me, i also wanted to deploy and test directly on the phone itself instead of using an emulator.
However, things didn't go very smoothly when trying to connect to the phone through ADB.
What i had done to that point was:
1. Created a simple Hello World Android application.
2. Turned on the USB Debugging option on the phone (Menu > Settings > Applications > Development > USB Debugging).
3. Connected the phone to the PC (there was an acknowledgement there on the phone in the form of a notification: USB debugging connected - A computer is connected to your phone).
However, when i tried to run the application, the Android Device Chooser (i had set the Deployment Target Selection Mode to Manual) showed this:
And of course, i couldn't run the application even after selecting the "unknown" target.
Doing a adb devices on the command line also showed a problem:
$ ./adb devices
List of devices attached
???????????? no permissions
It turned out that this was quite a common problem (at least for those developing in Linux), and quite a number of pages (references at the end of article) were devoted to solving (or actually, working around) it. Broadly, there were three different workarounds (or rather, attempts).
1. Ensure that the phone device was added with world writable and readable permissions.
Create the new file /etc/udev/rules.d/50-android.rules containing the line
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Reload the rules by doing
# udevadm control --reload-rules
Thereafter, when the phone is plugged in, the corresponding devices in /dev would have the rw-rw-rw- permission.
However, this did not work. i do not know why, but from some trial and error, it seemed like it was necessary for the ADB server process and the phone devices to be owned by the same user. This led to the other two workarounds.
2. Start the ADB server as root.
Simply, kill the existing ADB server process
# ./adb kill-server
and start it up as root
# ./adb start-server
i'm not too keen on this though, as i try and avoid starting any process as root.
3. Connect the phone device as the non-root user who starts the ADB server process.
The steps are similar to the first (unsuccessful) workaround, with the content of the /etc/udev/rules.d/50-android.rules file slightly different
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", OWNER="user"
where user is the user who starts the ADB server process.
This is still not completely satisfactory though. If another user were to use the same machine, he/she would face the same issue. (At this point, you may be thinking about groups. i've tested it, and no, having the user who starts the ADB server process to be a member of the disk group (the group that owns the phone device) still is insufficient.) However, i'm running a single-user system, so this workaround was still acceptable.
Notes:
The ATTRS{idVendor}=="0bb4" works for my HTC Dream. If you have a different Android device, you may need a different vendor ID. i'm not too sure about this.
References:
http://www.2linessoftware.com/2009/01/31/getting-android-sdk-to-work-with-fedora-10/
http://forum.xda-developers.com/showthread.php?t=561270
http://www.manvstech.com/2009/12/06/android-sdk-i386-on-64-bit-system-cannot-open-shared-object-file-issue/
http://androidforums.com/support/3534-problems-mounting-communicating-g1-ubuntu.html
http://www.mail-archive.com/android-discuss@googlegroups.com/msg14523.html
HTH.