Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
This will be for an Android Application, but the idea itself can be applied to anything.
I want my app to find the location of the user, and then check to see if the user's location is on a set list of locations.
The list is currently stored on a web server, and is in the format of -
Suburb - Street
So I currently have the following options -
Have the Android Device get the GPS Location of the device, do a lookup to get the current Suburb and Street, and check it against the list on the server
Have the Android Device get the GPS Location of the device, do a lookup to get the current Suburb and Street, retrieve the list from the server, and check the list locally.
Have the Android Device get the GPS Location, send the location to the server, and the server does the lookup to get suburb and street to check against the list, and then send a response back.
Which would be the most efficient way of doing things, both in terms of maintenance, as well as bandwidth wise ?
Also, if there are other methods of achieving the same goal, I would be happy to be made aware of them !
as building a Distributed System of 3-tier Architecture. it recommends that you let the Application server which is your server in your case. to handle the processing to reduce the Latency.
so the android application should be the interface only where the user uses to communicate with the server and all the processing should be handled in the server.
So for me I'd choose the third choice.
for more about 3-tier architecture please read this
hope this helped you answer your question. good luck with your application.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Currently, I am struggling to show the internet speed consistently in the status bar. What I am able to do is, finding the internet speed by the old approach(Upload & download some file from/to server and using TrafficStats API). I tried some of the play store apps, they all displaying the internet speed when the user opens up any app which uses the internet. I want to implement the same feature. I believe they either use a broadcast receiver or service. How can I implement the same?
Or is there any library which does the same or any other better approach?
The problem with displaying an internet speed is that it is always going to be 'historical' or an estimate - i.e. even if you were able to achieve 300Mbps 1 second ago it does not mean you will be able to achieve it now.
Bearing this in mind, the approach you already outlined is as reliable as any - i.e. measure the round trip time for a known size of data. If accuracy is important to you, this is probably the most accurate provided you are confident of the turnaround time on the server side.
You can listen to Android Network events which will tell you when the type of network connections has changed etc - the recommended approach has changed over API levels but this is a good starting point: https://developer.android.com/training/monitoring-device-state/connectivity-monitoring
For your example it sounds like you want to get as recent as possible Network Stats rather than connectivity changes - for that the 'NetworkStatsManager' is probably the best match.
Provides access to network usage history and statistics. Usage data is collected in discrete bins of time called 'Buckets'.
https://developer.android.com/reference/android/app/usage/NetworkStatsManager
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I created one android application which will be used by multiple users, so I want to track the user's of my application using a web browser kind of application.
I Know about Android Device Manager which will track the mobile phone of google account. In this case i have to restrict my all user's to use same gmail account so that i can track all of them, But i don't want to restrict users to use same gmail for their personal mobile phone.
I am thinking is there any way by coding we can locate/mark the device on the google map of one particular account. say i have 10 user's my code has to locate/mark all these 10 users to Map of gmail account say xxx#gmail.com. is this possible ?
How to achieve this requirement? Need help!
Here you go,
You can ask users for location access rights and than keep tracking their location data (i.e. latitude and longitude values).
Once you have latitude and longitude values of all the users putting them in a google map will be a straight forward task using Google Maps API.
Hope it helps,
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How do I set Android app to retrieve location of a device once a minute?
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
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am creating an android app to detect the nearest petrol pumps. Can anybody help about how I should go about this?
You're going to want to look into geolocation to retrieve longitude/latitude based on where you are, and records you hold in a database (either on the device or online, read by the device at run time). You'll need geocoding on your database in order to convert physical addresses to lng/lat. This assumes you have a database of pump locations.
Some links on geolocation: Android GEO Location Tutorial
Geocoding: http://www.wikihow.com/Geocode-an-Address-in-Google-Maps-Javascript
Finally, you'll want to display pumps within a certain radius, which is mathematical: http://andrew.hedges.name/experiments/haversine/
If you're using MySQL to do this, use this query and modify for your needs: Fastest Way to Find Distance Between Two Lat/Long Points
That should give you the basics of what you'll need to implement. To get it all working together in theory shouldn't be too difficult, as identifying pumps in your database will be a case of supplying the lng/lat of current location, plus distance and pulling out/displaying results.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
As part of my project I need to develop an android app. Most important responsibilities of the app includes :
Collect android mobile users' data (crowd sourcing )
Run the configured pre-processing algorithm on the data
Create a storage with the pre-processed data
Run knowledge and pattern detection algorithm
Control/Suggest the mobile system with the strategy the
above algorithm suggest
It's been only 3 weeks I am training myself android. I need professional tips
How to proceed further: I must provide cloud-assisted solution.
What would be suitable tools ? How Google play store provide access to data that
the users willing to provide ?
Help me out :)
I assume from what you say (please correct me if I am wrong) that this
configured pre-processing algorithm
will run on a server. And after the processing you will send data back to the android device.
One way that you could do this would be to send the data from the phone to a web server through an http request, the server will process the data and then send back the info through cloud messaging.
In case that the processing is done in the phone, then you can omit the last step and implement a one-way communication (sending http requests to the server).
For more details about sending data through http you can check here, and for cloud messaging you can check here.