6

The Android default browser allows anonymous browsing. Is it possible to detect when the user is browsing in an incognito tab of the default Android browser application? (I have no interest in the url the user is visiting)

I am using a Content Observer object to receive updates on the user browsing history. When the user opens an Incognito tab, I don't receive any update, as anyone would expect. What I was wondering is how could I know that the user is browsing anonymously.

I can know that the Browser app is on foreground, and I know that no history url is being registered, but what other information could I retrieve to be sure the user is browsing in an incognito tab?

UPDATE:

Guys, thank you for your comments. I know exactly what I am asking. I know the point of incognito mode and that only the default Browser uses the ContentProvider for logging the browsing history.

I am writing a parental control app, so I would very much appreciate if anyone could answer the question.

10
  • 4
    Why would the user of the device want you to know this? Jan 17, 2013 at 13:45
  • The whole POINT of incognito mode is that nothing gets logged or exposed to anyone or anything.
    – darryn.ten
    Jan 17, 2013 at 13:57
  • @darryn.ten I know that. I think that was clear in my question, thanks.
    – Xavi Gil
    Jan 17, 2013 at 14:02
  • So why would you want to know, or, for that matter, even care if the user is browsing incognito?
    – darryn.ten
    Jan 17, 2013 at 14:04
  • 2
    Beyond "do not write a 'parental control app'", I have no suggestions. Most likely, you have no way of telling if the user is in an incognito activity or any other activity (e.g., settings). Also, bear in mind that there are multiple "default Browser" apps. Presumably, you are thinking of the AOSP Browser app. Many devices replace this with something else. Jan 17, 2013 at 14:26

1 Answer 1

2
+50

Might not be the ideal solution but you can go with the keyboard.

If you know that the Browser app is on foreground, no history url is being registered, but keys are being pressed, something is happening.

Maybe you can write your own keyobard app, and ship it with your parental control. If that's not an option:

How to detect if soft keyboard is on the screen

and

Detecting if keys are pressed

EDIT

Going for that you can also check the network traffic. If the browser is there with the keyboard on, but there is no traffic than you are probably safe!

5
  • this question hasn't received too much support so thanks for the answer :) I like the approach, if the keyboard is being used and the Browser is on foreground + no history registered, that could mean the user is browsing in incognito mode. I will think about that and maybe I can use that at least as an alert to the father. Let's see if anybody comes up with something else. Thanks again!
    – Xavi Gil
    Jan 21, 2013 at 14:21
  • 4
    People are too quick to judge without giving it the proper thought. Jan 21, 2013 at 17:48
  • Definitively, this seems to be the best approach: Browser in foreground + no history registered + there is some Browser network activity. It is not 100% accurate though, as the user could be streaming video and that could meet the former conditions. Thanks @gameower
    – Xavi Gil
    Jan 25, 2013 at 9:05
  • To be honest that shouldn't be an issue. 99% of the time if someone is streaming video or audio besides getting way more traffic the browser will not be in the foreground. I've never watched any video in my browser, as it always give me the option to open in my favorite media player. If you find out any cases which this solution does not cover, please update this post. I'm very interested in how reliable this approach is! Jan 25, 2013 at 9:39
  • @ caiocpricci2 nice approach .................. but How can I detect keyboard in browser applications like chrome etc. how network traffic can help ? i have implemented. I have only getting Chrome for both browsing non-incognito and incognito. Sep 1, 2015 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.