Adding Preferences On-The-Fly
(Make appropriate whooshing sounds)
Inspecting your Shared Preferences
Did you know that you can look at your SharedPreferences file?
Eclipse-ception
Guys!! Eclipse just went all Inception on me!
Adding a float value to your resources
Earlier today, I was trying to figure out how to add a float value to constants file. What I used to do was add a string value in my strings.xml
, retrieve the string value, and convert it to float.
float floatFromFile = Float.valueOf(getResources().getString(R.string.my_float));
Quick Tip: git cloning
A user-friendly way of cloning a git
repo is through the eGit plug-in in Eclipse. But sometimes, especially on Windows machines, Eclipse has trouble cleaning up after itself after completing a clone operation. The best workaround for this is to clone the repo from git bash
and then import the repo in Eclipse.
default@ZDOMINGUEZ-T420 ~
$ git clone git@github.com:<your git repo> <local folder to check out to>
Selenium and File Downloads
Lately, one of my tasks has been to automate regression tests on one of our apps. Since this is a web app, we are using Selenium. Here, I enumerate the steps to configure Firefox for file downloading using Selenium and JUnit by foregoing the downloads dialog box.
MongoDB and Authentication
By default, MongoDB allows access to the database without authentication. Adding a user with a username/password is easy, but authenticating might be a bit tricky since the official documentation does not say the command directly.
Hello, it’s me again.
To my two readers out there, hello! It’s been a while since I posted here. I was transferred to another (non-Android) project and lost all my Internet privileges, hence the silence. I still can’t believe almost every other site is blocked by the office firewall! Makes software development ten times harder. Ugh.
Where’s my R.java?
This afternoon, I tried importing an existing project into Eclipse. Doing a Project > Clean usually clears up the R.java not found errors, but this time it didn’t work. I tried re-importing the project, copy-and-pasting it into a new workspace, restarting Eclipse, but the error is still there.