Thursday, December 26, 2013

Android: Accessing shared preferences in Activity

I was getting this error when trying to access shared preferences in my main activity:

http://stackoverflow.com/questions/12201371/android-unable-to-start-activity-componentinfo

Moving getPreferences() to the onCreate() method solved the problem.  I'm guessing it's because I was trying to get the shared preferences before the activity was created.  (Hey, I'm new at this!)

Monday, October 28, 2013

Android ROMs

I'm flashing SuperJELLY on my HTC EVO 4G LTE right now.

I was running Paranoid Android for a few weeks, probably my fourth or fifth custom ROM on this device, and am switching back to a Sense-based ROM (or maybe stock-based ROM is more accurate) because there are some crucial features that just aren't supported at all or well on custom ROMs like Paranoid Android and Cyanogenmod.

GPS:
I've had significant GPS problems running anything other than a stock-based ROM.

4G/LTE and roaming:
I've never been able to get 4G data using a custom, non-stock ROM on this device using Sprint in Washington, DC.  Roaming seems to be much worse also.  Combine that with the fact that it doesn't automatically (as far as I can tell) update its preferred roaming list (PRL) makes it much worse than a Sense-based, stock-based ROM for data connectivity.

Camera:
The first couple non-stock ROMs I installed could barely use the camera at all.  The time between photos was seconds.

Contacts:
Two of the custom ROMs I installed could not load the contacts app without crashing.  The best explanation I found for this was that any significant number of contacts can be a problem for some ROMs.  Never had a problem with stock though.

These problems might entirely be HTC's fault for making it difficult for others to write code for their hardware.  However, that's just another reason to choose hardware whose philosophy fits yours.  Personally, I'd rather have a phone that is generic enough that it will run whatever I want to put on it, rather than having a camera chip that's so spiffy that anything but the stock ROM can barely use it effectively, much less take advantage of its spiffiness.

The take-away from this is that I'm going to hold my breath until my Sprint contract is up in February and then sign up for a no-contract plan with whomever is currently offering something like the MotoX or the next Nexus phone.

Anyone else have similarly frustrating experiences with custom ROMs on their new-ish HTC phone?