Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android check if non market apps are allowed programmatically

how can I programmatically check if non market applications are allowed on the android phone?

Thanks

like image 214
sbo Avatar asked Jan 23 '26 11:01

sbo


1 Answers

you can try this, it opens setting screen

check for it

import android.provider.Settings;

int result = Settings.Secure.getInt(getContentResolver(),  Settings.Secure.INSTALL_NON_MARKET_APPS, 0); 

open settings

Intent intentSettings = new Intent();
 intentSettings.setAction(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
 startActivity(intentSettings);
like image 115
Talha Avatar answered Jan 25 '26 00:01

Talha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!