I'd like help.The attached program will stop midway.Indicated by a program that the message is received, but will not start the LocationSensor, only when I step the program. Then sends the message.
Reading SMS, Send SMS, Positioning enabled in phone.
Reading SMS, Send SMS, Positioning enabled in phone.
--
it takes a few seconds until the location is available make sure to enable GPS then after a few seconds you should see gps inthe AvailableProviders property now set the ProviderName to gps and set ProviderLocked to true
this should give you the best result, assuming you are outside of a building and have a good gps signal...
--
Thanks for quick you answer.Sadly, I waited a long time, but it does not start with the GPS search.
When I enter the program will start immediately with the GPS search.The program is well written?
When I enter the program will start immediately with the GPS search.The program is well written?
--
Here is how the LocationSensor works
-- 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.
|
Are you showing all your blocks? I do not see a LocationSensor.LocationChanged block in your project. Did you place a LocationSensor control on the Designer screen?
When you read Exploring with Location Sensor in AI2 there is a section on how the internal GPS on your device gets a satellite fix. When first turned on, it may take 20 to 30 seconds to get a fix. A subsequent fix will usually be possible within 5 to 10 seconds depending on your hardware and where you are located and other factors.
When first turned on, before getting a fix, the locationsensor has a default latitude/longitude of 0,0 . You know the GPS has a satellite fix when these are not zero.
To give the LocationSensor time to acquire the required satellites, you might include a Clock in your code to provide up to perhaps 30 seconds delay.
Be aware HasLongitudeLatitude
If true, Android device can report longitude and latitude it does not mean it has a satellite fix, all it means is the device is capable of reporting latitude and longitude. To actually get a latitude/longitude yu nee to use the LocationChanged event.
All block I showed. Yes there is LocationSensor control on the Designer screen. The problem is not the GPS.The problem is that on received message does not run "Message.Received". Only if I enter into the program.
--
Message>>ReceivingEnabled>>Always, but not so function.
--
댓글 없음:
댓글 쓰기