D DKCERT Member Licensed User Longtime User Sep 19, 2011 #1 Is it possible to check if "unknown sources" has been checked (set to true) using B4A code?
moster67 Expert Licensed User Longtime User Sep 19, 2011 #2 It seems like you can verify the status. Look here: Settings.Secure | Android Developers Maybe you can use Agraham's Reflection-library to access it? Upvote 0
It seems like you can verify the status. Look here: Settings.Secure | Android Developers Maybe you can use Agraham's Reflection-library to access it?
bluejay Active Member Licensed User Longtime User Sep 19, 2011 #3 No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay Upvote 0
No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay
D DKCERT Member Licensed User Longtime User Sep 19, 2011 #4 Thanks Moster67, I have this Sub... B4X: Sub GetAndroidId As String Dim p As Phone Return p.GetSettings("android_id") End Sub ... that I changed to this: B4X: Sub GetAndroidUnknownSourceStatus As String Dim p As Phone Return p.GetSettings("install_non_market_apps") End Sub It seems to work Upvote 0
Thanks Moster67, I have this Sub... B4X: Sub GetAndroidId As String Dim p As Phone Return p.GetSettings("android_id") End Sub ... that I changed to this: B4X: Sub GetAndroidUnknownSourceStatus As String Dim p As Phone Return p.GetSettings("install_non_market_apps") End Sub It seems to work
D DKCERT Member Licensed User Longtime User Sep 19, 2011 #5 Argh BlueJay... I had the edit window open and didn't see your post. Thanks a lot - that confirms my own code triggered by Moster67 bluejay said: No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay Click to expand... Upvote 0
Argh BlueJay... I had the edit window open and didn't see your post. Thanks a lot - that confirms my own code triggered by Moster67 bluejay said: No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay Click to expand...
moster67 Expert Licensed User Longtime User Sep 19, 2011 #6 Great! I was not even aware about the GetSettings-method. Thanks. bluejay said: No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay Click to expand... Upvote 0
Great! I was not even aware about the GetSettings-method. Thanks. bluejay said: No need for reflection, just use the phone library ie Dim ph as Phone if ph.GetSettings("install_non_market_apps") = 1 then 'can install from other sources bluejay Click to expand...
youjunjer Member Licensed User Longtime User Apr 18, 2015 #7 This post helps me a lot And if the value is false "cannot install from unknown sources", how to call up the option setup page for user to change this option? DKCERT said: Thanks Moster67, I have this Sub... B4X: Sub GetAndroidId As String Dim p As Phone Return p.GetSettings("android_id") End Sub ... that I changed to this: B4X: Sub GetAndroidUnknownSourceStatus As String Dim p As Phone Return p.GetSettings("install_non_market_apps") End Sub It seems to work Click to expand... Upvote 0
This post helps me a lot And if the value is false "cannot install from unknown sources", how to call up the option setup page for user to change this option? DKCERT said: Thanks Moster67, I have this Sub... B4X: Sub GetAndroidId As String Dim p As Phone Return p.GetSettings("android_id") End Sub ... that I changed to this: B4X: Sub GetAndroidUnknownSourceStatus As String Dim p As Phone Return p.GetSettings("install_non_market_apps") End Sub It seems to work Click to expand...
youjunjer Member Licensed User Longtime User Apr 18, 2015 #8 I got the answer from this post: https://www.b4x.com/android/forum/threads/settings-screen-actions-using-intent.19339/ Upvote 0
I got the answer from this post: https://www.b4x.com/android/forum/threads/settings-screen-actions-using-intent.19339/