DexCare SDK 7.0.0
This page contains information on how to upgrade from SDK 6.x to SDK 7.0. For a full list of changes, see the Release Notes.
Core Library Desugaring
As of DexCare SDK 7.0, if your app has a minimum target API lower than 26, you will also need to enable core library desugaring in order to use the Java Time library on those lower API versions.
Follow the Android guide here: https://developer.android.com/studio/write/java8-support#library-desugaring
Dates
Dates throughout the SDK have changed types, and now use the Java Time library introduced with Java 8.
See this page in Oracle’s documentation for more details on the new types and their intended purposes: https://www.oracle.com/technical-resources/articles/java/jf14-date-time.html
In essence:
- Dates that only represent a day are now
LocalDate
. These represent a day without any time or timezone, e.g. 2021-05-13. - Dates that have valid time components are now
ZonedDateTime
.- Note: by default these times are displayed in the device’s timezone. If you want to display times as “airport times”, you will need to call
ZonedDateTime.withZoneSameInstant(newZoneId: ZoneId)
to get the local time in the specified timezone. - For example: If the appointment’s time is 2pm PST, but the device is set to EST timezone, the appointment time will display as 5pm by default.
- In addition, the
ZonedDateTime
has azone
property that can be used to display the timezone to the user (best experience).
- Note: by default these times are displayed in the device’s timezone. If you want to display times as “airport times”, you will need to call
- Dates that only represent a time without associated timezone are now
LocalTime
. These are not associated with any specific date or timezone. - Strings that previously represented a timezone are now
ZoneId
.
Interface Changes
- ProviderService.getProviderTimeslots()
startDate
parameter is now aLocalDate
endDate
parameter is now aLocalDate
Model Changes
- Clinic
timezone
is now aZoneId
- ClinicTimeSlot
startDate
is now aLocalDate
endDate
is now aLocalDate
timezone
is now aZoneId
- InsuranceManualOther
dateOfBirth
is now aLocalDate
- InsuranceImageOther
dateOfBirth
is now aLocalDate
- OpenHours
startTime
is now aLocalTime
endTime
is now aLocalTime
- PatientDemographics
birthdate
is now aLocalDate
- PracticeRegionAvailability
start
is now aZonedDateTime
end
is now aZonedDateTime
- ProviderTimeSlot
startDate
is now aLocalDate
endDate
is now aLocalDate
timezone
is now aZoneId
- ScheduledVisit
startDateTime
is now aZonedDateTime
endDateTime
is now aZonedDateTime
timezone
is now aZoneId
- ScheduledVisit.Timestamps
cancelled
is now aZonedDateTime
done
is now aZonedDateTime
requested
is now aZonedDateTime
staffdeclined
is now aZonedDateTime
- ScheduleDay
date
is now aZonedDateTime
. NOTE: This property should no longer be used. Instead, a newlocalDate
property has been added to this model which should be used instead. The date property on this model only represents the day - the API is incorrectly returning time with it and should be ignored.- New property
localDate: LocalDate
which should be used instead ofdate
.
- TimeSlot
slotDateTime
is now aZonedDateTime
VirtualVisitInformation
If you were previously creating VirtualVisitInformation
objects with the currentState
parameter specified, the parameter was removed.
Deprecation removals
- Removed deprecated models/methods/properties:
- Address.address
- Address.address2
- Region
- RetailService.uploadInsuranceCard
- VirtualPracticeRegion.getVisitPriceInDollars
- VirtualService.startVirtualVisit methods without practiceId argument
- VirtualService.getRegions
- VirtualService.getRegionAvailability
- VirtualService.getInsurancePayers
- VirtualService.verifyCouponCode
- VirtualVisitInformation.currentState
- Removed all of the DexCare SDK’s
Date
extension functions. They are no longer needed with the Java 8 Date Time types.