SeanChristopherConway / titanium-google-geofence

Android Geofencing module using the latest google geofencing library. The library uses eventbus for event handling between classes. Please refer to this post for JAR issues: https://medium.com/all-titanium/deal-with-titanium-modules-and-its-missing-support-for-android-multidex-546de5486d13#.mpoytsnmp If you are having issues when dexing and are using An appcelerator version less than 5.4.0.GA in a module then please refer to this JIRA ticket, particularly my Sean Conway comments: https://jira.appcelerator.org/browse/TIMOB-23502
Other
5 stars 3 forks source link

Geofence transition error: invalid transition type -1 #4

Open sabotah opened 7 years ago

sabotah commented 7 years ago

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

SeanChristopherConway commented 7 years ago

Are you entering and exiting a valid geofence? Thanks, Sean.

sabotah commented 7 years ago

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

SeanChristopherConway commented 7 years ago

Just ignore this E/geofence-transitions-service: Geofence transition error: invalid transition type -1. Have you got any entered or exited alerts or notifications?

SeanChristopherConway commented 7 years ago

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.

sabotah commented 7 years ago

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

sabotah commented 7 years ago

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..