ACME is a fictitious health organization. This sample app uses DexCare's Android SDK to demonstrate some of the functionality of the DexCare SDK.
DexCare Android SDK is hosted with Github Packages. So you need to be authenticated before you can install the SDK dependency.
Set up these two environment variables in your computer to have access to the DexCare SDK downloads:
DEXCARE_MAVEN_ACCOUNT
: Your authorized GitHub username or emailDEXCARE_MAVEN_TOKEN
: Your GitHub personal access token. (tip: a personal access token ( classic) with at leastread:packages
scope is required to install packages) . Learn more
For info on how to set up environment variables on MacOS, see this article. For Windows, see this article.
After these are set, restart Android Studio and do a Gradle sync. The DexCare SDK dependency should then download successfully.
The sample app supports configuration to multiple environments from the single application. You can
define the required configuration in a JSON file. Create a file named dexcare_sdk.dexconfig
in res/raw
directory.
Here is a sample for JSON that shows the supported fields;
[
{
"configId": "",
"configName": "",
"configDescription": "",
"auth0ClientId": "",
"auth0Domain": "",
"brand": "",
"tenant": "",
"dexcareApiKey": "",
"nationProviderId": "",
"dexcareDomain": "",
"fhirOrchUrl": "",
"virtualVisitUrl": "",
"virtualPracticeId": "",
"stripePublishableKey": "",
"pushNotificationIdentifier":""
}
]
These JSON objects are mapped to list of com.dexcare.sample.data.model.AppEnvironment
data class.
Once the config is set up, run the build and you should be able to select environment on the first run. Note: if there is only one environment configured in the JSON, the app will use the environment by default.
You need to add google-services.json
file in order to set up push notification. This is optional.