vitalidze / traccar-web

Traccar Web UI mod
http://traccar.litvak.su/
151 stars 145 forks source link

About using Geofence api in android #812

Open kc0101 opened 8 years ago

kc0101 commented 8 years ago

Hello, How are you?

I have one question about using Geofence api in Android. Now AddGeofenceApi is as follows.

GeoFence addGeoFence(GeoFence geoFence) throws TraccarException;

In here, I want to know about configuring Geofence class. Now in android geofence is gotten as follows.

Geofence[CIRCLE id:wqeeh4vjc8 transitions:3 41.667947, 123.498446 1234m, resp=0s, dwell=-1ms, @1315491514]

This is parameters that I used and I submitted these as POST method.

geoFence=Geofence[CIRCLE id:wqeeh4vjc8 transitions:3 41.667947, 123.498446 1234m, resp=0s, dwell=-1ms, @1315491514]

When submitting this api to server, I got 500 server error. Please let me know what kind of values should be submitted to Geofence parameter.

It will be appreciate if you send me sample data for using this api.

Thanks.

vitalidze commented 8 years ago

I have no idea what are you talking about, what are all these geo-fences. You can use search for an answers about managing geo-fences through the API: https://github.com/vitalidze/traccar-web/search?q=geofence&type=Issues&utf8=%E2%9C%93

kc0101 commented 8 years ago

Hello, Good day!

I have some questions about using Geofence api such as Geofence add, remove, update.

GeoFence addGeoFence(GeoFence geoFence) throws TraccarException; GeoFence updateGeoFence(GeoFence geoFence) throws TraccarException; GeoFence removeGeoFence(GeoFence geoFence);

When using these apis, I should submit parameter geofence, but I am not sure what value should be submitted in that parameter.

Now I am going to use these apis in Android. It would be appreciate if you send me geofence parameter using example.

I lookforward your kindly explanation.

vitalidze commented 8 years ago

This should be a JSON object representing the GeoFence class in java with same field names. This will be similar to the Device class.