I ran into SO much trouble doing this as well. The answer is, it depends. What Android OS are you testing on? Is it 2.X?
Some functions on different devices are not available so it wouldn't work. The best thing to do is check the android spec's and also test it on different android devices