2
votes

So here's my idea.

I wan't to list all the users registered on an XMPP server within my location radius. So that I could add (if interested).

I use smack API and I am basically building an android chat application for my university as my Masters project.

My questions :

  1. How to send the XMPP server, the location?

  2. Smack has the Form class, I'm wondering how I could use this to retrieve each and every user's location, when I use UserSearchManager along with Form?

Any design idea will also be greatly appreciated ! Thank you :)

1
Have you read the XEP for User Location? Are you building the server using Smack (when there are servers around to choose from)?Ben Companjen
And have you tried to answer your question 2 yourself?Ben Companjen
Dear Ben, Thank you for your instant replies. I am not building the server, I am building the client. My university has its own server set up. For the question 2, yes I have tried answering myself. I want every user to update their geo location, every time they start using the app. So that when a user wants to see the list of other users within his radius, I could show that using google maps. I need good starting points to do this, with smack lib. Thank you so much in advance Ben.user2285285
This site works better for specific questions, not discussion questions. See the about page for suggestions and of course the Smack API documentation. Good luck!Ben Companjen

1 Answers

0
votes

I am working on the same idea

1) to send user location, create a background service to keep location updated. see this link backgorund service location

after every location update, send a custom packet like this : custom packets

in your packet listener, save the packet with the location in the database and update the ui, calculate your lat,lng with receiver lat,lng if it is inside your range then show otherwise hide

2) to get all users from openfire look at my answer here : get all users from openfire using smack