Traccar client

Traccar client

Simple Ionic Traccar client app

$10.00

Not yet rated
Jose Fernandez

Jose Fernandez

Member since 2017

Details

Version:
1.0
Size:
3mb
Ionic:
3.x
Platforms:
iOS, Android, Windows Phone
View ID:
a3914a24
Released:
2 years ago
Updated:
7 months ago
Category:
Starters
Tags:
traccar, ionic, provider, api, gps

Attention! ‚ö†

This app is currently no longer being maintained, being superseded by a more modern an up to date version that you can find here

The Ionic Traccar Starter ūüéģ

See it in action! --> https://www.youtube.com/watch?v=ikBoXNjXmUM&t

This is a very basic starter, based on Ionic Super Starter, that demonstrates how to make use of the Traccar APIs in an Ionic application. It also shows how you can integrate integrate a native Google map where you can draw the position of your vehicles and perform further actions.

All the different endpoints/functions of the Traccar API are available, but for simplicity, the Starter contains examples of the most common functions:

  • How to Login into the platform and verify the credentials
  • How to create a new User
  • How to get the list of all devices and their last position to locate them on the map
  • How to perform a POST request to create new devices
  • How to retrieve the list of the user devices
  • How to delete a device
  • How to retrieve and edit the user basic info (name, email, password).
  • how to handle possible errors during login or during the app operation using an HTTP interceptor

You can set up the URL of your own Traccar server during the app initialization if you would like to test it with your platform. By default, the app connects to one of the Traccar demo servers (http://demo.traccar.org/api)

In order for the maps to work correctly, you will need to create your own Google maps API key. This is a pretty simple process and you can create one for free. Check the "using the map" section for specific details.

All the files of the project are included in this download, so you are free to make any changes in the code, add/remove functionality, etc. Or just add your own logo/company name in the app and you are good to go.

How to use

Since the app is making use of a native cordova plugin, you will not be able to use "ionic serve", but you can still test it on a browser:

Unzip *.zip file

$ cd traccar-client
$ ionic cordova run browser

(On mac, I have sometimes to use sudo)

If you would like to make a build for android, just:

$ ionic cordova platform add android
$ ionic cordova build android

(On mac, I have sometimes to use sudo)

Api

A special provider was created to host all the Traccar API functionality. Just add the provider in any of your pages to make use of any of the Traccar endpoints. Check out the already created pages for examples.

Using the map

The application makes use of the plugin cordova-plugin-googlemaps which requires a google maps API key to work. For information on how to get your own API key, please follow the instructions provided here. Once you have your own API key, copy & paste it in the corresponding section within cordova-plugin-googlemaps in the config.xml file

Adding Languages

The Starter comes with internationalization (i18n) out of the box with ngx-translate. This makes it easy to change the text used in the app by modifying only one file.

To add new languages, add new files to the src/assets/i18n directory, following the pattern of LANGCODE.json where LANGCODE is the language/locale code (ex: en/gb/de/es/etc.).

Changing the Language

To change the language of the app, edit src/app/app.component.ts and modify translate.use('en') to use the LANGCODE from src/assets/i18n/

Hey there! You'll need to log in before you can leave a comment here.

Jeisson Sanchez

Jeisson Sanchez   ·   2 years ago

Hola Cordial Saludo, el mapa esta integrado a la aplicación?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hola Jeisson, No he incluido ningun plugin de cordova (como maps) en este caso, por varias razones: Para que la app pueda correrse en un explorador Anadir el map requiere que el usuario incluya su api key de google a la hora de incluir el plugin Sin embargo no seria nada dificil de agregar. Una vez incluido puedes usar la libreria para hacer un llamado al metodo #positionsGet que te retorna un array con la ultima posicion de cada equipo que el usuario tiene agregado Si gustas, podriamos negociar mis servicios para que lo adapte a tu caso en particular

Jeisson Sanchez

Jeisson Sanchez   ·   2 years ago

Tienes un correo donde nos podamos escribir, Gracias

Jose Fernandez

Jose Fernandez   ·   2 years ago

claro, mi correo es josefd8@gmail.com.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi mate, I'm having issues with the Google Map API, I've just checked many times it's set up correctly, no restrictions were created and I've added my billing card as well. But I'm still getting the following error messages You have exceeded your request quota for this API. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors _.Oc @ js:51 util.js:219 Google Maps JavaScript API warning: NoApiKeys. Any idea ? Cheers

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello! I'm pretty sure you can use the API without having to submit any credit card information. This API have a free daily quota which is usually more than enough for a personal project. Try to create a new API key (remove the one you already have) and try again. One of the users of this project reported a problem he had (the map did not showed up) but I believe it was a problem with the version of cordova he had installed (he downgraded cordova and that was it) probably your problem may be similar. Sorry I can not give you that much help :( I'm don't really feel capable of giving you support about the plugin itself, but only about this particular project

Harlem

Harlem   ·   2 years ago

By the version of Cordova you mean the version of the Ionic Cli ? Mine is CLI 4.11.0 right now.

Jose Fernandez

Jose Fernandez   ·   2 years ago

As I understand, cordova is a different component. He told me he downgraded from version 9 to version 8

Harlem

Harlem   ·   2 years ago

Ok it worked I'll leave it here in case someone else needs it Cordova Version 8, and I've added this code snippet Environment.setEnv({ // api key for server 'API_KEY_FOR_BROWSER_RELEASE': 'API_KEY_FOR_BROWSER_RELEASE', // api key for local development 'API_KEY_FOR_BROWSER_DEBUG': 'API_KEY_FOR_BROWSER_DEBUG' }); Replaced with my API key and it worked.

Harlem

Harlem   ·   2 years ago

Ok it worked I'll leave it here in case someone else needs it Cordova Version 8, and I've added this code snippet Environment.setEnv({ // api key for server 'API_KEY_FOR_BROWSER_RELEASE': 'API_KEY_FOR_BROWSER_RELEASE', // api key for local development 'API_KEY_FOR_BROWSER_DEBUG': 'API_KEY_FOR_BROWSER_DEBUG' }); Replaced with my API key and it worked.

Jose Fernandez

Jose Fernandez   ·   2 years ago

That's awesome! Thanks for sharing ;)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi Jose, how do I get positions of devices belonging to one specific category only on the map page ?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Harlem, Well, the program supports all the different endpoints described in the API documentation fro traccar: https://www.traccar.org/api-reference/ So if there is an endpoint for exactly that functionality, it should be listed there. I recommend you that if you are unsure how to perform this, you could try to replicate what you are trying to do in the web application and check via the browser console what are the API calls performed in the background. Probably you will have to use more than one API call to get what you want

Harlem

Harlem   ·   2 years ago

Hi Jose, I've managed to get the list of devices that I want to their position to show on the map. this.devices.forEach((device) => { if (device.status === 'online') { availableScootersIds.push('id='+device.id); } }); devicesIds = availableScootersIds.join("&"); But when I'm trying to use it as paremeters it looks like this api/positions?id=id=1%26id=4%26id=5 How can I pass ampersand(&) with the parameters in Angular ? Thank you

Harlem

Harlem   ·   2 years ago

Found it id.forEach((deviceId) => { console.log(deviceId.id); queryParameters = queryParameters.append('id', <any>deviceId.id); });

Jose Fernandez

Jose Fernandez   ·   2 years ago

hahaha glad to hear that :)

Harlem

Harlem   ·   2 years ago

Hi Jose, what's your email I have a few questions thanks.

Jose Fernandez

Jose Fernandez   ·   2 years ago

My email is josefd8@gmail.com

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Francisco Gustavo de Sousa Santos

Francisco Gustavo de Sousa Santos   ·   2 years ago

Good morning, where exactly do I put the keymap google? please send me the excerpt in config.xml that I put the key

Jose Fernandez

Jose Fernandez   ·   2 years ago

hello francisco, Please, fiind this section in the config.xml file <plugin name="cordova-plugin-googlemaps" spec="2.4.6"> <variable name="API_KEY_FOR_ANDROID" value="YOUR_API_KEY_HERE" /> <variable name="API_KEY_FOR_IOS" value="YOUR_API_KEY_HERE" /> <variable name="PLAY_SERVICES_VERSION" value="15.0.1" /> <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" /> </plugin> replace the "YOUR_API_KEY_HERE" with your API key

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Francisco Gustavo de Sousa Santos

Francisco Gustavo de Sousa Santos   ·   2 years ago

I put the key, but the map opens as in the image - http://207.180.217.117/teste.png

Jose Fernandez

Jose Fernandez   ·   2 years ago

As I see you are running the app on a browser and the map plugin that is used in the project is the native SDK plugin, designed to be running on mobile (I believe your problem is that is in fallback mode). Once you generate the android/ios app, you should not see that error

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Franciasco. Could you fix the problem you were having?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi Jose, do you know how I can show geofences zones on the map ? I mean do I need the cordova geofences plugin ? Because it's breaking my build. Thank you.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello Harlem, I believe the cordova geofence plugin is for triggering actions and monitor circular geofences in the device. I assume that what you really want is to show the traccar geofences in the map, correct? If this is what you want, there is and endpoint in the traccar API to get the geofences, and after that you could just draw them in the map using the google maps API (there are several functions for drawing regions in google maps). The way geofences work in traccar (as I understand them), is that the geofence must be configured in the traccar server, and is the traccar server the responsible for firing an alert/email/sms if any given device send a report inside/outside that geofence

Harlem

Harlem   ·   2 years ago

Hi Jose thank you for your quick reply, could you guide to one these functions for drawing regions ? I've also sent you an email, which is contains the same question. If it's something you could help me achieve, let me know what your fees are by email thank you.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Sure, This is the link to get all geofences from your traccar server https://www.traccar.org/api-reference/#operation--geofences-get And then, depending on the shape of your geofence (regular, or multiline) you could use circle class (https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/circle/README.md) or the polygon class (https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/polygon/README.md) from google maps API I remember to use them once, but it was a long time ago so probably some things have changed by now

Harlem

Harlem   ·   2 years ago

Hi Jose, thank you for the links I've managed to get the geofences with circles to work, I'm stuck with the polygons ones. I need someone with better skills to help me out, I can pay. Can you help me out ?

Harlem

Harlem   ·   2 years ago

I'm getting this as the value of area: POLYGON((59.91800096001387 10.766295516397868, 59.92008005535203 10.769876975862042, 59.92108932835282 10.770989177301486, 59.92092859914192 10.773374832565004, 59.91670447578136 10.773119106471876, 59.915220975177306 10.770010274382246, 59.91800096001387 10.766295516397868))

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Harlem! Yeah, that looks like a valid geofence in traccar. What exactly are you trying to do? creating new geofences in the app and using the API to POST then to traccar?

Harlem

Harlem   ·   2 years ago

I'm trying to use that information as options to render multiple polygons on the map in the ionic app. Like on this example here. let GORYOKAKU_POINTS: ILatLng[] = [ {lat: 59.91800096001387, lng: 10.766295516397868}, {lat: 59.92008005535203, lng: 10.769876975862042}, {lat: 59.92108932835282, lng: 10.769876975862042}, {lat: 59.92108932835282, lng: 10.770989177301486}, {lat: 59.92092859914192, lng: 10.773374832565004}, {lat: 59.91670447578136, lng: 10.773119106471876}, {lat: 59.915220975177306, lng: 10.770010274382246}, {lat: 59.91800096001387, lng: 10.766295516397868} ]; let polygonOptions: PolygonOptions = { points: GORYOKAKU_POINTS, strokeColor : '#880000', fillColor : 'rgba(136, 0, 0, 0.4)', strokeWidth: 3, clickable: true }; After some string manipulation (replace, split) I've managed to make it look like this 0: "59.93033221502145 10.736312566620624" 1: " 59.93126823947952 10.739389385034407" 2: " 59.93032167711175 10.74246062690402" 3: " 59.928103133085784 10.73901288863796" 4: " 59.92783128357863 10.734413036346213" 5: " 59.929217972199666 10.732650529728573" 6: " 59.93033221502145 10.736312566620624" but I'm stuck now

Harlem

Harlem   ·   2 years ago

here is the example I'm following, https://github.com/ionic-team/ionic-native-google-maps/tree/master/documents/polygonoptions

Jose Fernandez

Jose Fernandez   ·   2 years ago

And what is exactly your problem? the polygon is not visible??

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi I have 2 questions before buying, 1) Can we change the app icon 2) Does it work for OpenStreet Map?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi; 1) Can we change the app icon? R: Yes, of course, this is just like any other regular ionic project, you are free to change icons, images, etc 2) Does it work for OpenStreet Map? R: I'm really not sure about this one. In the project, I use the google maps specific plugin for ionic, so my educated guess is that if there is one for OpenStreetMap this should be perfectly possible, although you will have to adapt the functionality for this plugin API

XYZ

XYZ   ·   2 years ago

Hi Jose, I am new to ionic, but found this https://www.javascripttuts.com/using-leaflet-open-street-map-in-an-ionic-application-in-one-go/ for my query, can this solve the OpenstreetMap Issue of mine? Can you help in getting OpenStreetMap into your app...

Jose Fernandez

Jose Fernandez   ·   2 years ago

I, unfortunately, cannot provide you with clear instructions about how to use OpenStreetMaps because I have never done it myself, but with a google search I did found some very comprehensible manuals. Check this one out https://tphangout.com/ionic-3-leaflet-maps-geolocation-markers/. What's exactly the problem you are having? OpenStreetMaps is another good map alternative, I just decided to just go with google maps because it was very well maintained and there was plenty of info available online

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Can the language of the app be changed programmatically/during runtime?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed. As far as I understand, you set the default language in the app.componets file, but this is not static. And the language the app is displayed depends on the language the user has set the phone itself. So if the Zone/region and default language of the phone is set to, lets say, the USA, the app will be displayed in English, or if the zone/region and language of the phone is set to Italy, the app should be displayed in Italian (assuming the file with correct translations for that language exists). I would say that changing the app language at runtime is possible but I'm afraid I can not give you exact instructions on this. This question is most likely answered in the ionic help forums

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Irfan Md

Irfan Md   ·   2 years ago

Hi. I thought this app will work similar to Traccar Client for Android which sends the location details at intervals and track the entry and exit from geofences. But I couldn't found that anywhere here. Did I missed anything? Or can we build similar specifications in the app, other what we have in this app?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello Irfan, Yes, you are correct. probably the name of the app can be confusing for some. Unlike the traccar client app (which is developed by the traccar team itself) this app is more like a REST API client: it shows how to connect and authenticate against the traccar server and perform different actions using its endpoints (with the API you could basically do all the same operations you would on the web interface) and this app is aimed to those who wish to create their own tracking app. You could certainly build a similar traccar client app that the one that is produced by the traccar team (an app that sends the phone's location at regular intervals to the server). However, you have a couple of constraints. First, the latests version of Android will require the app to have a constant icon in the notification area to avoid the OS from killing the background tracking process. And second, there is a Cordova plugin for background tracking, but the format of the packages it sends are not compatible with any GPS model currently supported by traccar (so you will have to implement this functionality at the server-side)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Can you explain how authentication works? when the app first bootstraps how does the app check whether the user is authenticated or not

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed, Once the user logs in, the credentials are stored in the Ionic storage engine , and every time the app starts, it first verifies if this credentials exists. If they do, the app tries to call a devicesGet endpoint just to verify if the credentials are valid. If the response is other than 200, the splash screen is hidden and the user is redirected to the login screen. Also, the app counts with an HTTP interceptor that intercepts the http requests & responses. In this case, it is used to provide global error handling

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Okay thanks, so then you use Basic Authentication with traccar.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Yes, as far as I can remember, the Traccar API works with basic authentication

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

They also have Session Cookie alternative. could this alternative work on this app?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed. Sorry for the late reply. I would say that yes, it might work with session cookie, but is something I haven't tried myself so I can not give you a straight answer on this. However, it is most common for REST clients to work either with some sort of basic authentication (such as this case) or with a token, rather than with a session cookie (which I believe is more common in web clients)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Howard Romero

Howard Romero   ·   2 years ago

Saludos. ¬ŅTienes pensado colocar los reportes, o dibujar el recorrido a partir del historial del dispositivo?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hola Howard, Por los momentos no hay planes de a√Īadir mas funcionalidad a la aplicacion porque no fue pensada como una aplicacion final para la administracion de un servidor traccar, sino mas bien como un punto de partida para que otros desarrollen sus propias app a partir de esta y mostrar como puede hacerse uso de la API para acceder a las diferentes funcionalidades del sistema

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi jose, I am new to Ionic, can you please guide me in adding the Engine Start/Stop button?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello XYZ, As far as I can remember there is not a specific command for engine Start/Stop. What I mean by this is that every device should handle this functionality differently (the command dispatched to the device should be different for each model) So, you should first create the command in the platform (you could also create it using the API with the POST /command endpoint (or using the embedded function defaultService.commandsPost), and then dispatch the saved command using the POST /command/send endpoint (or with the embedded function defaultService.commandsSendPost) You should probably take a look at the traccar API reference. For more information here https://www.traccar.org/api-reference/

XYZ

XYZ   ·   2 years ago

Being More precise: In the thumbnail images shown above, referring to the 4th image which shows two option 'Show Details' and 'Cancel' after the clicking on the 'Devices', so I want to add the button named 'Command' as the 3rd option and going in the Command I can show the list of commands the device has!

Jose Fernandez

Jose Fernandez   ·   2 years ago

Just add another option to the menu that leads the user to a new page and use the functions in the way I described before to populate the info on the screen. What is the problem you are having?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi jose, Can you please guide in adding the engine Start/Stop button to the ionic app! I am new to Ionic!

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi Jose, when I try to run "sudo ionic cordova run browser" I keep getting the error as below, gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass/build' gyp ERR! System Darwin 16.7.0 gyp ERR! command "/usr/local/bin/node" "/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN @ionic/pro@2.0.3 requires a peer of cordova-plugin-ionic@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/@ionic/app-scripts/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 install: `node install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/watchpack/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 install: `node install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.12.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/pratiksunilsharma/.npm/_logs/2019-09-25T11_37_52_302Z-debug.log [ERROR] An error occurred while running subprocess npm. npm i -D -E @ionic/app-scripts exited with exit code 1. Re-running this command with the --verbose flag may provide more information. Also seeing the error log says the same thing! Please help I am on Node v 10.6.3

XYZ

XYZ   ·   2 years ago

hello jose, can you please help me! for the issue mentioned above!

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi XYZ, It clearly says the error is: EACCES: permission denied, mkdir '/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass/build' How is that this is the first time you experience this?

XYZ

XYZ   ·   2 years ago

Thanks for the reply Jose, yes it is 1st time I have experienced it! I am using sudo! Any better suggestion?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Delete the whole node_modules/ folder and perform an npm install again

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

RAFAEL NORIEGA

RAFAEL NORIEGA   ·   a year ago

hola Jose Fernandez quiero comprar la app para personalizarla, tengo varias dudas antes de realizar la compra: 1- version de ionic a instalar para ejecutar la aplicacion 2- al comprar me envias algun documentacion inicial para levantar la app 3- entiendo que la app funciona mas bien con un administrador de traccar en el mobil y no como un cliente que envia su ubicacion. saludos

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Rafael, perdona la tardanza en mi respuesta, pero esperaba que esta pagina me notificara al correo cada vez que alguien escribe pero al parecer no ha funcionado. La version de ionic es la version 3, y documentacion no incluyo, la app esta destinada a personas con previa experiencia en ionic Y si, correcto, es una app de administracion, no un cliente que envia su posicion

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

WALLACE MACHADO

WALLACE MACHADO   ·   a year ago

Does anyone have a model of this app already compiled APK for me to test

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Wallace. Por favor escribeme a mi correo personal y yo te puedo enviar una (josefd8@ gmail.com)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Jasiel Izaguirre

Jasiel Izaguirre   ·   a year ago

Hola Jose, Estoy interesado en la App de Traccar pero antes de eso necesito saber si la aplicación ya cuenta con la implementación de Sockets para visualización en tiempo real del vehículo. Por otra parte quisiera saber si has probado la aplicación en dispositivos reales o emuladores de iOS y Android. Saludos

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Jasiel. La verdad que no con respecto a lo de los sockets. A ver, tu puedes ver en el mapa la ultima posición del equipo, pero tendrías que constantemente refrescar para actualizar las posiciones, no se haría solo. A menos que quizás tu por detrás hagas alguna rutina que lo haga automáticamente (que no creo que sea para nada algo complicado). No se decirte sobre el tema de los sockets, yo por detrás uso las APIs de traccar, si la API de traccar soporta el uso de sockets pues supongo que se podría. Con respecto a lo de probar en dispositivos reales, claro, de hecho el vídeo de youtube que tengo colgado es un vídeo de mi dispositivo personal. No lo he compilado para iOS pero para Android lo he probado y sin problema

Jasiel Izaguirre

Jasiel Izaguirre   ·   a year ago

Gracias Jose por responder, actualmente tengo una app hecha en Ionic 4, la API de Traccar soporta usos de sockets e incluso la implementé en Ionic pero por alguna razón se logra actualizar sin problemas en la web pero al correrlo en iOS o Android dan problemas con los sockets, era para ver si ya tu habías logrado hacerlo sin problemas. Muchas gracias.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Alfredo Rodrigues

Alfredo Rodrigues   ·   a year ago

I am interested in your product, after purchase can I freely make modifications to the file or have direct rights?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Alfredo Yes of course! what I'm offering here is not an apk or ipa file, it is the source code of the app. Once you have it you can do whatever changes you want

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Json Anderson

Json Anderson   ·   a year ago

Does this support web socket?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hello Json! I think someone asked me this before. But no, this app retrieves the information from the server using API calls, and if you want to refresh the information that you see on the screen, you will have to perform another API call. Im actually not sure if the traccar API supports web sockets (probably it does)

Json Anderson

Json Anderson   ·   a year ago

Hi Jose, it supports web socket. Would you like to work on a custom project ?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

Hi Jose I Found Error like this npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN @ionic/pro@2.0.3 requires a peer of cordova-plugin-ionic@^5.0.0 but none is installed. You must install peer dependencies yourself. npm ERR! Cannot read property '0' of undefined how to fix this error?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Dientri. I wouldn't worry about the warnings, those seem to just be warnings about outdated dependencies. However, that error message. What action is triggering that message? in what page?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

Does the position here auto refresh?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Dientri. No, you should press the refresh button to force the app to request the newest position of the device. You could implement a timer within the code to do this automatically I guess

Dientri Media

Dientri Media   ·   a year ago

application not work because need for @ionic/pro

Dientri Media

Dientri Media   ·   a year ago

The application does not work because of the need for @ ionic / pro

Dientri Media

Dientri Media   ·   a year ago

can you help me for new update for ionic3?

Jose Fernandez

Jose Fernandez   ·   a year ago

Ionic pro? That's only a plugin to help you connect your app to the services provided by Ionic (deploys, error dashboards), but is not a necessary plugin The application IS written in Ionic v3 already

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

WALLACE MACHADO

WALLACE MACHADO   ·   a year ago

And I checked and tested my google maps key, I still don't see the map in the app, I compiled a debug APK, I only see the google logo, but I don't see the map, can you help me?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

is this traccar monitor client or traccar transmitter client (like traccar client in android) ? because i'm not see any device id, angle, interval or else like in traccar client android

Jose Fernandez

Jose Fernandez   ·   a year ago

Hey Dientri. Yes, this is a monitor client, not a transmitter. The app connects to a running traccar server and fetches the position of the devices. The app does NOT send the position of the mobile phone to the server,

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, having a litle issue here, my steps: sudo ionic cordova platform rm android ionic cordova platform add android ionic cordova build --prod --release android jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk alias_name zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./pronto2.apk But after splash, i only have a blank screen. Dont ask for permissions or anything. Thanks in advance.

Jose Fernandez

Jose Fernandez   ·   9 months ago

Hi Rafael. If you try to simple execute "ionic cordova build android", does the resulting APK work?

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, Thanks for your response. Same thing, but debug version only and on both cases dont work. On debug version i have login page, but dont login. Thank you.

Jose Fernandez

Jose Fernandez   ·   9 months ago

Have you made any changes to the source code? if you try to see the app running in the browser, does it work? or it returns any error in the browsers console?

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, no changes. First trying to compile as delivered. On browser runs perfectly ( except the map, but normal ). On browser create account, login, logout, add devicec ). debug apk installs, show login/create account but dont work. On release/prod apk only blank screen.

Jose Fernandez

Jose Fernandez   ·   9 months ago

I just downloaded the code, generated the apk, and is working fine for me. I did have to change something, that the google maps plugin requires the API_KEY to be declared differently in the confix file, but besides that, didnt made any other change. I do have a docker image that has node/ionic/java/gradle/androidsdk preinstalled, and that I sometimes use to easily generate apk without having to download all those components and trying to align system variables: https://hub.docker.com/repository/docker/josefd8/ionic-android-builder Try doing the following: Go to your app folder and delete node_modules/ Assuming you have docker installed on your system, run: docker run --rm -v $(pwd):/ionicapp josefd8/ionic-android-builder:1.0 npm install And then, run: docker run --rm -v $(pwd):/ionicapp josefd8/ionic-android-builder:1.0 ionic cordova build android Those were exactly the steps I followed, and it worked fine.

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Thank you, very much. I try now. After that i need to sign/align apk to publish on playstore. Will --prod and/or --release work too? Thanks again.

Jose Fernandez

Jose Fernandez   ·   9 months ago

uhmmmm I don't think I ever tried to do the signing of the apk using the docker image, but you can try, not really sure if probably there's some package that was not included in the image that is necessary. But you can tell me and I could try to update the image.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

  ·   just now

{{ comment.comment }}

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

  ·   just now

{{ comment.comment }}

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, having a litle issue here, my steps: sudo ionic cordova platform rm android ionic cordova platform add android ionic cordova build --prod --release android jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk alias_name zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./pronto2.apk But after splash, i only have a blank screen. Dont ask for permissions or anything. Thanks in advance.

Jose Fernandez

Jose Fernandez   ·   9 months ago

Hi Rafael. If you try to simple execute "ionic cordova build android", does the resulting APK work?

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, Thanks for your response. Same thing, but debug version only and on both cases dont work. On debug version i have login page, but dont login. Thank you.

Jose Fernandez

Jose Fernandez   ·   9 months ago

Have you made any changes to the source code? if you try to see the app running in the browser, does it work? or it returns any error in the browsers console?

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Hi, no changes. First trying to compile as delivered. On browser runs perfectly ( except the map, but normal ). On browser create account, login, logout, add devicec ). debug apk installs, show login/create account but dont work. On release/prod apk only blank screen.

Jose Fernandez

Jose Fernandez   ·   9 months ago

I just downloaded the code, generated the apk, and is working fine for me. I did have to change something, that the google maps plugin requires the API_KEY to be declared differently in the confix file, but besides that, didnt made any other change. I do have a docker image that has node/ionic/java/gradle/androidsdk preinstalled, and that I sometimes use to easily generate apk without having to download all those components and trying to align system variables: https://hub.docker.com/repository/docker/josefd8/ionic-android-builder Try doing the following: Go to your app folder and delete node_modules/ Assuming you have docker installed on your system, run: docker run --rm -v $(pwd):/ionicapp josefd8/ionic-android-builder:1.0 npm install And then, run: docker run --rm -v $(pwd):/ionicapp josefd8/ionic-android-builder:1.0 ionic cordova build android Those were exactly the steps I followed, and it worked fine.

Rafael Goulart Pedroso

Rafael Goulart Pedroso   ·   9 months ago

Thank you, very much. I try now. After that i need to sign/align apk to publish on playstore. Will --prod and/or --release work too? Thanks again.

Jose Fernandez

Jose Fernandez   ·   9 months ago

uhmmmm I don't think I ever tried to do the signing of the apk using the docker image, but you can try, not really sure if probably there's some package that was not included in the image that is necessary. But you can tell me and I could try to update the image.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

is this traccar monitor client or traccar transmitter client (like traccar client in android) ? because i'm not see any device id, angle, interval or else like in traccar client android

Jose Fernandez

Jose Fernandez   ·   a year ago

Hey Dientri. Yes, this is a monitor client, not a transmitter. The app connects to a running traccar server and fetches the position of the devices. The app does NOT send the position of the mobile phone to the server,

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

WALLACE MACHADO

WALLACE MACHADO   ·   a year ago

And I checked and tested my google maps key, I still don't see the map in the app, I compiled a debug APK, I only see the google logo, but I don't see the map, can you help me?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

Does the position here auto refresh?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Dientri. No, you should press the refresh button to force the app to request the newest position of the device. You could implement a timer within the code to do this automatically I guess

Dientri Media

Dientri Media   ·   a year ago

application not work because need for @ionic/pro

Dientri Media

Dientri Media   ·   a year ago

The application does not work because of the need for @ ionic / pro

Dientri Media

Dientri Media   ·   a year ago

can you help me for new update for ionic3?

Jose Fernandez

Jose Fernandez   ·   a year ago

Ionic pro? That's only a plugin to help you connect your app to the services provided by Ionic (deploys, error dashboards), but is not a necessary plugin The application IS written in Ionic v3 already

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Dientri Media

Dientri Media   ·   a year ago

Hi Jose I Found Error like this npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN @ionic/pro@2.0.3 requires a peer of cordova-plugin-ionic@^5.0.0 but none is installed. You must install peer dependencies yourself. npm ERR! Cannot read property '0' of undefined how to fix this error?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Dientri. I wouldn't worry about the warnings, those seem to just be warnings about outdated dependencies. However, that error message. What action is triggering that message? in what page?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Json Anderson

Json Anderson   ·   a year ago

Does this support web socket?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hello Json! I think someone asked me this before. But no, this app retrieves the information from the server using API calls, and if you want to refresh the information that you see on the screen, you will have to perform another API call. Im actually not sure if the traccar API supports web sockets (probably it does)

Json Anderson

Json Anderson   ·   a year ago

Hi Jose, it supports web socket. Would you like to work on a custom project ?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Alfredo Rodrigues

Alfredo Rodrigues   ·   a year ago

I am interested in your product, after purchase can I freely make modifications to the file or have direct rights?

Jose Fernandez

Jose Fernandez   ·   a year ago

Hi Alfredo Yes of course! what I'm offering here is not an apk or ipa file, it is the source code of the app. Once you have it you can do whatever changes you want

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Jasiel Izaguirre

Jasiel Izaguirre   ·   a year ago

Hola Jose, Estoy interesado en la App de Traccar pero antes de eso necesito saber si la aplicación ya cuenta con la implementación de Sockets para visualización en tiempo real del vehículo. Por otra parte quisiera saber si has probado la aplicación en dispositivos reales o emuladores de iOS y Android. Saludos

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Jasiel. La verdad que no con respecto a lo de los sockets. A ver, tu puedes ver en el mapa la ultima posición del equipo, pero tendrías que constantemente refrescar para actualizar las posiciones, no se haría solo. A menos que quizás tu por detrás hagas alguna rutina que lo haga automáticamente (que no creo que sea para nada algo complicado). No se decirte sobre el tema de los sockets, yo por detrás uso las APIs de traccar, si la API de traccar soporta el uso de sockets pues supongo que se podría. Con respecto a lo de probar en dispositivos reales, claro, de hecho el vídeo de youtube que tengo colgado es un vídeo de mi dispositivo personal. No lo he compilado para iOS pero para Android lo he probado y sin problema

Jasiel Izaguirre

Jasiel Izaguirre   ·   a year ago

Gracias Jose por responder, actualmente tengo una app hecha en Ionic 4, la API de Traccar soporta usos de sockets e incluso la implementé en Ionic pero por alguna razón se logra actualizar sin problemas en la web pero al correrlo en iOS o Android dan problemas con los sockets, era para ver si ya tu habías logrado hacerlo sin problemas. Muchas gracias.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

WALLACE MACHADO

WALLACE MACHADO   ·   a year ago

Does anyone have a model of this app already compiled APK for me to test

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Wallace. Por favor escribeme a mi correo personal y yo te puedo enviar una (josefd8@ gmail.com)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

RAFAEL NORIEGA

RAFAEL NORIEGA   ·   a year ago

hola Jose Fernandez quiero comprar la app para personalizarla, tengo varias dudas antes de realizar la compra: 1- version de ionic a instalar para ejecutar la aplicacion 2- al comprar me envias algun documentacion inicial para levantar la app 3- entiendo que la app funciona mas bien con un administrador de traccar en el mobil y no como un cliente que envia su ubicacion. saludos

Jose Fernandez

Jose Fernandez   ·   a year ago

Hola Rafael, perdona la tardanza en mi respuesta, pero esperaba que esta pagina me notificara al correo cada vez que alguien escribe pero al parecer no ha funcionado. La version de ionic es la version 3, y documentacion no incluyo, la app esta destinada a personas con previa experiencia en ionic Y si, correcto, es una app de administracion, no un cliente que envia su posicion

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi Jose, when I try to run "sudo ionic cordova run browser" I keep getting the error as below, gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass/build' gyp ERR! System Darwin 16.7.0 gyp ERR! command "/usr/local/bin/node" "/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN @ionic/pro@2.0.3 requires a peer of cordova-plugin-ionic@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/@ionic/app-scripts/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 install: `node install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/watchpack/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 install: `node install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.12.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/pratiksunilsharma/.npm/_logs/2019-09-25T11_37_52_302Z-debug.log [ERROR] An error occurred while running subprocess npm. npm i -D -E @ionic/app-scripts exited with exit code 1. Re-running this command with the --verbose flag may provide more information. Also seeing the error log says the same thing! Please help I am on Node v 10.6.3

XYZ

XYZ   ·   2 years ago

hello jose, can you please help me! for the issue mentioned above!

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi XYZ, It clearly says the error is: EACCES: permission denied, mkdir '/Users/pratiksunilsharma/Desktop/incartracking-client/node_modules/node-sass/build' How is that this is the first time you experience this?

XYZ

XYZ   ·   2 years ago

Thanks for the reply Jose, yes it is 1st time I have experienced it! I am using sudo! Any better suggestion?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Delete the whole node_modules/ folder and perform an npm install again

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi mate, I'm having issues with the Google Map API, I've just checked many times it's set up correctly, no restrictions were created and I've added my billing card as well. But I'm still getting the following error messages You have exceeded your request quota for this API. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors _.Oc @ js:51 util.js:219 Google Maps JavaScript API warning: NoApiKeys. Any idea ? Cheers

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello! I'm pretty sure you can use the API without having to submit any credit card information. This API have a free daily quota which is usually more than enough for a personal project. Try to create a new API key (remove the one you already have) and try again. One of the users of this project reported a problem he had (the map did not showed up) but I believe it was a problem with the version of cordova he had installed (he downgraded cordova and that was it) probably your problem may be similar. Sorry I can not give you that much help :( I'm don't really feel capable of giving you support about the plugin itself, but only about this particular project

Harlem

Harlem   ·   2 years ago

By the version of Cordova you mean the version of the Ionic Cli ? Mine is CLI 4.11.0 right now.

Jose Fernandez

Jose Fernandez   ·   2 years ago

As I understand, cordova is a different component. He told me he downgraded from version 9 to version 8

Harlem

Harlem   ·   2 years ago

Ok it worked I'll leave it here in case someone else needs it Cordova Version 8, and I've added this code snippet Environment.setEnv({ // api key for server 'API_KEY_FOR_BROWSER_RELEASE': 'API_KEY_FOR_BROWSER_RELEASE', // api key for local development 'API_KEY_FOR_BROWSER_DEBUG': 'API_KEY_FOR_BROWSER_DEBUG' }); Replaced with my API key and it worked.

Harlem

Harlem   ·   2 years ago

Ok it worked I'll leave it here in case someone else needs it Cordova Version 8, and I've added this code snippet Environment.setEnv({ // api key for server 'API_KEY_FOR_BROWSER_RELEASE': 'API_KEY_FOR_BROWSER_RELEASE', // api key for local development 'API_KEY_FOR_BROWSER_DEBUG': 'API_KEY_FOR_BROWSER_DEBUG' }); Replaced with my API key and it worked.

Jose Fernandez

Jose Fernandez   ·   2 years ago

That's awesome! Thanks for sharing ;)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi jose, I am new to Ionic, can you please guide me in adding the Engine Start/Stop button?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello XYZ, As far as I can remember there is not a specific command for engine Start/Stop. What I mean by this is that every device should handle this functionality differently (the command dispatched to the device should be different for each model) So, you should first create the command in the platform (you could also create it using the API with the POST /command endpoint (or using the embedded function defaultService.commandsPost), and then dispatch the saved command using the POST /command/send endpoint (or with the embedded function defaultService.commandsSendPost) You should probably take a look at the traccar API reference. For more information here https://www.traccar.org/api-reference/

XYZ

XYZ   ·   2 years ago

Being More precise: In the thumbnail images shown above, referring to the 4th image which shows two option 'Show Details' and 'Cancel' after the clicking on the 'Devices', so I want to add the button named 'Command' as the 3rd option and going in the Command I can show the list of commands the device has!

Jose Fernandez

Jose Fernandez   ·   2 years ago

Just add another option to the menu that leads the user to a new page and use the functions in the way I described before to populate the info on the screen. What is the problem you are having?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Howard Romero

Howard Romero   ·   2 years ago

Saludos. ¬ŅTienes pensado colocar los reportes, o dibujar el recorrido a partir del historial del dispositivo?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hola Howard, Por los momentos no hay planes de a√Īadir mas funcionalidad a la aplicacion porque no fue pensada como una aplicacion final para la administracion de un servidor traccar, sino mas bien como un punto de partida para que otros desarrollen sus propias app a partir de esta y mostrar como puede hacerse uso de la API para acceder a las diferentes funcionalidades del sistema

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Can you explain how authentication works? when the app first bootstraps how does the app check whether the user is authenticated or not

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed, Once the user logs in, the credentials are stored in the Ionic storage engine , and every time the app starts, it first verifies if this credentials exists. If they do, the app tries to call a devicesGet endpoint just to verify if the credentials are valid. If the response is other than 200, the splash screen is hidden and the user is redirected to the login screen. Also, the app counts with an HTTP interceptor that intercepts the http requests & responses. In this case, it is used to provide global error handling

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Okay thanks, so then you use Basic Authentication with traccar.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Yes, as far as I can remember, the Traccar API works with basic authentication

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

They also have Session Cookie alternative. could this alternative work on this app?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed. Sorry for the late reply. I would say that yes, it might work with session cookie, but is something I haven't tried myself so I can not give you a straight answer on this. However, it is most common for REST clients to work either with some sort of basic authentication (such as this case) or with a token, rather than with a session cookie (which I believe is more common in web clients)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Irfan Md

Irfan Md   ·   2 years ago

Hi. I thought this app will work similar to Traccar Client for Android which sends the location details at intervals and track the entry and exit from geofences. But I couldn't found that anywhere here. Did I missed anything? Or can we build similar specifications in the app, other what we have in this app?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello Irfan, Yes, you are correct. probably the name of the app can be confusing for some. Unlike the traccar client app (which is developed by the traccar team itself) this app is more like a REST API client: it shows how to connect and authenticate against the traccar server and perform different actions using its endpoints (with the API you could basically do all the same operations you would on the web interface) and this app is aimed to those who wish to create their own tracking app. You could certainly build a similar traccar client app that the one that is produced by the traccar team (an app that sends the phone's location at regular intervals to the server). However, you have a couple of constraints. First, the latests version of Android will require the app to have a constant icon in the notification area to avoid the OS from killing the background tracking process. And second, there is a Cordova plugin for background tracking, but the format of the packages it sends are not compatible with any GPS model currently supported by traccar (so you will have to implement this functionality at the server-side)

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Ahmed Ali Rashid

Ahmed Ali Rashid   ·   2 years ago

Can the language of the app be changed programmatically/during runtime?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Ahmed. As far as I understand, you set the default language in the app.componets file, but this is not static. And the language the app is displayed depends on the language the user has set the phone itself. So if the Zone/region and default language of the phone is set to, lets say, the USA, the app will be displayed in English, or if the zone/region and language of the phone is set to Italy, the app should be displayed in Italian (assuming the file with correct translations for that language exists). I would say that changing the app language at runtime is possible but I'm afraid I can not give you exact instructions on this. This question is most likely answered in the ionic help forums

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi I have 2 questions before buying, 1) Can we change the app icon 2) Does it work for OpenStreet Map?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi; 1) Can we change the app icon? R: Yes, of course, this is just like any other regular ionic project, you are free to change icons, images, etc 2) Does it work for OpenStreet Map? R: I'm really not sure about this one. In the project, I use the google maps specific plugin for ionic, so my educated guess is that if there is one for OpenStreetMap this should be perfectly possible, although you will have to adapt the functionality for this plugin API

XYZ

XYZ   ·   2 years ago

Hi Jose, I am new to ionic, but found this https://www.javascripttuts.com/using-leaflet-open-street-map-in-an-ionic-application-in-one-go/ for my query, can this solve the OpenstreetMap Issue of mine? Can you help in getting OpenStreetMap into your app...

Jose Fernandez

Jose Fernandez   ·   2 years ago

I, unfortunately, cannot provide you with clear instructions about how to use OpenStreetMaps because I have never done it myself, but with a google search I did found some very comprehensible manuals. Check this one out https://tphangout.com/ionic-3-leaflet-maps-geolocation-markers/. What's exactly the problem you are having? OpenStreetMaps is another good map alternative, I just decided to just go with google maps because it was very well maintained and there was plenty of info available online

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi Jose, do you know how I can show geofences zones on the map ? I mean do I need the cordova geofences plugin ? Because it's breaking my build. Thank you.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hello Harlem, I believe the cordova geofence plugin is for triggering actions and monitor circular geofences in the device. I assume that what you really want is to show the traccar geofences in the map, correct? If this is what you want, there is and endpoint in the traccar API to get the geofences, and after that you could just draw them in the map using the google maps API (there are several functions for drawing regions in google maps). The way geofences work in traccar (as I understand them), is that the geofence must be configured in the traccar server, and is the traccar server the responsible for firing an alert/email/sms if any given device send a report inside/outside that geofence

Harlem

Harlem   ·   2 years ago

Hi Jose thank you for your quick reply, could you guide to one these functions for drawing regions ? I've also sent you an email, which is contains the same question. If it's something you could help me achieve, let me know what your fees are by email thank you.

Jose Fernandez

Jose Fernandez   ·   2 years ago

Sure, This is the link to get all geofences from your traccar server https://www.traccar.org/api-reference/#operation--geofences-get And then, depending on the shape of your geofence (regular, or multiline) you could use circle class (https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/circle/README.md) or the polygon class (https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/polygon/README.md) from google maps API I remember to use them once, but it was a long time ago so probably some things have changed by now

Harlem

Harlem   ·   2 years ago

Hi Jose, thank you for the links I've managed to get the geofences with circles to work, I'm stuck with the polygons ones. I need someone with better skills to help me out, I can pay. Can you help me out ?

Harlem

Harlem   ·   2 years ago

I'm getting this as the value of area: POLYGON((59.91800096001387 10.766295516397868, 59.92008005535203 10.769876975862042, 59.92108932835282 10.770989177301486, 59.92092859914192 10.773374832565004, 59.91670447578136 10.773119106471876, 59.915220975177306 10.770010274382246, 59.91800096001387 10.766295516397868))

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Harlem! Yeah, that looks like a valid geofence in traccar. What exactly are you trying to do? creating new geofences in the app and using the API to POST then to traccar?

Harlem

Harlem   ·   2 years ago

I'm trying to use that information as options to render multiple polygons on the map in the ionic app. Like on this example here. let GORYOKAKU_POINTS: ILatLng[] = [ {lat: 59.91800096001387, lng: 10.766295516397868}, {lat: 59.92008005535203, lng: 10.769876975862042}, {lat: 59.92108932835282, lng: 10.769876975862042}, {lat: 59.92108932835282, lng: 10.770989177301486}, {lat: 59.92092859914192, lng: 10.773374832565004}, {lat: 59.91670447578136, lng: 10.773119106471876}, {lat: 59.915220975177306, lng: 10.770010274382246}, {lat: 59.91800096001387, lng: 10.766295516397868} ]; let polygonOptions: PolygonOptions = { points: GORYOKAKU_POINTS, strokeColor : '#880000', fillColor : 'rgba(136, 0, 0, 0.4)', strokeWidth: 3, clickable: true }; After some string manipulation (replace, split) I've managed to make it look like this 0: "59.93033221502145 10.736312566620624" 1: " 59.93126823947952 10.739389385034407" 2: " 59.93032167711175 10.74246062690402" 3: " 59.928103133085784 10.73901288863796" 4: " 59.92783128357863 10.734413036346213" 5: " 59.929217972199666 10.732650529728573" 6: " 59.93033221502145 10.736312566620624" but I'm stuck now

Harlem

Harlem   ·   2 years ago

here is the example I'm following, https://github.com/ionic-team/ionic-native-google-maps/tree/master/documents/polygonoptions

Jose Fernandez

Jose Fernandez   ·   2 years ago

And what is exactly your problem? the polygon is not visible??

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Francisco Gustavo de Sousa Santos

Francisco Gustavo de Sousa Santos   ·   2 years ago

I put the key, but the map opens as in the image - http://207.180.217.117/teste.png

Jose Fernandez

Jose Fernandez   ·   2 years ago

As I see you are running the app on a browser and the map plugin that is used in the project is the native SDK plugin, designed to be running on mobile (I believe your problem is that is in fallback mode). Once you generate the android/ios app, you should not see that error

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Franciasco. Could you fix the problem you were having?

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Francisco Gustavo de Sousa Santos

Francisco Gustavo de Sousa Santos   ·   2 years ago

Good morning, where exactly do I put the keymap google? please send me the excerpt in config.xml that I put the key

Jose Fernandez

Jose Fernandez   ·   2 years ago

hello francisco, Please, fiind this section in the config.xml file <plugin name="cordova-plugin-googlemaps" spec="2.4.6"> <variable name="API_KEY_FOR_ANDROID" value="YOUR_API_KEY_HERE" /> <variable name="API_KEY_FOR_IOS" value="YOUR_API_KEY_HERE" /> <variable name="PLAY_SERVICES_VERSION" value="15.0.1" /> <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" /> </plugin> replace the "YOUR_API_KEY_HERE" with your API key

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Harlem

Harlem   ·   2 years ago

Hi Jose, how do I get positions of devices belonging to one specific category only on the map page ?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hi Harlem, Well, the program supports all the different endpoints described in the API documentation fro traccar: https://www.traccar.org/api-reference/ So if there is an endpoint for exactly that functionality, it should be listed there. I recommend you that if you are unsure how to perform this, you could try to replicate what you are trying to do in the web application and check via the browser console what are the API calls performed in the background. Probably you will have to use more than one API call to get what you want

Harlem

Harlem   ·   2 years ago

Hi Jose, I've managed to get the list of devices that I want to their position to show on the map. this.devices.forEach((device) => { if (device.status === 'online') { availableScootersIds.push('id='+device.id); } }); devicesIds = availableScootersIds.join("&"); But when I'm trying to use it as paremeters it looks like this api/positions?id=id=1%26id=4%26id=5 How can I pass ampersand(&) with the parameters in Angular ? Thank you

Harlem

Harlem   ·   2 years ago

Found it id.forEach((deviceId) => { console.log(deviceId.id); queryParameters = queryParameters.append('id', <any>deviceId.id); });

Jose Fernandez

Jose Fernandez   ·   2 years ago

hahaha glad to hear that :)

Harlem

Harlem   ·   2 years ago

Hi Jose, what's your email I have a few questions thanks.

Jose Fernandez

Jose Fernandez   ·   2 years ago

My email is josefd8@gmail.com

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Jeisson Sanchez

Jeisson Sanchez   ·   2 years ago

Hola Cordial Saludo, el mapa esta integrado a la aplicación?

Jose Fernandez

Jose Fernandez   ·   2 years ago

Hola Jeisson, No he incluido ningun plugin de cordova (como maps) en este caso, por varias razones: Para que la app pueda correrse en un explorador Anadir el map requiere que el usuario incluya su api key de google a la hora de incluir el plugin Sin embargo no seria nada dificil de agregar. Una vez incluido puedes usar la libreria para hacer un llamado al metodo #positionsGet que te retorna un array con la ultima posicion de cada equipo que el usuario tiene agregado Si gustas, podriamos negociar mis servicios para que lo adapte a tu caso en particular

Jeisson Sanchez

Jeisson Sanchez   ·   2 years ago

Tienes un correo donde nos podamos escribir, Gracias

Jose Fernandez

Jose Fernandez   ·   2 years ago

claro, mi correo es josefd8@gmail.com.

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

XYZ

XYZ   ·   2 years ago

Hi jose, Can you please guide in adding the engine Start/Stop button to the ionic app! I am new to Ionic!

  ·   just now

{{ reply.comment }}



Hey there! You'll need to log in before you can leave a comment here.

Hey there! You'll need to log in and purchase the add-on before you can leave a rating here.

There are no ratings for this starter yet

  ·     ·   just now

{{ rating.comment }}

  ·     ·   just now

{{ rating.comment }}