Open sabotah opened 7 years ago
Are you entering and exiting a valid geofence? Thanks, Sean.
yeah, I tried setting it to my location and even using a gps spoofer. just created another clean project, extracted the module clean too - same thing... - using SDK 5.3.0
Just ignore this E/geofence-transitions-service: Geofence transition error: invalid transition type -1. Have you got any entered or exited alerts or notifications?
Often when you first initiate geofencing you will see a [ERROR] : E/geofence-transitions-service: Geofence transition error: invalid transition type -1 [INFO] : I/System.out: Invalid geofence transition type. However, this seems to occur the first time you start but then proceeds to reconnect to the google api client and valid geofencing occurs. Please try to run my updated example.js. I am spoofing the exact location in that file and running the example.js in its own project and successfully entering the fence.
Sorry, I was busy on some other projects, I'm back to this hurdle again. I tried your new example code, same thing - am I meant to setup google API keys or something or should it just work with only the example code?
The last output I get is:
[INFO] : I/System.out: Successful status is: 0 [INFO] : Monitoring regions: {"type":"monitorregions","source":{"bubbleParent":true,"invocationAPIs":[{"namespace":"Googlegeofence","api":"createExample"}],"apiName":"Ti.Module","propertiesDefined":true,"_events":{"enterregions":{},"exitregions":{},"error":{},"removeregions":{},"monitorregions":{}}},"regions":"[{\"center\":{\"latitude\":-31.9077554,\"longitude\":115.8797913},\"identifier\":\"test\",\"radius\":50}]","bubbles":false,"cancelBubble":false}
When it is working, is the Successful status 0?
What version of the titanium SDK are you running it on?
I've tried it on two phones now, with spoofing the example location and also setting the correct location, nothing.
Thanks
a-ha! I set the radius to 1000 and it works... maybe my spoofing app wasnt working I assume radius is in meters?
Now to try and find a module that works for ios, I don't suppose you know of any?
I also need to somehow get it working in conjunction with my other modules that use googleservices.jar..
on a clean project (to try the module while I work out a solution to my jar issue) using the example code, I get this error:
[INFO] : I/System.out: Connected to google api client [INFO] : I/System.out: ATTEMPTING TO start service [INFO] : I/System.out: geoFenceTransitionsIntentService Created [INFO] : I/System.out: Creating geofence transition service [INFO] : I/System.out: Successful status is: 0 [INFO] : Timeline: Timeline: Activity_idle id: android.os.BinderProxy@241a7775 time:1390584578 [INFO] : Timeline: Timeline: Activity_idle id: android.os.BinderProxy@2cd546bf time:1390584578 [ERROR] : E/geofence-transitions-service: Geofence transition error: invalid transition type -1 [INFO] : I/System.out: Invalid geofence transition type