find users with gps [closed] - android

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 need to create an application that will show me on a map to all users who have installed my app within x distance.
It wondered if I need to save the coordinates of each user periodically in a database and read the position or is there another option

Tracking the user's location in a database will likely be your easiest option. It will also scale well. If you are only tracking a couple users, you could use another simpler data storage mechanism like an XML file, a text file, or even some sort of Application Level Variable.
I'm sure that you have done some research on how best to track your users, but this is a pretty good starting point, if you don't have one already. They are storing each location in a local database on the phone, so I'm sure that you could very easily modify it to send that same location to a web service or something.

Related

Database for an Android App [closed]

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 6 years ago.
Improve this question
Hey guys I'm working on an Android App with Android Studio and I need a database like mlab(mongoDB). But Android doesn't support mlab. I can't just use SQLite because my data has to be saved also when my application is not running.
For example if my user signs in, their profile photo and other information should be saved in the database and I also want to code something like a friend request which also should be saved in the database.
I googled so much but I didn't find a good solution.
I hope someone can help me.
You asking about two separate things. mLab is a Database as a Service which uses MongoDB, while SqLite is just a database.
You can save data while your application is not being used with either option, simply look into background Services and other parts of the Android API that allow background tasks.
If you want to save data to a database that is not on the device, you'll need to look into the documentation of the service to determine the best way to interact with your database. In the case of mLab, they allow both custom drivers and a REST API for interacting with your database.

Track user location through mobile number [closed]

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 6 years ago.
Improve this question
I want to create an application, when I enter any mobile number it should give me current location of that number.
Guys please help me if it is possible then tell me how it is possible ?
you cant get the location from cell number !!!!!
though there are some applications in some countries which they do something like this but the mechanism is different.
how they work is, user registers in their app and they use Cell Number as username for registering users. then this way they can tell you the location of other users by phone number. (you can just see users' location who registered in app)
since there isnt any way to get the cell number programatically so such system you want cant exist unless the user gives you the number and you verify it some how (sending code sms and etc) and thats what the apps i mentioned are doing.

How to game calculate the time for completion of work? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i be wondering How to game calculate the time for completion of work?
e.x:clash of clans find something update are done.
i believe someone want say get the time by server.but even i be offline can receive notification which say done.even i do change clock of phone nothing change in game if i change time of phone.
The time that is used to determine the yield from objects existing in clash of clans is maintained from a centralized server.
If you wanted to build an app that would calculate the times required to do things in game I think the rout to go would be to
A) ask the developers for the code (unlikely to be fruitful)
B) reverse compile the code. (potentially illegal)
C) Hand document the times required for in game events to happen (game w/notes)
D) Do a literature review to find data on the game
From this Data you may be able to craft a sort of clash of clans advisory app, but I doubt it will be easy to dupe such a consistently maintained app with hacks as simple as changing you're clock.

How to check if our location is near a petrol pump? [closed]

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.

Where to save my app Settings after I get it from sharedpref [closed]

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 8 years ago.
Improve this question
In ym android app, I have Settings menu in which use sets their app mode, sound, music ...etc
I retreive/store this in from/in shared preferences.
My question is onceI retreive this info, where is the best place to store it to make accessible by my whole application?
So far what I do is I read it from my mian activityu and sent it as an Extra between activities but something is telling me it is not efficient/correct way. Should I store the info in the Application class so any activity can access it while the app is running
Thank you
Why not just grab it from SharedPreferences every time you want the value? This saves you from having two copies of the same data in the application which could potentially get out of sync.
I'm assuming you don't need to poll these values thousands of time per second such that it would have any kind of meaningful performance impact.
Further reading:
Don't Repeat Yourself - Wikipedia
You should create a static class named like configuration.java, where you can put all the configuration/setting.

Categories

Resources