Location Sensor on the Building (scan a QR code; enter it into GoogleSheet if not already there)

Hello, i'm newbie and i have a problem with Location Sensor ( get data latitude and longitude )
i have a project, when user scan qr barcode on location A (on the building), data from the barcode automatically input to google spreadsheet, and its successfully, but if the same barcode, scan on the other location, i want to appear error message, and i'm trying use Location Sensor, but latitude and longitude doest appear, maybe because, the location on the building...

can you help me for that problem ? thanks.

The gps hardware receiver frequently cannot receive the satellite signals it needs to determine where it is (its coordinates) when inside a building or in some locations like a city with tall buildings. The Using the Location Sensor tutorial explains why and how the gps receiver works.

Do the barcodes represent the building's latitude/longitude? Seldom will a published geocoordinate be exactly the same as a barcode on a building's coordinates due to the fact that a gps does not know exactly where it is located. A way to determine whether the Android is close to the bar code coordinates is not to compare exact coordinates. Instead, to calculate the distance between the coordinates on the bar code and the latitude/longitude reported by the gps. See the discussion of Accuracy in the tutorial. If the distance is small, for practical purposes, you should be deemed to have arrived.

Does this explanation help Nicholas?

thanks Mr. SteveJG for the respon

the qr code doesn't represent building's latitude/longitude, the qr code just represent location code, if i'm cannot use latitude/longitude for that problem, how can i handle the problem ? the qr code on the building so data like latitude/longitude or accuracy doesnt appear.

Thanks Mr. SteveJG

Sorry, I do not know Nicholas. I do not understand your question.

"The qr code just represents location code:, what does that mean?
Are you scanning QR codes, then entering the 'location code' into a GoogleSpread sheet if that code is not already in the sheet. You might give an example.

Post the Blocks you tried so that someone will understand what you are doing and want to happen. If you just want to enter the QR code into a GoogleSpread sheet data base, you don't need a LocationSensor unless you also want to record the latitude/longitude of the QR code on the building.

This might be part of what you want to do METRIC RAT AI2 - Query Any Google Sheet with a Web App

The QR Code like as QR Guard Patrol or QE Checkpoint, on condition if security staff scan the qr, data automatic input to google spreadsheet, and from qr to spreadsheet is already success, but i have a problem if security not scan qr in checkpoint location, but he is scan qr on the other location, data still automatic input to spreadsheet, so i thinks its need geotagging with latitue/longitude