Bitten by the sharedUserId attribute in Android

While doing some work to create a second version of an Android application, I got hit with log errors that said my application database was not accessible. In fact, all data was not available to the application. After some digging, I found the following 2 issues relating to this problem.

  1. Issue #3763 If you decide to change the sharedUserId value, application will not have access to its data.
  2. Issue #1227 If you add sharedUserId to your application when it was not there before.

So the short answer is, I have to write content providers to get the data from the old version to the new one. I was hoping to just copy the application files but of course, the simple route is blocked.

The lesson to be learned is that the sharedUserId value should ALWAYS be set on an application. That way you have the choice of creating an upgrade, pro, paid, etc version of your application. Otherwise you will have to spend time creating content providers to copy the information over since you won’t be able to share the information.

Posted under Android

This post was written by robert.casto on August 20, 2010

New chip to bridge iPhone, Android, and BlackBerry?

A new Atom chip was announced today by Intel and the article claims that developers will be able to run their software on any phone that uses it. I would love to see that come true since right now you have to use different tool sets to target each of the phones. Perhaps smart phones will be like PC’s where your software will run on any of them with a recompile? We’ll have to wait and see if Apple will join this party.

http://spectrum.ieee.org/computing/hardware/intel-details-atom-power-scheme

Posted under Smart Phones, Technology

This post was written by robert.casto on June 17, 2010

Free phones from T-Mobile for Fathers Day

T-Mobile Deal Page

T-Mobile Deal Page

Looks like T-Mobile is playing serious. Click on the image to sign up or just go to http://deals.t-mobile.com/. I use Verizon but this is a great deal and a nice way to get one of the new smart phones.

Posted under Deals, Technology

This post was written by robert.casto on June 16, 2010

How Many Performance Metrics is Enough?

I have been asked this question many times and for me it boils down to one idea.

You can never have too much of a good thing!

Running tests usually takes a lot of time and effort. There is planning, setup, executing the test, capturing data, and then processing that data. Having to rerun a test just to get some data that wasn’t captured before is a lot of work. That is why capturing everything up front can save a lot of time and aggravation.

A word of caution though. Watch the disk space while capturing. Make sure the drive won’t be filled with performance data. That could cause the test to fail and cause you to start all over again. Worse, parts of the system could become corrupted and require a complete reinstall and setup of the test.

So what do I monitor? Everything!

When using typeperf, nmon, JMX, database metric snapshots, or anything else; I try to capture much more than I need, but not so much so that I am capturing every piece of data possible. With typeperf, you can literally collect over 2000 different metrics. When pulling data from metric collection of a database, there can be hundreds of data points. Metrics about table spaces, buffer pools, resources, even down to the individual query.

Later I’ll discuss how I process this huge amount of data.

Posted under Performance, Test Data

This post was written by robert.casto on September 3, 2009

Tags: , , ,