Many mobile apps include advertisements, which is perfectly fine - the developers have to eat, after all. But some malicious applications go a step further, by either sending push notifications containing advertisements, or taking over your entire screen at random times.
Google has started to crack down on this behavior, but only when it comes to taking over the lock screen. Notification ads and random full-screen advertisements are still fair game, and some OEMs have even used them in the past. Most of these apps disguise the notifications so you can't tell where they came from.
If you're trying to track down rogue ads on your Android device, you've come to the right place.
Some malicious apps display full-screen advertisements, even if you have another application open. Thankfully, it is incredibly easy to figure out where these come from. Whenever they appear, just press the Recents/multi-tasking button (it's next to the home button), and the app it came from will be visible at the top of the screen.
Push notifications containing ads are pretty common, but thankfully, they're usually easy to get rid of. On any phone running Android 5.0 Lollipop or higher, just press down on the notification to see which app it came from.
You'll probably want to uninstall the offending app, but if you want to keep it, you can hide all alerts from it. After you hold down on the notification, there should be an option to block all alerts from that specific app.
Blocking notifications on Android 8.1 Oreo
Depending on your version of Android, there will either be an info button (which will take you to the app options), a button that says 'Block all notifications,' or a simple switch.
Notification ads from a web browser
If you get a notification ad from a web browser, it's probably not the browser itself sending those - it's a website you granted notification access to. You may have done this accidentally, or a site may have recently started misbehaving. Whatever the reason may be, you can easily cut off alerts from specific sites.
Once you see the ad in your notifications, press the 'Site settings' button and tap on 'Notifications.' On older versions of Android, you'll get a simple Block/Allow popup. On Android 8.0 or later, you'll be taken to the site's notification channel, where you have to press the switch at the top of the screen.
Left: Android 7.1 or lower; Right: Android 8.0 or higher
If a site hasn't pushed notifications to you recently, there's another way to disable them. Open the Chrome settings, tap 'Site settings,' and select 'Notifications.'
There, you'll see every website that has ever sent notifications to your phone. To block alerts from a site, select it from the list and tap 'Notifications.' Again, you'll either get a simple popup (Android 7.1 or lower), or you'll have to set the notification channel switch to off (Android 8.0 or higher).
Samsung Internet Browser
It's slightly easier to hunt down and disable notifications from sites in Samsung's web browser. Just press the 'Site settings' button on the message, and on the settings menu that pops up, switch 'Web notifications' to off. Easy peasy.
To see all sites sending you notifications, open the Samsung Internet settings, tap 'Advanced,' and tap 'Web notifications.' Here you can either turn off all alerts, or disable them for specific sites.
Firefox doesn't support Android notification channels, and it doesn't have a general list of all sites you have granted notification permissions to. As a result, it's more difficult to revoke permissions from a specific site, but not impossible.
When you get a web notification, the site it came from is visible at the top. You have to go to that site in Firefox, tap the green lock in the address bar, and select 'Edit Site Settings.'
Redirecting web ads
Another type of malicious advertisements you might encounter are redirecting ads. These are web advertisements that hijack the parent page, and redirect you to a completely different site. If you've ever had a page open, and suddenly a vibrating ad about your phone having viruses appeared, you know what I'm talking about.
At the moment, the only mobile web browser that protects against these ads is Chrome. Just copy chrome://flags/#enable-framebusting-needs-sameorigin-or-usergesture and paste it in the address bar (you can't click/tap on it due to security concerns). Then tap/click the highlighted dropdown menu, change it to 'Enabled,' and restart the browser when asked.
To see the block in action, you can visit this page.
Hopefully, this guide has helped you track down annoying ads on your phone or tablet. If the app pushing ads is from the Play Store, remember to leave it a 1-star review and report it to Google.