Android Studio

Faziki

Well-Known Member
Joined
Aug 31, 2015
Messages
164
Reaction score
34
Location
Pretoria
Hello Guys,

im busy writing a app in Android Studio and I want to implement a feature in the app where there is two sides of the app user and employer.

the user puts on his location and the nearest employer is notified of his location and needs.

Like Uber but this has nothing to do with cars :)


Any ideas how to get that done on the User side and the Employer side?

FYI im using Firebase for the back end. its a wonderful tool !

https://firebase.google.com/

Regards,
Faz.
 
So you're writing an app but don't have an idea how to do the core of it?
Have you specced it out yet or is this a project someone has given you?

Personally, I'd start with a unit test...
 
1. Get user location (lat, long)
2. Send user to server.
2.1. Get list of employer locations (assuming you have that on server) *
2.2. Loop through each employer
2.2.1. Calculate distance of employer and user.
2.2.2. Get the employer with shortest distance to user.
3. Return closest employer to user.

* If not, then:
2.1. Send a request to all employers to send their locations.
2.1.1. Once obtained all employer locations proceed to 2.2.
 
Last edited:
1. Get user location (lat, long)
2. Send user to server.
2.1. Get list of employer locations (assuming you have that on server)
2.2. Loop through each employer
2.2.1. Calculate distance of employer and user.
2.2.2. Get the employer with shortest distance to user.
3. Return closest employer to user.

4. Inform employer of user and needs
 
So you're writing an app but don't have an idea how to do the core of it?
Have you specced it out yet or is this a project someone has given you?

Personally, I'd start with a unit test...

testing what for who.. you'll test when it's done and ready







/runs
 
So you're writing an app but don't have an idea how to do the core of it?
Have you specced it out yet or is this a project someone has given you?

Personally, I'd start with a unit test...
TDD -- Testing D & D
 
Last edited:
Henry1103's point 2 can be done by storing all the latest locations of the various people in a database and doing a geo query on them. Mysql and poatgres both support this.
Also check into push notifications in case you have not already..
 
Be careful about how you tie in location data. GPS is useful for finding restaurants, petrol stations,... but can be problematic when tying services or employment. For example: if they're trying to find an electrician near to their home; then using the GPS could be problematic. because they might be at work when they load your app. i.e. provide flexibility (manual and/or GPS).

When choosing a service provider (hosting, ...), be careful to build your app around something that is unique or proprietary, as that will impede your ability to move to another service provider should the unforeseeable occur, for example:
  • Service is discontinued
  • Cost increase (cheaper options available)
  • ...

Your requirements are quite generic, meaning it won't be difficult to design a solution that will offer you the flexibility to choose providers.
 
Last edited:
Noted thanks, im going to do it and if i get it right, awesome but if not then tuff... rather willing to give it a try then let it slide :)
 
Top
Sign up to the MyBroadband newsletter
X