Creating a chat module along with location tracker - android

I am working on a project that tracks location of the users and also has the feature to chat with one another. I have completed the location tracking which has uses a external database (000webhost) and has the following sub modules:
Login and Registration
Friend Request
Adding a Friend
Deleting a friend
Viewing the locations of a selected friend on the google map.
My doubt is how should i work on the chat module, that gives an additional option to chat along with viewing locations. I do not want to check if the fellow user is online or not. It should just be able to send and receive messages when the user logs in to the app.
I hope my question is clear now.

An start would be looking at the Java Message Service and its distributions. Or do you want to write the messenger and it's server on your own and completly in java with an android client?
But at first you should think of, what does your chat application need to do. Reading your description remembers me of the facebook messenger.

Related

FCM send messages to topic in specific app

I've two android apps that share same project in firebase infrastructure
When i was preparing the firebase infrastructue to run the second one i decided for creating a second app in the same firebase project as the first one... this was a decision made basically because i hated the firebase "switch between projects" tools.
both apps ran great for over a year being hosted as same project although not sharing real resources
BUT NOW I RUN INTO A PROBLEM
I added FCM into the apps and i cant find a way to send messages to topics in a specific app...
firebase let me only choose between send message to specific app or specific topic...
both apps have same topics names and now if any user has both of them installed at the phone i cant imagine how firebase will behave when i send a notification to a topic the user has two different apps subscribed to.
does anyone know how to solve this?
You can't stop the message from going to both apps. But what you can do is put something in the message to say which app it was intended to go to. The app can then choose to ignore messages it's not supposed to handle.

Forward chat functionality with quickblox

I am developing android application like whatsapp.
I want to forward my chat to another user. For that I have used quickblox account. But I don't understand how to do forward functionality like whatsApp does.
Can you please help me?
Thanks,
Server saves chat history. You may only save necessary messages or fields (as json file for example) and send it to another user or via email (using Android tools)

PubNub + Parse integration. Is this ok?

We are implementing a mobile app which let users share to-do lists. The idea is to have as little server administration as possible and obviously keep cost down.
For user management and push notifications we will use Parse.com with Cloud Code and PubNub for real time data delivery.
Every user will log in with it facebook' s credentials and subscribe to a read only private channel that only him can read. Every time he create a new to-do list to share with his facebook's friends, the app will make an API call to CloudCode, with it's identity, the data to share and a list of friends. In CloudCode the data is pushed to the PubNub private channels of the list of friends.
In addition in CloudCode the idea is to use PubNub Presence and if the user is offline, send a Push notification.
Is this implementation ok? I'm new to both services and trying to learn. Thanks!
PubNub is appropriate if you are trying to implement a realtime app such as a chat application or a GPS tracking application. But in your case, I think you may not need PubNub's features at all. You can have the afore mentioned functionalities using Parse.com only. The parse push can be used in both the scenarios.
When the user is logged in, and is using the application :- Receive the push, suppress the notification and update the UI with the newly received data.
When the user is not online or logged in, then simply create a notification and add a click listener activity for it.
The reason why I suggest to remove PubNub (for this particular application) is that, PunNub has a different pricing model for loading history. On the free plan, you are limited to one day of message history. On the other hand, you can run this app's backend on Parse.com, almost free cost.
There's nothing in the architecture you describe above that Parse can't handle, including the ability to support Facebook login and external service calls via Cloud Codes Parse.Cloud.httpRequest(). It will do it and do it well thus the answer is yes, this is ok.
Go forth and Parse.

How to get chat history from openfier server using asmack?

I'm developing simple chat application, in which I have done chat functionality, means my app user can send and receive chat messages at both end.
But now I want to get chat history of same user, how can I do that? I have tried various things and also done lots of R & D but I don't get required information.
I'm using asamck lib, and openfire server. I added monitoring service plugins on my server, but what is next step to get the history?

Sending Auto Message in Android Application

I am trying to develop an application in android using eclipse . This application is like finding the friend location and directions using android mobile .
I am doing this in a way :
First this application is installed in user and friend both , when the user wants to retrieve the location of the friend , in our application we want a auto-message to be sent to the friend which asks his permission .If he gives it , a message containing the location(latitude, longitude) of friend goes to user and then He gets the location and path to that friend .
Now Getting the location part in a mobile having the This application has been done .
But The auto messaging part is still incomplete .
So if anyone can tell me any tutorial or sample code to sent auto messages( like in facebook we do add as a friend and a message is sent for the approval )
All of this is done through GPS .
There are loads of examples over the net on how to send automated sms messages. Here are a few i found courtesy google..
http://mobiforge.com/developing/story/sms-messaging-android
http://thinkandroid.wordpress.com/2010/01/08/sending-sms-from-application/
Basically you need to know how to use intents and BroadcastReceivers that will listen to particular events and send the text message, and do particular actions when sms is received also.
Hope this helps.
You could try to use a server that sits between the two phone as an intermediary. You can have the first phone send a request to the server saying "Hey, where's friend X". The server can then use something like android Cloud To Device Messaging to push a query to the friends phone. Then on the friends phone, have an activity pop up asking for permission to send the location. A message containing the location can then be sent back to the server and pushed to the first device using C2DM again.

Categories

Resources