Android Marshmallow: Test permissions with Espresso?

前端 未结 13 1385
庸人自扰
庸人自扰 2020-11-29 19:31

The new permissions scheme introduced by Android Marshmallow requires checking for specific permissions at runtime, which implies the need to provide different flows dependi

13条回答
  •  孤独总比滥情好
    2020-11-29 20:13

    Thank you @niklas for the solution. In case anyone looking to grant multiple permissions in Java:

     @Rule
    public GrantPermissionRule permissionRule = GrantPermissionRule.grant(android.Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.CAMERA);
    

提交回复
热议问题