Skip to main content

MyCarePath

The MyCarePath module integrates with Avidon Health to provide a personalized wellness journey. AFCore generates a secure access URL that you load in a WebView, giving members a seamless in-app experience without leaving your application.


How It Works

  1. Request the access URL -- Call getMyCarePathAccessUrl() to obtain a secure, session-bound URL.
  2. Load in a WebView -- Present the URL in an in-app browser or WebView.
  3. Optional deep-linking -- Pass a MyCarePathSection to navigate directly to a specific area of the MyCarePath experience.

Sections

The optional section parameter controls where the member lands within MyCarePath.

SectionDescription
MyCarePathSection.COURSESOpens the course catalog.
MyCarePathSection.CONTENT_LIBRARYOpens the content library.
null (default)Opens the MyCarePath home page.

Get Access URL

lifecycleScope.launch {
try {
// Open the default MyCarePath home page
val url = AFCore.myCarePath().getMyCarePathAccessUrl()
webView.loadUrl(url)
} catch (e: Exception) {
showError("Could not load MyCarePath: ${e.message}")
}
}
// Open the course catalog directly
val url = AFCore.myCarePath().getMyCarePathAccessUrl(
section = MyCarePathSection.COURSES
)
webView.loadUrl(url)

Best Practices

  • Use an in-app WebView. Members expect a seamless experience. Opening an external browser breaks the flow.
  • Explain the partner experience. Show a brief introduction explaining that MyCarePath is powered by Avidon Health before navigating to the WebView.
  • Handle deep-link returns. If the WebView redirects back to your app (e.g., after completing a course), intercept the navigation and return the member to the appropriate screen.
  • Refresh the URL on each visit. The access URL is session-bound. Always request a fresh URL rather than caching a previous one.

Quick Reference

AFCore.myCarePath().getMyCarePathAccessUrl()
AFCore.myCarePath().getMyCarePathAccessUrl(section = MyCarePathSection.COURSES)
AFCore.myCarePath().getMyCarePathAccessUrl(section = MyCarePathSection.CONTENT_LIBRARY)