Overview of SDK for Android apps

HealthCare Locator services are made available through its APIs and integrating the SDK for Android makes it easy to interface with the services from within your app.

With the integrated SDK and subscription API key, your Android app is ready to carry out search operations on healthcare professionals (HCPs) and their activities with healthcare organizations (HCOs).

Topics cover:

         sample app

         library, packages, and classes of SDK

         service calls to get data without implementing UI

Tip

         Recommend customizing the prebuilt search screens of the HealthCare Locator SDK as part of you app UI.

Note

         Review the Android requirements.

Sample app

Download the sample Android app to demonstrate SDK integration. You can find it in the sample folder in the following location:

https://github.com/hcl-sdk/HealthCareLocatorAndroidSDK

Live sample app

Try our live sample app (JavaScript) to experience the features and screens of the HealthCare Locator SDK:

https://www.healthcarelocator.com/sample/search.html

To use our app, click Settings in the menu and add the API key you received after signup.

Library, packages, and classes of SDK

The SDK library comes with the following packages:

         com.healthcarelocator.modelThis package provides classes your Android app can use to convert data from GraphQL into objects that represent HCP specialties and labels. It also provides classes to construct objects that represent locations and searches.

         com.healthcarelocator.model.activityThis package provides classes to convert data from GraphQL into objects that represent HCP activities, HCP activities with HCOs, HCO activities, address locations, and locations. It also provides a class to construct objects that represent other HCP activities with HCOs.

         com.healthcarelocator.model.configThis package provides classes to construct query object that provides parameters for fetching data from the service without UI, custom object that provides fields to change appearance of search screens (text color, text size, fonts, icons), and a view font object that provides methods to define font and font size for search screens.

         com.healthcarelocator.model.home – This package provides a class to construct an object for the Home search screen.

         com.healthcarelocator.model.map – This package provides classes to construct objects for map addresses, markers, places, and sorting.

         customization.map – This package provides a class to construct an object for overlaying search results on a map.

Service calls to get data without implementing UI

The SDK for Android provides the methods to get data without implementing a UI. For details, see the following:

         service calls

         examples

Service calls

Service name

Parameters

getCodeByLabel

- parameters: HCLQueryObject

- @NonNull callback: HealthCareLocatorServiceCallback<ArrayList<GetCodeByLabelQuery.Code>>

getIndividualByName

- parameters: HCLQueryObject

- @NonNull callback: HealthCareLocatorServiceCallback<ArrayList<GetIndividualByNameQuery.Individual>>

getActivities

- parameters: HCLQueryObject

- @NonNull callback: HealthCareLocatorServiceCallback<ArrayList<GetActivitiesQuery.Activity>>

getDetailActivity

- parameters: HCLQueryObject

- @NonNull callback: HealthCareLocatorServiceCallback<GetActivityByIdQuery.ActivityByID>

Examples

         Java

HCLQueryObject.Builder builder = new HCLQueryObject.Builder();

ArrayList codeTypes = new ArrayList();

codeTypes.add("<Your code type>");

builder.criteria("<Your criteria>").codeTypes(codeTypes).locale("<Your language code>");

HealthCareLocatorService service =

        HealthCareLocatorSDK.init("<Your api key>").getServices(getContext());

service.getCodeByLabel(builder.build(), new HealthCareLocatorServiceCallback<ArrayList<GetCodeByLabelQuery.Code>>() {

    @Override

    public void onServiceResponse(ArrayList<GetCodeByLabelQuery.Code> codes) {

        //TODO: Handle response

    }

    @Override

    public void onServiceFailed(@NotNull String message, @NotNull Throwable e) {

        //TODO: Handle error

    }

});

 

         Kotlin:

val builder = HCLQueryObject.Builder(criteria = "<Your criteria>",

        codeTypes = arrayListOf("<Your code type>"), locale = "<Your language code>")

val service =

        HealthCareLocatorSDK.init("<Your api key>").getServices(requireContext())

service.getCodeByLabel(builder.build(),

        object : HealthCareLocatorServiceCallback<ArrayList<GetCodeByLabelQuery.Code>>() {

            override fun onServiceFailed(message: String, e: Throwable) {

                //TODO: Handle error

            }

            override fun onServiceResponse(data: ArrayList<GetCodeByLabelQuery.Code>) {

                //TODO: Handle response

            }

        })