-2

I am building an operating system for children; the app is a launcher. From this app, children are allowed to use 3rd party apps, except requirements are that the ads should be blocked because some ads are inappropriate for our 3-5 year old targeted audience. Without actually owning these 3rd party apps, I have not thought of too many options for accomplishing this. The only thing I could think of is to turn off network connection while using these apps. Without a network connection, these 3rd party apps will not be able to display their ads. However, I see a huge drawback to this solution. Many (dare I say most) apps are meant to work with an active network connection, and without one these apps do not function.

Can you think of a better way of doing this? Is there a library that exists that I do not know of, or method for doing this that you can enlighten me on?

Thank you in advance.

portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136
  • Can I ask why the down vote? – portfoliobuilder Oct 16 '14 at 15:57
  • 2
    Because you try to destroy the effort other developer ? – Stephane Mathis Oct 16 '14 at 16:02
  • 2
    No, that isn't the intent at all. It is to protect 3 year old children from seeing gaming ads of the elf girl with large breasts and skimpy clothes. I do not think that is fair reason to downvote my post on a legitimate technical question. – portfoliobuilder Oct 16 '14 at 16:04
  • Use AdAway. You'll need root permissions. So you can block **all malwares**. – Phantômaxx Oct 16 '14 at 16:06
  • So, suggestion is to add AdAway using root permissions. And then inside of my launcher application, send user to Settings so that they can toggle with AdAway features? How reliable is this, because if software is not updated or stops working then this ad blocking feature on my operating system becomes useless as well. Anything I can do programmatically? – portfoliobuilder Oct 16 '14 at 16:09
  • 1
    Nothing that I'm aware of. MAybe, you can simulate AdAway's behaviour by altering the hosts file. There you set the malicious software link to point to **127.0.0.1**. Reboot required, I guess. There's a command like **shutdown -r** or something like that (maybe **reboot -f**) – Phantômaxx Oct 16 '14 at 16:22
  • 1
    It might also be bad to interfere with other apps behavior (it wasn't me who downvoted). There is also AdFree (http://adfree.bigtincan.com/), you launch the app and can install the new known server urls. But you might need to do that every once in a while, and it is not bullet proof. Root also required. – Stephane Mathis Oct 16 '14 at 16:34
  • Ok thank you Funkystein and Stephane. I will take these suggestions into consideration and update on how things are working. +1 for response. – portfoliobuilder Oct 16 '14 at 16:35
  • 1
    So for blocking adult ads, you are going to block all the ads? How will you distinguish between ads? – Confuse Oct 17 '14 at 08:40
  • I have not figured that out. – portfoliobuilder Oct 17 '14 at 19:38

1 Answers1

1

I have found possible solution to this for other developers building operating systems for children. Adblockplusandroid is pretty useful, there is no root required.

https://github.com/adblockplus/adblockplusandroid

Additionally, there are some ways of changing/setting Proxy using Wificonfiguration like

WifiConfiguration config = new WifiConfiguration(configuration);
      config.ipAssignment = WifiConfiguration.IpAssignment.UNASSIGNED;
      config.proxySettings = WifiConfiguration.ProxySettings.STATIC;
      config.linkProperties.clear();

      config.linkProperties.setHttpProxy(new ProxyProperties("127.0.0.1", port, ""));

127.0.0.1 targets ads.

portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136