A lot of applications on the android market use admob, or some other advertising method to keep the application free but still be able to generate some revenue. The ads are good for both the developer and the user. It generates revenue for the developer, and gives the user relevant advertising.
There is an application, which was recently pulled off the android market, called AdBlock that blocks these advertisers from displaying ads. This application can be a thorn in the side of the developers, as it is hindering income that the developer could be receiving.
Now you could probably argue that these people that run AdBlock wouldn’t click on the ads any how, and for the most part, that is probably true. But at the same time, a lot of applications on the market offer a license key or some other way to remove the ads from the application buy paying the developer a small fee. If the user is running AdBlock, they are circumventing this licensing model and in a way, stealing the application.
One of the great things about android is the ability to launch other intents. And by having this ability, we can check if the user has AdBlock installed. If they have it installed, we can then render the application useless until they remove AdBlock, or purchase the license.
This code block below will check if the user is running AdBlock, if they are, it will display an alert dialog and launch the market to purchase a license, or they can close the application.