1 2 Previous Next 16 Replies Latest reply on Sep 3, 2016 12:55 PM by JoshuaPaul

    IOS Location every 10 seconds

    rmeier

      Hello all

       

      Is there a way with FMGo15 to get Location latitude and longitude faster then currently 60 seconds?

      when i trigger the script every 10 seconds, the value i retrieved directly from the cache. Every 60 seconds I have a new value from my GEO Position.

       

      any ideas?

       

       

      Cheers Rico

        • 1. Re: IOS Location every 10 seconds
          Johan Hedman

          You can use OnTimer Scripts to save your location as often as you like

          • 2. Re: IOS Location every 10 seconds
            rmeier

            hy johan

             

            i do that already. The problem is that the location function return all 60 sec new values.

            i need that faster.., every 10 seconds.

            • 3. Re: IOS Location every 10 seconds
              Johan Hedman

              According to FM15 Help

              FileMaker Pro 15 Help

              It takes different amount of time to ask iOS depending on how close distance you want to get

               

              What if you use Parameter Location (accuracy {; timeout}) Timeout to 10, that would be timeout after 10 seconds

              • 4. Re: IOS Location every 10 seconds
                rmeier

                Thank you, my accuracy is on 100 and my timeout is 2 seconds.

                OnTimer (every 10 sek).

                 

                that should not be the problem..

                • 5. Re: IOS Location every 10 seconds
                  Johan Hedman

                  Test that I let me know what the result is.

                  • 6. Re: IOS Location every 10 seconds
                    rmeier

                    i tested this with timeout 10, no way.. i get only every 60 sec. new values.

                    • 7. Re: IOS Location every 10 seconds
                      Johan Hedman

                      If you higher your accuracy to 500 is it still the same with 60 sec?

                       

                      Otherwise I guess FileMaker Go can not ask iOS for location more then every 60 seconds.

                      • 8. Re: IOS Location every 10 seconds
                        rmeier

                        yes, the same as before.

                         

                        is there another way over Webviewer to get the location faster?

                        • 9. Re: IOS Location every 10 seconds
                          odubov

                          I created a framework for iOS SDK, that tracking location each n seconds (you can set the length of delay)

                          It calls FM script with coordinates as script parameter.

                          Framework is not public yet, if you interested, please pm me.

                           

                          Alexey Dubov

                          2 of 2 people found this helpful
                          • 10. Re: IOS Location every 10 seconds
                            Johan Hedman

                            I guess you could ask Google Maps API and then get information out of your web viewer both not sure if that will be as accurate as iOS

                            • 11. Re: IOS Location every 10 seconds
                              dtcgnet

                              From FMI:

                               

                              Location ( accuracy ; timeout ): Returns and caches the location of a device in the format latitude, longitude. You can use the values that are returned to query map services. Location fetches the location values until timeout. If you cancel the process, FileMaker Go returns the most accurate location in the cache (if any).

                               

                              It sounds like the fetching process is timing out and returning the location from the cache. Increase your timeout value to 10 seconds, because if it is unable to get the location after 2 seconds, it is timing out and returning the value from the cache.

                              • 12. Re: IOS Location every 10 seconds
                                rmeier

                                thats not the problem.

                                Timeout can be 10 or 20 sek, no changes.

                                New Location Values are only al 60sek available.

                                This must be an issue with FMGo and IOS..

                                • 13. Re: IOS Location every 10 seconds
                                  TSGal

                                  rmeier:

                                   

                                  Thank you for your posts.

                                   

                                  I am unable to replicate the issue.  This is what I have done:

                                   

                                  1. In FileMaker Pro 15.0.1, I created a database file with the following two fields:

                                      timestamp (Timestamp)

                                      location (Text)

                                   

                                  2. On the layout, I set the height of the location field to 3 lines.

                                   

                                  3. I created a script "New Record" with the script steps:

                                      New Record/Request

                                      Set Field [ timestamp ; Get ( CurrentTimeStamp ) ]

                                      Set Field [ location ; Location ( 10 ; 5 ) ]

                                      Commit Records/Request [ With dialog: Off ]

                                   

                                  4. On the layout, I placed a button, labeled "Start", to perform Single Step:

                                      Install OnTimer Script [ "New Record" ; Interval: 10 ]

                                   

                                  5. I placed a second button, labeled "Stop", to perform Single Step:

                                      Install OnTimer Script [ ]

                                   

                                  6. Using iTunes, I copied the file over to my iPad 3 (iOS 9.3.5).

                                   

                                  7. After launching FileMaker Go 15 and opening the file, I tapped the "Start" button and walked around my premises.

                                   

                                  Records were being added every 10 seconds and capturing my location.

                                   

                                  Let me know what I am doing differently than you.

                                   

                                  TSGal

                                  FileMaker, Inc.

                                  • 14. Re: IOS Location every 10 seconds
                                    jbante

                                    You can set the timeout as short as you want, and you can call the location values as frequently as you want, but there's nothing we can do to force FileMaker to get a genuinely new location fix like other apps do using the "best for navigation" location settings other apps might be using. I presume this was a decision motivated by saving battery life made without your particular application in mind. All we can do within FileMaker Go is check exactly how old the fix is from the LocationValues function. (See the last section of this blog post.) Your best bet is going through an app that gets you closer to the metal: find an iOS app that does what you want and communicates through URL schemes, or look at Alexey's work.

                                     

                                    Another tack to take: what are you trying to accomplish by sampling location every 10 seconds? Maybe there's something else FileMaker Go can do that can serve the same purpose.

                                    1 2 Previous Next