Pop up android phone

How to Stop Pop-Up Ads on an Android Phone

Pop-up ads are a common issue with most mobile devices nowadays, regardless of the operating system. More often than not, the issue lies in apps installed on your device. If you’re wondering how to get rid of pop-up ads on your Android phone, we’re here to help.

In this guide, we’ll provide instructions on disabling pop-up ads on Android phones – whether you’d like to stop specific ads or get rid of them completely. Additionally, we’ll answer some of the most common questions related to pop-up notifications on Android devices.

How to Stop Pop-Up Ads on Android Phone?

Pop-up ads may be showing up for different reasons. Here’s an easy way to identify which app is responsible for the ads and get rid of them:

  1. Open your phone’s Settings.
  2. Navigate to ‘’Apps & Notifications,’’ then tap ‘’Advanced,’’ then ‘’Special App Access.’’
  3. Tap ‘’Display’’ over other apps. You will see a list of all apps that have permission to show pop-up ads.
  4. Check the list for apps that you wouldn’t like to see pop-up notifications from, or that seem suspicious. Tap the app name and shift the toggle button next to “Allow display over other apps” to the ‘’Off’’ position.

How to Stop Pop-Up Ads on Android Phone Home Screen?

There’s no way to disable pop-up ads on the home screen while leaving them on the lock screen – you’ll have to get rid of pop-up ads completely. To do that, follow the steps below:

  1. Open your phone’s Settings.
  2. Navigate to ‘’Apps & Notifications,’’ then tap ‘’Advanced,’’ then ‘’Special App Access.’’
  3. Tap ‘’Display’’ over other apps. You will see a list of all apps that have permission to show pop-up ads.
  4. Check the list for apps that you wouldn’t like to see pop-up notifications from, or that seem suspicious. Tap the app name and shift the toggle button next to “Allow display over other apps” to the ‘’Off’’ position.

How to Stop Pop-Up Ads on Android Phone on YouTube?

Good news! You can get rid of YouTube pop-up ads through your device’s Settings. To do that, follow the instructions below:

  1. Open your device’s Settings.
  2. Navigate to ‘’Apps & Notifications.’’
  3. Tap ‘’See All Apps’’ and scroll down until you find YouTube.
  4. Open YouTube settings and tap ‘’Notifications.’’
  5. Shift the toggle buttons next to unwanted notifications to the ‘’Off’’ position. For example, you can turn off notifications for recommended videos, but keep notifications for live streams.
  6. If you’d like to get rid of all YouTube notifications, shift the toggle button beside “Show notifications” to the ‘’Off’’ position.

How to Stop Pop-Up Ads on Android Phone on Lock Screen?

To disable pop-up notifications on your phone’s lock screen, follow the steps below:

  1. Open your phone’s Settings.
  2. Navigate to ‘’Apps & Notifications,’’ then tap ‘’Configure Notifications.’’
  3. Scroll down to the Show Notifications section and tap ‘’Notifications on Lock Screen.’’
  4. Select “Don’t show notifications.” The changes will apply automatically.
Читайте также:  Перепрошить андроид с карты памяти

How to Stop Pop-Up Ads on Android Phone on the UC Browser?

If you’re using the UC Browser and would like to stop pop-up ads on your phone, follow the instructions below:

  1. Launch the UC Browser app.
  2. Tap the gear icon at the bottom-left corner of your screen to open Settings.
  3. Navigate to the AdBlock settings.
  4. Shift the toggle button to the ‘’On’’ position.

How to Stop Pop-Up Ads on an LG Android Phone?

Stopping pop-up ads on an LG phone isn’t much different from doing it on any other Android device. Follow the steps below:

  1. Open your phone’s Settings.
  2. Navigate to ‘’Apps & Notifications,’’ then tap ‘’Advanced,’’ then ‘’Special App Access.’’
  3. Tap ‘’Display’’ over other apps. You will see a list of all apps that have permission to show pop-up ads.
  4. Check the list for apps that you wouldn’t like to see pop-up notifications from, or that seem suspicious. Tap the app name and shift the toggle button beside “Allow display over other apps” to the ‘’Off’’ position.

Optionally, you can install an ad blocker app or a browser without ads. Here are some of the best apps for Android devices:

  1. Free AdBlocker. This app is designed specifically for removing pop-up ads but has some additional features such as weather forecasting, browser themes, the ability to protect your browser with a password, and more.
  2. AdGuard. A simple ad-blocking app with the possibility to apply custom ad filters.
  3. DuckDuck Go Browser. The browser does the same thing as Google Chrome or Mozilla Firefox but is free from any pop-up ads.

How to Stop Google Ads on Android Phone?

To disable personalized Google ads on your Android device, follow the guide below:

  1. Open your device’s Settings.
  2. Scroll down and tap ‘’Google.’’
  3. Under the ‘’Services’’ section, tap ‘’Ads.’’
  4. Shift the toggle button next to “Opt out of Ads Personalization” to the ‘’Off’’ position.

If you’d like to stop pop-up ads on Google Chrome, follow the steps below:

  1. Launch the Google Chrome browser.
  2. Tap the three-dot icon at the upper-right corner of your screen, then select ‘’Settings’’ from the dropdown menu.
  3. Tap ‘’Site Settings.’’
  4. Navigate to ‘’Pop-ups and Redirects.’’
  5. Select the ‘’Blocked’’ option at the top of your screen.

Frequently Asked Questions

In this section, we’ll provide more information on removing pop-up ads on Android devices.

How Do I Eliminate Pop-Up Ads?

Unfortunately, there’s no universal button to disable pop-up ads on Android devices completely. Instead, you have to deal with pop-up ads from every app individually. Navigate to your phone’s Settings, then to “Apps & Notifications.’’ Tap ‘’Advanced,’’ then ‘’Special App Access.’’

When you tap ‘’Display’’ over other apps, you will see a list of apps that have permission to send pop-up ads. Block ads from specific apps by shifting the toggle button beside “Allow display over other apps.” Another option is to install an ad-blocking app that can be found in the Google Play store. The features and effectiveness of such apps vary, but some of them are able to stop the vast majority of pop-up ads on your phone.

How Can I Completely Block Specific Pop-Up Ads?

You can block pop-up ads from specific apps through your device’s Settings. Navigate to the Apps & Notifications settings. Tap ‘’Advanced,’’ then ‘’Special App Access.’’

When you tap ‘’Display’’ over other apps, you will see a list of apps that have permission to send pop-up ads. Block ads from specific apps by shifting the toggle button beside “Allow display over other apps.”

Why Do Ads Keep Appearing on My Phone?

Pop-up ads can be extremely annoying – even if you’ve disabled pop-up notifications from most of your apps, you may still be getting them. Sometimes, this may happen when you install a new app and forget to adjust the permissions.

Читайте также:  Heretic для андроид полная версия

Another common reason is visiting unfamiliar websites in your browser – in this case, try disabling pop-up ads directly through Google Chrome settings, rather than through your device’s settings. We strongly advise installing an ad blocker app or an antivirus to stop popup ads from appearing completely.

Stop Distracting Notifications

Constant pop-up ads are, perhaps, the most annoying and distracting app feature imaginable. Hopefully, with the help of our guide, you’ve got rid of unnecessary notifications on your Android device. Make sure to update notification permissions after you download a new app, and consider installing an ad blocker to make your life easier.

Do you know any great browsers that are free from ads? Share your experiences in the comments section below.

Источник

Tek Eye

The main screen for an Activity is not the only way to interact with the user of an app. A brief message or dialog can be displayed in appropriate circumstances to ask a specific question, get specific input, or show a brief message. Android has build in support for such small focused interactions that require immediate attention.

(This Android pop-up tutorial assumes that Android Studio is installed, a basic App can be created and run, and the code in this article can be correctly copied into Android Studio. The example can be changed to meet other requirements. When entering code in Studio add import statements when prompted by pressing Alt-Enter.)

How to Display A Smaller Window on Top of an Activity

There are different ways in Android to pop-up a brief window over the current Activity screen, these include:

  • The Toast class – to display brief informational only message.
  • The Dialog class, managed by a DialogFragment – to support a flexible input that can display information and can ask for inputs or choices. There are several built in sub-classes including:
    • AlertDialog – supports buttons (from zero to three), list selections, check boxes and radio buttons (see the article About Box in Android App Using AlertBuilder).
    • ProgressDialog – supports a progress bar or wheel and supports buttons because it extends AlertDialog.
    • DatePickerDialog – supports selecting a date.
    • TimePickerDialog – supports a time selection.
  • The PopupWindow class – allows a View to float on top of an existing activity. Suitable for custom informational messages.

These classes build their user interfaces through class methods with support from custom layouts when required. For this article the PopupWindow class is used. This Android pop-up tutorial includes example code. What is the PopupWindow? The Android developer PopupWindow documention gives this class overview:

«This class represents a popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.»

It can be used to display extra information without needing to code another Activity. An example would be to show results at the end of a game (or end of a level), which will be done in this tutorial. The steps for this example project and code are:

  • Create a new project in Android Studio.
  • Design the pop-up window.
  • Add the code to load and populate the pop-up window.
  • Call the code.

Design the Layout for the Pop-Up

For this example a pop-up is going to display a game’s result as gold, silver and bronze medal positions. The pop-up will have a graphic, shown in a ImageView , for each of the medals; a TextView for the winner’s name, and one for the score. The images for the medals came from the Open Clip Art Library by user momoko. They have been resized for the Android project and are available in medals_png.zip. Ready to download and add into the app project.

Читайте также:  Content office для андроида

Start a new app project in Android Studio. Here it was called Pop-up and uses an Empty Activity with all other settings left at their default values. The pop-up window will be defined in a new layout XML file in the project’s layout folder, called winners.xml. To add some interest to the pop-up screen it will have a blue background and rounded corners, this is done using a shape drawable (see Add a Border to an Android Layout). The shape drawable for the custom background definition is a drawable resource XML file in the folder res/drawable. With the app or res folder highlighted in the Project explorer use the File or context (often called right-click) menu. Select the New then Android resource file option. Call the new resource customborder.xml:

Add this code for the pop-up window background shape definition. The android:shape is a rectangle:

Add the images for the medals to the project’s res/drawable folders (see medals_png.zip). Now create the winners.xml layout file, again use the New menu and select XML then Layout XML File. A RelativeLayout is used for the Root Tag. Open the file, add the ImageViews for the medals and TextViews for winners names and scores. Here is the code used for the layout used in this example:

Code to Load a Pop-up Window

The code to display the pop-up window will be wrapped in a function called showWinners(). It can be called from a button press or other action. The first code in the function inflates the pop-up window layout using a LayoutInflater :

The inflated layout is used to get the id of the TextViews. The ids are used to set the names of the winners and their scores, e.g. here we assume that the name of the gold medal winner is stored in the string goldWinner:

The pop-up window is created by passing in the layout and required size. We defined a size in the XML which is used here, scaled by the screens density to support different devices:

The button on the pop-up is given an OnClickListener so that the pop-up can be closed (if not familiar with coding event handlers see the article Different Ways to Code Android Event Listeners).

A touch event outside of the pop-up will also close it. The trick here is to call setBackgroundDrawable with a transparent drawable. This allows for screen presses outside of the pop-up to also close the pop-up:

Finally display the pop-up:

Calling the Pop-up Function

The following listing is for a simple Activity with a button that has an OnCLickListener to call the showWinners() function that is described above. The names of the medal winners and there scores are simple variables, in a real app game they would come from the game results. This is the complete code for the example in action shown at the beginning of the article:

Bookmark this page in your browser so that you can use the code as a template for future projects that require a pop-up.

See Also

  • Download the project code for this pop-up example, available in android-pop-up.zip ready for importing into Android Studio
  • For more android example projects see the Android Example Projects page.
  • The medal images are also available via the Free Launcher Icons, Menu Icons and Android Graphics page.
  • View the Tek Eye full Index for other articles.

Author: Daniel S. Fowler Published: 2013-02-05 Updated: 2017-07-23

Do you have a question or comment about this article?

(Alternatively, use the email address at the bottom of the web page.)

↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.

Free Android Projects and Samples:

Источник

Оцените статью