[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2010-01-27 Thread Mike Olson
I know this is a bit of an old thread, but I implemented the workaround above to get my 1.5 emulator to launch and now my code crashes when I try to run it in the 1.5 emulator. The error is an InvocationTargetException with a cause of VerifyError. I'm currently searching for answers on the web but

[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2010-01-27 Thread Mike Olson
I figured it out from a combination of the info on these two pages: http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/1/ http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html I needed to write an abstract wrapper class that generates a

[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-12-02 Thread Dave Rowntree
On Nov 22, 11:40 am, GDroid baron...@gmail.com wrote: Using this solution, I need to set your API Target Level to 5 (Android2.0), and set the minimum (android:minSdkVersion) to 3 (Android1.5). This way I am able to compile code which reference API 5 methods and run on older devices.

Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-29 Thread frantz lohier
Thank you Dmitri for the code. I've reviewed it and don't see any interaction with the AccountManager. One of the problem with SDK 2.0 is that pickup contacts is condition by having a user login with a proper account. My application crashes under the emulator because I cannot profile a Gmail

Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-29 Thread frantz lohier
Thanks Jarkman. 2 questions: 1) Does: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion Build.VERSION_CODES.ECLAIR) Return the OS/SDK version currently run by the underlying platform or does it return the target SDK level the APP was compiled for ? 2) Is there a way for an

[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-22 Thread GDroid
I've tested this code as well and it is indeed backward. Using this solution, I need to set your API Target Level to 5 (Android 2.0), and set the minimum (android:minSdkVersion) to 3 (Android 1.5). This way I am able to compile code which reference API 5 methods and run on older devices. However,

[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-20 Thread stanlick
Thanks Dmitri -- Is this test correct? int sdkVersion = Integer.parseInt (Build.VERSION.SDK); // Cupcake style if (sdkVersion = Build.VERSION_CODES.ECLAIR) { className = ...ContactAccessorSdk3_4; } else { className =

Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-03 Thread Dmitri Plotnikov
I just published some sample code illustrating this use of both legacy and new Contacts APIs in the same app. See http://code.google.com/p/android-business-card Cheers, - Dmitri On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy mmur...@commonsware.com wrote: jarkman wrote: int sdkVersion =

[android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-02 Thread jarkman
On Nov 2, 1:57 am, frantz lohier floh...@gmail.com wrote: When running the same code (compiled with SDK 1.6) and a target emulator at 2.0 level, the above code never return the entries I have populated in my the phone book. It's as if the phonebook was always empty. My (hazy) understanding