2016년 11월 29일 화요일

location sensor does not work without active data connection


I developed a app that uses the geolocation sensor "location sensor"
but unless the Active DATA CONNECTION IS NOT found the GPS Position What I mean And that only with the GPS function without Active GPS data Position the Restored IS PROPERLY not, any of you can tell me why it does not work without CONNECTION data?

-- 
How to use the LocationSensor is described here:

Exploring with Location Sensor in AI2
The location sensor object is used to communicate with the global positioning satellite receiver (GPS) in your phone/tablet. When the LocationSensor communicates with the built-in GPS receiver, the GPS can determine the location of your device.  The sensor can also work with network/wifi location services.  Finding a location using the network uses very different techniques to determine a location. Location means, the device's present latitude and longitude or it can mean your street address.

Have you read the description of the tool?  Did you do the two tutorial Projects?    If you haven't done so, doing the tutorial might help you fix your issue.

You did not post an image of your blocks so it is difficult to provide suggestions that might solve your issue.   Are you trying to get the LocationSensor to work without the GPS, using only a data connection or what.    Are you testing on a phone with a data connection turned on? Are you testing in a room with little or no data or GPS connectivity?  What error messages do you get?

If you make a small Project showing what you think is not working, someone can provide some advice.  Post an image and the aia.   Ordinarily the LocationSensor works very well and is designed to work with GPS AND cell phone towers.   If you are getting erroneous 'locations' using data, it may be that the cell system is able to provide sufficient resolution (see the tutorial as to the precision of using GPS vs WIFI etc. data location.

Regards,
Steve

-- 
You're right I have given little information in order to merit the problem, then I answer your questions below To:
I am attaching pictures of the code and settings of controll "position sensor"
My phone and an LG G3 equipped with GPS Receiver
GPS is already active WHEN APRO the Application
SE use SECTOR Even CONNECTION Data The event "location.changed" IS PROPERLY generator and returns me the position without WHILE CONNECTION Data The event is not an IS generatoe Times the Application LOCKS Even
The application I tried OUTDOORS AND Otherwise normal That the GPS does not receive the signal, do not I get no error message simply the "location.changed" event does COMES generator and a Times app LOCKS
mit1.JPG 표시 중
mit2.JPG 표시 중

-- 
Thank you, the images helped.

1.)  The CurrentAddress LocationSensor blocks ONLY work if your device is connected with WIFI or a Mobil Network.
2).  A no address available message results if there is no wifi or data connection  OR  if the geolocation service does not have an available address, possibly in a rural area .
You may have to ensure location services are turned on. Depending on the Android operating system on your phone you may have to go to  Settings > Location and ensure that Location Access is turned on and switched to High Accuracy. If you do receive an address  the address reported may not always be of the house where the device is or the address might not always be available from the provider available.

3) Use the get latitude or get longitude block  in the LocationChanged block to get your location in geocoordinates whenever you are only using the GPS receiver.  If not connected to the Internet, the CurrentAddress block is useless however the device will report changes in latitude and longitude.  Your example does not do that.

4.) Your example sampling  time is set as 1000 ms. Sampling every second is generally not practical.  When first turned on it is normal for the GPS to take 20 to 30 seconds or more to initialize and obtain a satellite fix.  Set at 1000 you may be giving the device a "heart attack" of sorts. Your device may never get a satellite fix and the "location will not change".  Note, you call the CurrentAddress block in your ScreenInitialize block and the object will fire every second.   Perhaps do not do that.    Part of the issue may be that you are not providing sufficient time for the GPS to achieve a satellite fix.  

Once again, I recommend you read and tryout the examples in the MIT LocationSensor tutorial. Have you done that?

Regards,
Steve

-- 

댓글 없음:

댓글 쓰기