transistorsoft / background-geolocation-console

A field-testing & analysis server for the Background Geolocation plugin
MIT License
151 stars 157 forks source link

org:id undefined device:id undefined #137

Closed etdapt closed 9 months ago

etdapt commented 9 months ago

I have set up my own test server, the on my Flutter app side, I assume I can't call bg.TransistorAuthorizationToken token = await bg.TransistorAuthorizationToken.findOrCreate() and I won't set transistorAuthorizationToken: token in Config because documentation says it will auto config the url to the demo server on transistorsoft.com.

so, I simply added these in my Config :

      url: "http://localhost:9000/locations/COMPANY_NAME",
      params: deviceParams,

so far the test server is getting locations displayed, and I can see org:name is set to COMPANY_NAME, however 1) there are lots of Exceptions telling me org:id and device:id not defined. 2) I don't get any devices listed in the dropdown, so I can't tell which locations are logged by which app instance

I am sure that I have missed something, but I don't know which parameter will take the org:id and device:id when I can't call findOrCreate() and using the transistorAuthorizationToken parameter

etdapt commented 9 months ago

I realized my error was because I should have called findOrCreate and by supplying my server's url as third parameter. There's no need to add params to the Config construct.