view Report Handler
The function to create an Intent to view a report for a given ID. This Intent will most typically launch a separate activity to view the report:
val sasContext = SASManagerContext()
…
sasContext.viewReportHandler = { context, reportId, bundle ->
Intent(context, MyReportActivity::class.java).also {
// Store reportId for retrieval within MyReportActivity
it.putExtra("extra_reportId", reportId)
// Add extras if specified
if (bundle != null) {
it.putExtras(bundle)
}
// Start in a new, empty task
it.flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
}
Content copied to clipboard