private var fileUrl: String = "" private var taskIds: String = ""
override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) fileUrl = activity!!.intent.getStringExtra("fileUrl") taskIds = activity!!.intent.getStringExtra("taskIds") } If this is used then if If getStringExtra() returns null, it will report java.lang.IllegalStateException: Fragment already added