How to set up using eclipse ADT

  • developer

    I have used API level 19 in Eclipse but didn’t upgrade the Manifest yet. I will do so in the next commit.

  • Thanks, but what is the lowest working version? I tested on 17 now and at least it worked to add a calendar in that version. It is of course really good if there is support for at least some of the older versions that is out there. What parts of the code is susceptible to break for older versions?

  • developer

    The least required version to run DAVdroid is API level 14, so you can also compile it with level 14 if you patch a few lines which use functionality of newer API levels (but always with checks). But why don’t just use the Android 4.4 SDK?

  • I am using 4.4, but I do not think that all users will, keeping up some backwards compatibility is a good idea if it isn’t to cumbersome. Which parts of the code that need this handling is above my knowledge though.

  • developer

    I think you mix two things:

    1. The first one is the minimum required API level which is level 14. This means that DAVDroid will run on any device with API level 14 or higher.
    2. The second one is the API level required for building DAVdroid, and the latest level DAVdroid has been tested with. This should be as high as possible. This is actually level 19 so the Android 4.4 SDK will be required to build DAVdroid (but not to run DAVdroid). As far as I know, there is no reason why one should stick with an old Android SDK because everone can easily update their SDK and install various versions in parallel.

    Why don’t you just download Android 4.4 SDK from the Android tools and go with it? It won’t require Android 4.4 on your device, DAVdroid will still run on API level 14+.

  • Thanks for the clarification, I have some things to learn 🙂
    However, when building with sdk 4.4, API level 19, and then running on API level 14 I get an Illegal argument exception when LocalCalendar is calling client.create(…), during the account setup. Running the same on API17 works fine


  • developer

    I don’t know why, I don’t get this exception with SDK 4.4. Have you tried uninstalling the previous DAVdroid version, then compiling/trying again with SDK 4.4? Else you would have to figure out where the exception comes from / which parameter has an illegal value (maybe a value that doesn’t exist in API level 14 yet? In this case a version switch would have to be inserted into the code. On there’s a list which value is supported on which API level, but I thought that unknown values are ignored).

  • Thanks, I removed a pair of the values for API 14 and now it works.

    int currentApiVersion = android.os.Build.VERSION.SDK_INT;
    if (currentApiVersion > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) 
    	values.put(Calendars.ALLOWED_ATTENDEE_TYPES, Attendees.TYPE_NONE + "," + Attendees.TYPE_OPTIONAL + "," + Attendees.TYPE_REQUIRED + "," + Attendees.TYPE_RESOURCE);
  • developer

    I have done this in 4f1488ece5efd7c31ab26c1662dc8b5639376127 yesterday 🙂

  • hehe, thanks for that
    Any chance that you might have some input on this question? (would be great…)

Similar topics

  • 2
  • 20
  • 7