George,
First, you can launch your app on any emulator version, using manual
launch target mode.
Select Run: Debug Configurations from the Eclipse menu bar, then select
Target (the middle tab), and finally select "Manual" launch mode.
Now start your 1.5 emulator, let it boot, and initiate debugging.
Eclipse will prompt you to select an Android device, and you will be
able to select your emulator.
Second, depending on how much your application needs to do with
contacts, you may be able to get away with much less than the
ContactAccessor pattern.
If all you need to do is pick a contact, the only difference is the URI.
You can make your own constants for 1.5 (People.CONTENT_URI) and 2.x
(Contacts.CONTENT_URI) and use one depending on actual Android version
at runtime.
-- Kostya
29.11.2010 21:46, Kumar Bibek ?????:
ContactsContract class is not available before 2.0 (I guess). It's
certainly not available on 1.5. You should try to find a different
solution, that doesn't use ContactsContract for 1.5 specific phones.
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
On Fri, Nov 26, 2010 at 2:09 PM, George Moschovitis
<george.moschovi...@gmail.com <mailto:george.moschovi...@gmail.com>>
wrote:
After browsing through the BusinessCard sample (http://
developer.android.com/resources/samples/BusinessCard/index.html
<http://developer.android.com/resources/samples/BusinessCard/index.html>)
source code, I am trying to implement a simple application that is
compatible with 1.5 and 2.2 devices.
The ContactAccessor pattern used in the sample is useful but I have a
problem. I would like to test my app in the emulator in eclipse. If I
set the target as 1.5 the eclipse reports errors for ContactsContract
and other 2.2 APIs. If I set the target to 2.2 (and the minSDK to 1.5)
I can only launch a 2.2 API emulator.
I am in a dead end, any ideas?
thanks in advance,
-g.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com
<mailto:android-developers@googlegroups.com>
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
<mailto:android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en