Isac Active Member Licensed User Longtime User Jan 15, 2015 #1 I do not understand why not detect that the sensor does not exist. I tried to use it on a mobile phone without light sensor but warns me. Code: Copy p.Initialize(p.TYPE_LIGHT) a.StartListening("a") If p.StartListening("p") = False Then Msgbox("Your device does not have the sensor","Warning") Return End If thank you all
I do not understand why not detect that the sensor does not exist. I tried to use it on a mobile phone without light sensor but warns me. Code: Copy p.Initialize(p.TYPE_LIGHT) a.StartListening("a") If p.StartListening("p") = False Then Msgbox("Your device does not have the sensor","Warning") Return End If thank you all
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2015 #2 I'm not sure that I understand the question. Did you see the warning or not? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2015 #4 According to the native API this method should only return true if the sensor is supported and enabled. Apparently your device doesn't return the "correct" result. Upvote 0
According to the native API this method should only return true if the sensor is supported and enabled. Apparently your device doesn't return the "correct" result.