Q: how do i get room database id from the list that shows that id Entry? So i have a recycler view that shows entries from my room database,
in my application i implemented on click listener on my recycler view so when an element is clicked it launches an activity.
 override fun onItemClick(position: Int) {
        val intent = Intent(this, PlaceViewActivity::class.java)
        intent.putExtra("index", position)
        startActivity(intent)

    }

and in that activity i use fetch data by id Dao function and then display the data on text views.
val placesDao = (application as PlaceApplication).db.placesDao()

        val index = intent.getIntExtra("index", 0)

        showData((index + 1), placesDao)

right know I'm using put extra and adding 1 to the position index then put the index inside
dao fetch by id function, now i would like to know if there's a way to get room database id
when i click on my recycler view element, so i can directly pass it into my dao function instead of getting index and adding 1 to it.

A: the way i was to get id was passing it into my onItemClick function
override fun onClick(v: View?) {
            val position = adapterPosition
            val item = items[position]
            val id = item.id
            
            if (position != RecyclerView.NO_POSITION) {
                listener.onItemClick(position, id)
            }
}

