Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Thursday, April 3, 2014

Problems running current version of Android SDK (22.6) on Mac OS 10.6.8

More evidence that my trusty 2006 Mac Pro, while still very capable, is becoming obsolete, seemingly thanks to Apple's rigid upgrade/obsolescence policies.

I was taking an online Android course through O'Reilly School of Technology, and have been doing all of my Android development there for the last several months.  My course ended, and I was anxious to use what I learned for other projects and to give Android Studio a try.  (O'Reilly's Android 1 course used Eclipse.)  Much to my dismay, it appears that Android SDK 22.6 doesn't play well with Mac OS 10.6.8.  I think the first problem I ran into was when I dusted off my local Eclipse and updated to the current version of the SDK.  That didn't work.  I had to manually upgrade it.  I finally got it installed, downloaded my O'Reilly projects and was going to ensure they ran locally.  The emulator never started up[1].  After many tweaks and restarts, installing the Android ADT bundle, etc., I gave up and tried Genymotion.  That didn't work either.  :-)  It seems ominous that a show-stopper such as this has existed as a reported bug[2] for three weeks.

I followed the instructions[3] from Stackoverflow to sneakily download an older version of the Android SDK tools (22.3), and then copy its /tools directory over the /tools directory in the ADT SDK bundle, i.e., ~/Downloads/adt-bundle-mac-x86_64-20140321/sdk/tools .

The good news for me is that I have a couple old Android devices I can use to run my apps on instead of using an emulator, but it's still frustrating to be unable to use the entire set of the current version of the development tools.

Reference


  1. https://stackoverflow.com/questions/22709471/bus-error-when-running-android-emulator - The question in Stackoverflow that describes the problem I was having with the Android emulator
  2. https://code.google.com/p/android/issues/detail?id=67036 - The relevant issue in Google Code for the Android Open Source Project
  3. https://stackoverflow.com/questions/9555337/how-to-downgrade-my-sdk-version#comment19794463_11514698 - The comment in Stackoverflow that allowed me to download an older version of the SDK tools.

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?

Saturday, August 22, 2009

My Android Phone and Switch From Sprint to T-Mobile

I really like my MyTouch. I knew I was going to get an Android phone and hoped that one would come out for Sprint. I kept waiting and waiting. I have been with Sprint for about ten years. I read an article about how the next Android phone would probably be for T-Mobile. The article quoted Sprint relics speaking about their problem with Google's vision and nonsense and blaming their failure to produce an Android phone on Google's poor quality OS. I became angry and decided to go with T-Mobile.

For one thing, T-Mobile is German, which I love. Going with a non-US carrier was a plus. Also a plus was that they have been the most Google-friendly US carrier and some suggested that they deserved some patronage because of that. I agreed. Once I switched, however, it became clear that some of the best reasons for switching were simply due to T-Mobile's superior online offerings. They have free online backup, a much better, more interactive website, than Sprint, a user forum. These things lend themselves to a much more user-friendly and Googly environment than Sprint's. Sprint's website is crap. They have login after login that must be navigated in order to use picture mail. They charge for online backup. If your phone is screwed, so is your data. No SIM card for Spring phones. Sorry! Want to get your personal data out of a Sprint phone? Go to the store.

I read that Sprint wanted to customize (read: ruin) Android and make it into some overly commercialized mess, just like their other interfaces. T-Mobile, on the other hand, has released honest-to-goodness Google phones, phones that are pleasant to use and flexible and customizable to a great degree.

So, that's my switch. Now the phone.

I had to mess with my phone a lot to grasp what its limitations are. The first thing I did was power it on and download app after app from the Android market. Then my phone became slow. I became depressed! Then I deleted all of the apps. Then I reinstalled a bunch.

After repeating these steps many times in a very unscientific exercise, I finally started getting the hang of some things. Here are some bullet points:
  • GPS drains the battery.
  • Some apps stay resident even though you wouldn't think so. Install Task Manager, look at Process View, and see which ones aren't terminating when you close the interface.
  • There isn't a whole lot of RAM to play with so a couple unwanted resident apps using up 15MB of RAM each can really slow things down.
App-wise:
The main things I learned are that it's possible to install a whole lot of apps on the MyTouch and still have a speedy, responsive interface. You just need to pay attention to which ones you install.

Task Manager also monitors the CPU of running processes. Some things, like the process monitors themselves, use a lot of CPU as well as a fair amount of RAM. I thought I could leave them running as services but decided that it wasn't worth it.

When I was running tests, comparing the interface speed while an app is installed with the interface speed after I uninstall the app, I realized that some apps stay in memory even after you uninstall them.

Sorry for the scattered ideas. I'm not publishing this to a magazine or anything.