# Using as a whole feature with the default settings

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FUsQUV1K0MSfBVPGVpb1w%2FScreenshot%202566-02-22%20at%2012.52.25.png?alt=media&#x26;token=adf0b27d-201d-44ec-bf43-d5bdf2a935d6" alt=""><figcaption></figcaption></figure>

## Usage

### Chat home page

Chat home page shows a list of the most recent chats.

### **Start an Activity**&#x20;

```
val chatIntent  = Intent(this, AmityChatHomePageActivity::class.java)
startActivity(chatIntent)
```

### **Create a Fragment**&#x20;

```
class MainActivity : AppCompatActivity(), IRecentChatItemClickListener {

   override fun onCreate(savedInstanceState: Bundle?) {
       super.onCreate(savedInstanceState)
       setContentView(R.layout.activity_main)

       val chatHomeFragment = AmityChatHomePageFragment.Builder()
       /**
         * set the listener to override recentItem click event
         * No Need to implement [IRecentChatClickListener] if you don't want to override click event
         */
       .recentChatItemClickListener(this)
       .build(this)
       
        val transaction = supportFragmentManager.beginTransaction()
        transaction.replace(R.id.fragmentContainer, chatHomeFragment)
        transaction.addToBackStack(null)
        transaction.commit()
   }
}
```
