0

I'm creating my own app store for Android, and would like to install some apps by this store, but after apk is downloaded and I try to install it, the unknown sources popup is showed.

I really do not want to show it to my user, or just show by my own, I mean, show a nice popup.

Is it possible?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • To install an apk from anywhere else than the Play Store, you have to enable `System Settings/Security/Unknown Origins` – Phantômaxx Feb 06 '15 at 11:23
  • Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on [so]. See "[Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts). BTW, it's "Thanks in advance", not "Thanks in advanced". – John Saunders Feb 07 '15 at 05:17
  • OK Jhon, I did'n t know that – Guilherme Gotardo Feb 08 '15 at 10:37

1 Answers1

0

Yes it is. Take a look at Programatically find whether installing from unknown sources is allowed. There is even given a piece of code.

Then you can redirect the user to the setting page:

startActivity(new Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS));

But setting that system flag without root access is not possible.

Community
  • 1
  • 1
peter
  • 55
  • 7
  • Thanks man, I do not would like to leave my app to install the apk. But I can't ensure root access. – Guilherme Gotardo Feb 06 '15 at 12:30
  • But you could check that flag on the first start if your market application, show a dialog like "Using this store requires unknown sources to be enabled. Do you want do be redirected?". Then the setting is set and it does not has to be shown everytime. – peter Feb 06 '15 at 13:05
  • Yes peter, that's exactly what I'm going to do :) – Guilherme Gotardo Feb 08 '15 at 10:36