Incorrect Package and Activity

I want to click on Allow button of Device access Location(See the Image Click on the link).

I write this code to click on the allow button:-1:
CODECODE********************* cap.setCapability(“appActivity”, “”);
cap.setCapability(“appWaitActivity”, “”);
while (driver.findElements(MobileBy.xpath("//android.widget.Button[@text=‘ALLOW’]")).size()>0)
[debug] [ADB] Found package: ‘’ and fully qualified activity name : ‘’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity