I need to find whether the current Android device allows to install apps from sources other than the market. This option appears in the settings UI under Applications named "Unknown sources".
The setting basically allows you to download and install APKs that did not originate from the Google app market.
How do I check whether this flag is on or off using code?
Here is the code that uses the mentioned setting:
Also showing the setting to user might me useful:
This setting is called "INSTALL_NON_MARKET_APP" (click for documentation).
(I basically already typed the question when I found the answer hidden deep within documentation, with a different name, so I decided to post the question and self answer, since it's not trivial.)