java - Sending queries several times , HttpPost -


i make application sending post request sends gps coordinates, unfortunately realized sent 3 , 5 or 1 .

so not understand why same coordinates sent multiple times.

//méthode appelée au démarrage du service @override public int onstartcommand(intent intent, int flags, int startid) {     shownotification();//appel de la méthode qui créé la barre de notification      if (monlocationmanager != null && monlocationprovider != null) {          //vérification toutes les 30 secondes (40000 millisecondes ) si la position change         //d'au moins 20 métres. si c'est le cas, l'écouteur (instance de majlistener)         //va etre averti         monlocationmanager.requestlocationupdates(monlocationprovider, 30000, 20, new majlistener(this));     }      // si le service est tué il ne redémarrera pas     return service.start_not_sticky; } 

furthermore , believe emulator not have problem

thank you


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -