PROBLEM SOLVED!!!
Background - I started having this problem a week ago. Adblockers, antivirus, clearing cache, deleting all but stock apps, NOTHING WORKED. The ad kept popping up every few minutes and covered the screen until I tapped it so it would open the browser. A long press on the home button did nothing. Only by clicking on the ad could I get it to close.
Here's how I was finally able to solve the problem:
Overview:
1. I used a DNS logger to log my android activity.
2. When the offending ad popped up, I quickly checked the DNS logger to look for anything unusual. Copied url of suspicious websites
3. Used a host file editor to block the two websites in my host file. POP UP AD GONE!
Details:
1. I downloaded Adaway to my rooted Galaxy S4. It is both a DNS logger and a host file editor. You cannot get Adaway from the Google Play store. Go to Adaway.org then click on the "Get it on F-droid" button. On the F-droid website, download the F-droid app, then use the F-droid app to download Adaway. Adaway can both log DNS activity and also edit the hosts file on your android. Comment 1: Don't know if there's an app that can edit the hosts file on a non-rooted android. Comment 2: You can really mess up your android if you don't know what you're doing and you edit the hosts file. I don't know what I'm doing but was able to have Adaway edit the hosts file for me without any negative consequences.
2. In Adaway, I pressed "download files and apply ad blocking" and then rebooted my android. Unfortunately, the ad still popped up. So in Adaway, I pressed the android menu button to call up the Adaway menu and chose "Log DNS requests" then I pressed the "Tcpdump is not running!" button to start DNS logging. Then I waited for the ad to pop up again.
3. When the ad popped up, I immediately switched to Adaway's "Log DNS requests" screen and pressed "Open log file". I checked the logger for anything that looked suspicious. In my case, I found appnext.hs.llnwd.net" and "appnext-a.akamaihd.net". I copied the first one then clicked on Adaway's menu and chose "Your lists". I clicked the tab that says "Black". Then I clicked the plus sign to add new item then pasted the copied url in the Add box under hostname and clicked the add button. Then I clicked the "redirection" tab, then the plus sign and pasted the copied url under hostname AND in the field that says IP "(IPv4 or IPv6)" I entered 127.0.0.1 because that's where Adaway redirects problem url's in the hosts file. Then I went back to the DNS log and copied the second suspicious url and added it under "Your lists" to the black tab and then the redirection tab. Important! After you add offending urls to the black tab and redirection tab, you must do two things: go to the adaway app main page and click the "download files and apply ad blocking" button in order for adaway to put the url(s) from "Your list" into your android's host file AND you must reboot in order for Adaway to begin blocking the url(s) you added.
Comments: I don't know if the url needs to be added under both the black and redirection tabs but that's what worked for me. I made the mistake of blocking a third url that was harmless and then could not access it in my browser. I simply went back into Adaway and under "Your list" I deleted the url from the black and redirection tabs, pressed the "download files and apply ad blocking" button the Adaway app main page for the change to take effect, rebooted and then I was able to access the url in my browser.