playMaker

Author Topic: [SOLVED] "Get Location Info" does not work  (Read 2516 times)

drown

  • Junior Playmaker
  • **
  • Posts: 58
[SOLVED] "Get Location Info" does not work
« on: November 17, 2016, 05:19:56 PM »
Hello Playmaker Community!

I am working on an app that is based on GPS location and uses http://geojson.io/ to determinate wether the user is in a designated area or not.

The core functionlaity of this project heavily depends on "Location Info" , therefore the action "Device/Get Location Info" is used to detect the Latitude and Longitude.

I start with an init state that starts the location service. I want it to try for 30 seconds - if it fails it pauses and restarts the initialization. This is the State that is supposed to do it :



The problem is that the State instantly triggers the "Location Services Failed" transition. I tried it with a GPS faker, ran it via Unity Remote 5 on a Lolipop Android device and built the app and gave it permission to use the Location services - to no avail.

The next step would be to save the Location info and sync it to geojson and detect if they match a certain area - but it never reaches this state :



I am desperately trying to figure out what could be causing it - I tried the updated actions i found on the forum somewhere (a 2013 post) , but I doubt that they are not updated in the Playmaker 1.8.3 I am using in my project.

Am I missing something Action-wise ? Or is it some project setting I am missing out on ?

Any kind of help would be greatly appreciated!
Best Regards
Alex
« Last Edit: November 18, 2016, 12:24:47 PM by drown »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Android] "Get Location Info" does not work
« Reply #1 on: November 18, 2016, 02:17:38 AM »
Hi,

 Difficult to say without looking at your state actions.

 maybe you can pm me with this scene and instructions and I'll have a look.

 Bye,

 Jean

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: [Android] "Get Location Info" does not work
« Reply #2 on: November 18, 2016, 09:57:18 AM »
They are on the screenshots but they dont show on this forum since they are wider than the board's width  :P .

The actions are really just "Startup Location Services" and "Get Location Info".

If that does not help I will pack up the project once I am at home. Thanks in advance!

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: [Android] "Get Location Info" does not work
« Reply #3 on: November 18, 2016, 12:24:31 PM »
Oh wow. I solved it. I treated the "Get Location" function as a function that auto updates. What a stupid mistake. Sorry for the bothering, it now works perfectly fine!