'How to add a fragment from external library/framework?

I am trying to add a fragment which has implementation done as part of an external framework. Need to include/reference the fragment in the running application. How this can be done? below is the navigation XML for reference.

<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main"
    app:startDestination="@id/officeFragment">

 <fragment
        android:id="@+id/officeFragment"
        android:name="com.sample.office.OfficeFragment"
        android:label="@string/office">
        <argument
            android:name="officeId"
            app:argType="string"
            app:nullable="false" />
        <action
            android:id="@+id/viewEmployees"
            app:destination="@id/profileListFragment"/>

    </fragment>

    <fragment
        android:id="@+id/profileListFragment"
        android:name="com.externallibrary.component.people.ui.profilelist.ProfileListFragment"
        android:label="@string/people">
        <argument
            android:name="officeId"
            android:defaultValue="@null"
            app:argType="string"
            app:nullable="true" />       
    </fragment>
</navigation>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source