how to allow runtime location permission during macro benchmark startup test
yadavraju opened this issue · comments
Raju Yadav commented
Tomáš Mlynarič commented
You can use GrantPermissionRule
from androidx.test:rules:*
For example:
@get:Rule
val grantPermissionRule = GrantPermissionRule.grant(Manifest.permission.ACCESS_FINE_LOCATION)
@get:Rule
val benchmarkRule = MacrobenchmarkRule()
@Test
fun benchmarkStartup() {
// ...
}