Quick Tip: git Auto-complete
When I started using git, it peeved me that there is no auto-complete. More so when you have to manually do a git add manually.
Quick Tip: Updating the location update frequency
When using Google Play’s Location Services and you want to change the frequency of the updates, make sure to do these in order:
Setting up the SeekBar
So we want to use the SeekBar. We want the minimum value to be 10 and the maximum value to be 100, and it should increment by 10.
Quick Tip: Checking for emptiness
Always using if(myString != null && myString.length() > 0)? Use !TextUtils.isEmpty(myString) instead.
Styling tab selectors for ActionBarSherlock
This post builds on the previous post for ABS + VPI.
Quick Tip: Pulling an SQLite db file from device
I have always thought that you would need root access to pull an SQLite file from a non-rooted Android device. Turns out I thought wrong! Here’s how you do it:
$ adb -d shell
$ run-as your.package.name
$ cat /data/data/your.package.name/databases/yourdatabasename >/sdcard/yourdatabasename
I Can Haz Internetz!
Last week, I was exploring connectivity monitoring and came up with a small app for demo. The app listens for connectivity changes and sends a notification to the user informing them of the change.
Making ActionBarSherlock and ViewPagerIndicator play nice
EDIT (20121227): I made a new post on changing the tab selector underline.
EDIT (20121014): I received feedback from the comments that rotating the device will cause the tab contents to revert to the default text. In essence, the adapter “loses” the contents of the tabs. I have corrected this in the example below as well as in github.
EDIT (20120905): The full sample source code is now in github.
Save Logcat contents to file
Note to self: to save the contents of Logcat to a text file:
Cloning a remote branch in git
My current project at work uses git, and I have always been a CVS/SVN baby so I’m still trying to find my way around it. Today I wanted to clone a remote branch to my local computer. This remote branch also has submodules, so I want to get those too.