how to get location at regular intervals using android api?

  1. How do I set Android app to retrieve location of a device once a minute?

  2. Do I need to use MongoDB and Node.JS stack instead of MySQL due to high load nature of a service? I.e. there will be high amount of simultaneous location requests from clients to a single server.

MongoDB (NoSQL) is not a panacea for scaling. Your description of a problem looks like it could use the advantages of structured storage, thus SQL might be a good choice afterall.

And I must use Node.js and socket.io with android

Up to you, but there is no must in using this technology stack.


    // Set the update interval to 1 minute
    mLocationRequest.setInterval(60000);

See the documentation here.

Use the LocationRequest.setInterval to receive an location update each minute.

Update interval

Set by LocationRequest.setInterval(). This method sets the rate in milliseconds at which your app prefers to receive location updates. If no other apps are receiving updates from Location Services, your app will receive updates at this rate.

You can find a downloadable example at http://developer.android.com/training/location/receive-location-updates.html