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
ZonedDateTimehas azoneproperty 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()
startDateparameter is now aLocalDateendDateparameter is now aLocalDate
Model Changes
- Clinic
timezoneis now aZoneId
- ClinicTimeSlot
startDateis now aLocalDateendDateis now aLocalDatetimezoneis now aZoneId
- InsuranceManualOther
dateOfBirthis now aLocalDate
- InsuranceImageOther
dateOfBirthis now aLocalDate
- OpenHours
startTimeis now aLocalTimeendTimeis now aLocalTime
- PatientDemographics
birthdateis now aLocalDate
- PracticeRegionAvailability
startis now aZonedDateTimeendis now aZonedDateTime
- ProviderTimeSlot
startDateis now aLocalDateendDateis now aLocalDatetimezoneis now aZoneId
- ScheduledVisit
startDateTimeis now aZonedDateTimeendDateTimeis now aZonedDateTimetimezoneis now aZoneId
- ScheduledVisit.Timestamps
cancelledis now aZonedDateTimedoneis now aZonedDateTimerequestedis now aZonedDateTimestaffdeclinedis now aZonedDateTime
- ScheduleDay
dateis now aZonedDateTime. NOTE: This property should no longer be used. Instead, a newlocalDateproperty 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: LocalDatewhich should be used instead ofdate.
- TimeSlot
slotDateTimeis 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
Dateextension functions. They are no longer needed with the Java 8 Date Time types.