Is there a way to find whether an Advertisement is displayed in the screen or not?

I need to launch an app and check if the ad is getting displayed or not. How is it possible using Appium - Java.