withactivity is deprecated in dexter code example Example: dexter dependency dependencies{ implementation 'com.karumi:dexter:6.2.2' }