Sunday, September 23, 2012

SQLite Command Line Syntax

For Android development, SQLite3 is the default database that comes with the Android OS. As such, it's a good idea to know some of the basic commands. We decided to keep them here for a handy reference. Leave us a Comment if we missed something you'd like us to include.

The ADB prompt looks like this. 
#
 
The sqlite3 prompt looks like this.
sqlite>


To connect to a database:
     # sqlite3 databasename.db

To list ALL tables in a database:
          sqlite> .tables
     list ALL tables with names like 'foo' in a database:
          sqlite> .tables foo

To show the create commands used to create the tables:
          sqlite> .schema
     show the create commands used to create a table foo:
          sqlite> .schema foo


To set column widths for output:
     sqlite> .width col_width1 col_width2 col_width3 ...


HOW TO: Shutdown Windows

Here's an easy way to shutdown your Windows machine.

1. Left-Click on an empty space on the Desktop.
2. Type Alt-F4 to bring up the Shutdown Dialog.
3. Select the type of action you wish to perform: Switch User, LogOff, Restart, Sleep, Hibernate, or Shutdown.
4. Bookmark this page in case you ever forget what to do. <wink>

NOTE:  This works on all modern version of Windows:  9x, 2k, XP, Windows7, Windows8, ...

SOLVED: Android Google / Gmail account password reset

[Updated 11 August, 2013]

Not all Android devices provide simple ways to update your Google password, especially if it's your primary account (the one you used when you first configured your device). The Samsung Galaxy series of tablets, for example, provides many options for customizing accounts but seems to hide how to change your password. Some suggestions we found seemed to cause us more trouble and did not resolve the problem. Here is the one that worked for us.

Before following our steps below, check that your Settings are correctly set to sync data. Of course, you would find this under Accounts. If it looks like it's out of sync, try to initiate a sync. That may be all you need to do to fix your password. If not, try this.

1. Launch Gmail and wait for a message to appear.
2. If the message is a prompt for your new password, you're probably good to go (see Note 1 below).
3. If the message is a 'No Connection [ Retry ]' or a timeout, check your Notifications. You're looking for an entry regarding a failed login. Tap this and you'll get the password prompt you've been aching to see.
4. If those don't work, try Settings > Applications > Manage Applications > [ Clear Data ]. Do a PowerOff/PowerOn restart. Launch Gmail. Check your Notifications for a failed login entry. Tap on it and enter your new password.
5. We've seen a couple of instances where the new password didn't work. In this case, we changed the password again and were able to get in with the newest password. It's never happened twice in one session, thankfully.


ALSO TRY:
Change your password using a PC browser, which should force the prompt for your new password from your phone.

If you still can't change your password, you may need to do a Factory Reset.
!!! PAY ATTENTION !!! Make sure you have a good backup before you do this one, as it will wipe all your custom settings and personal data.

NOTE:
If you haven't already set an alternate way to get into your Google account, now's a good time to do it.