Skip to content

Instantly share code, notes, and snippets.

@nimeacuerdo
Created April 6, 2021 07:45
Show Gist options
  • Save nimeacuerdo/9fd7fee915bc57dcfa86ce75e0443803 to your computer and use it in GitHub Desktop.
Save nimeacuerdo/9fd7fee915bc57dcfa86ce75e0443803 to your computer and use it in GitHub Desktop.
Another module that requires initial permissions
@Module
class CallInterceptorPermissionsModule {
@Provides
@ElementsIntoSet
@InitialPermission
fun provideInitialPermissions(
shouldEnableInitialPermissions: ShouldEnableInitialPermissions
): Set<InitialPermissionData> = setOf(
InitialPermissionData(
"ivr", setOf(
Manifest.permission.CALL_PHONE,
Manifest.permission.PROCESS_OUTGOING_CALLS
),
R.string.ivr_disclaimer_title,
R.string.ivr_disclaimer_detail_title,
R.string.ivr_disclaimer_detail_description,
shouldEnableInitialPermissions
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment