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 5 years ago.
Improve this question
I would like to add chat functionality with online user in gmail in android. how to add chat feature in my own application in android?
I want to show an online user in google maps which is nearest to the area which I have selected and have the ability to chat with that online user
To add chat to an Android application there are a number of options. I'll present the options ordered by the amount of development expertise that's required - from least to most.
Using a real-time backend service
There are a number of companies offering real-time backend services. These services would provide you with an SDK which allows your app to access their servers. Using the SDK you would be able to stream data between devices.
Here is a list of the most popular services:
Firebase
Google owned real-time database which uses WebSockets and MongoDB as it's core technology stack. The service allows you to save data in a no-SQL database and then register to receive real-time updates when that data changes. They also offer services for push notification and file storage. There is also a third party open source messaging framework available for iOS and Android.
Firebase have a library called GeoFire which allows you to make your apps location aware.
Pusher / PubNub
I've grouped these together because they are quite similar. They provide real-time streaming infrastructure and technology. You can establish channels between groups of devices and stream data between them. They don't provide any means to authenticate users so you would need an app server.
Quickblox
Quickblox is targeted specifically at the instant messaging market and they use an XMPP server on the backend. Since they use XMPP, this service has a lot of messaging features built in like privacy lists and typing indicators. They provide a reasonable but basic example messaging app.
Layer
Layer is half way between Quickblox and PubNub / Pusher. They offer a streaming platform which is targeted towards instant messaging. They have some messaging features like basic blocking but this isn't a full scale messaging implementation like Quickblox. They have a library of UI components that can be used to help build a complete app - Atlas.
If you use a backend as a service you will always have to build the chat client yourself. If you go with one of the more general purpose options like Firebase, you will also have to build your own messaging protocol.
These services will save you time when it comes to the real-time server implementation, server configuration and scaling.
XMPP
Another option is to host an XMPP server yourself. There are a number of open source XMPP servers available:
ejabberd
Prosody
OpenFire
XMPP servers will provide you with a large amount of messaging functionality out of the box. They generally don't include any location awareness but this could be solved by configuring the server to host the user database on a separate server - that would allow you to add extra tables to handle the geolocation. An alternative would be to use presence to update relevant devices when a user's location changed by a certain amount.
To build the client I would recommend using Smack. Since XMPP is an open standard, your client should be able to work with third party XMPP servers and clients.
If you don't want to build the client yourself there are a number of open source projects (mostly under copy left licenses) which could act as a starting point. Xabber would be one example but you can find more by searching. Alternatively, you could use this a commercial open source project.
Building the server yourself
The final option is to build the messaging server yourself. This has the benefit that you could add the features you need and keep it reasonably simple. A good approach would be to use Symfony and the WebSocket Bundle for the real-time back end and Android WebSockets for the client. Using this approach you would have a lot of flexibility implementing the geo location functionality.
I & my team, we are working on Backend as a Service platform called QuickBlox.
We have great example how to integrate Map/Chat features to your application:
Simple Android Map/Chat application: https://quickblox.com/developers/Android_XMPP_Chat_Sample
We have been working very closely with the developer community and have developed Applozic Chat SDK which takes just 10 mins for integration. Give it a try: Applozic
Sample code with open source sdk is available in Github: https://github.com/AppLozic/Applozic-Android-SDK
I dont know about the about GMaps but for implementing chat you can try following link
Xmpp
Adding a chat functionality, you can use Firebase or XMPP.
For choosing the right option you may prefer this
https://www.quora.com/Which-protocol-is-better-to-develop-a-chat-web-app-using-Firebase-XMPP-or-HTTP
OR
If you have strong knowledge of backend technologies, go ahead with your own. And the same time, there is also an instant solution available in the market that helps to integrate the additional functionality more easily.
We provide a real time chat SDK solution called ChatCamp. You would be able to add chat functionality to your Android app quickly with the help of ChatCamp SDK. Here is the link to Android quick start guide - https://docs.chatcamp.io/docs/android-chat-quickstart. Also, it is possible to order the user list based on the distance from a particular location or you may show online users on top of Google Maps.
Related
I'm designing analytic platform and planning to develop a mobile SDK to push our custom analytics data into the platform. So I'd like to implement it how Firebased SDK implemented the same thing. I'm just wandering what is the mechanisms used in firebase SDK to achieve this. For example, is it calling APIs to back end or establishing a Websocket connection with back end or any other mechanism to push data into server. Is there any Queue mechanism used in to push multiple events in to server. Some guidance will be really apricated. Initially planning to develop SDK for react-native and will add more frameworks. Also I want to highlight this platform will be developed on AWS environment. Hence would like to know is there any special products related to AWS when its come to capture and store events.
The Google Analytics SDK for Firebase makes HTTP calls to its backend servers, passing gRPC-endoded messages back and forth.
I'm learning android app development, and undertaking a project for educational purposes.
I'm building an app that is like a memory scrapbook - the user can curate scrapbook pages with images imported from their image library, and add written text. There is no server, and the data is stored in XML files.
I've now been tasked with adding a new feature - the ability for users of the app to send each other text based messages to add to a scrapbook page.
I've looked into the Google Cloud Messaging service, and integrating it with my app. I've read that this would involve setting up an application server, to send data via a HTTP or XMPP protocol.
I feel just about proficient enough in java to do the project with the guidance of tutorials, but have no knowledge or experience of servers, or communication protocols.
Can somebody guide me on what is involved in setting up an application server? Or point me in the direction of a tutorial where I can learn more.
Would it involve modifying the way my app currently stores data?
Are there any inherent issues with security that would need to be considered?
And this is highly speculative, but is it feasible for a beginner to undertake in 4 weeks?
Try to look at the new Firebase service from Google. It is the replacement of the old GCM.
What is firebase:
https://firebase.google.com/features/
Android quickstart guide:
https://www.firebase.com/docs/android/quickstart.html
without getting into too many details, I would like to build an app capable of messaging between small groups of people. Basically, I need an API that will allow me to a) create a group message, and b) will allow me to later add people to it based on their selections from the application itself. I am relatively new to server side coding and am looking for some suggestions, tutorials, suggested apis (google hangouts vs facebook vs any other services that would be of use), etc. I already have google plus integration with the client side and server side authentication, so it seems like if something is possible with hangouts that would be the easiest route, but again I am just looking for anything really at this point.
The way I was kind of (hoping) it would work is that some messaging service provides the group chat and gives me an ID to it, which I could then have the clients request to be added to a particular chat and then I pass them back the ID to the chat and it begins an intent that takes them to the app itself that is hosting the chat between my users. Let me know if this is possible please, along with any suggestions!
You might want to try researching the ejabberd messaging server. It is probably going to be a bit heavy for your needs as well as difficult to learn (it is in Erlang) but I've found it extremely steady as a back-end for building a messaging server.
My Android project currently requires an authentication of some sort (mobile phone number / facebook / gmail... I haven't decided yet), frequent read/write operations from the server's db (not a big amount of data, and no images/videos), push notifications and in the future, possibly complex queries on the data stored.
I started reading about Parse and Google cloud (in google, specifically about mobile backend starter).
I can't seem to find a comparison between the two. I've read that both have relatively easy implementations, but except for the platforms (I'm using Android, so both work for me), I can't find a place that says "Parse is better at ... and Google cloud is better at ...".
So my questions are:
Can anyone please give a recommendation / reference?
Does one of the above platforms at all fit my project? (I am familiar with AWS, and would like to avoid it so I will not need to worry about stability and scalability)
Shameless plug: I'm a developer at kii.com
You can also take a look at Kii Cloud MbaaS
Among its features:
User management, including authentication using Facebook credentials.
Data management that never locks you into any schemas.
File storage and cloud backup for your app.
Push notifications so you can push messages to your users or to your
app itself with updated instructions for functionality.
Geolocation so you can offer location-based services.
Server extension to define your own business logic without managing
servers.
Android, iOS, html5 and unity support
I am an android developer and I made some board games. Now i want to make some of my board games multiplayer. I don't want to create and host my own web service, so i thought about P2P.
The first thing i found was the XMPP protocol, however it's not real P2P, but if i can use the existing google talk service, i'm ready to go. Is this possible while using your existing google account without interfering with the normal working of your google talk client?
Then i heard about JXTA, a real P2P solution, and it's already ported from J2ME to Android (http://code.google.com/p/peerdroid/).
Maybe i am overcomplexing things here (as i do sometimes)
I just want to know the easiest way to do simple P2P for a boardgame.
All your opinions are welcome! Thanks in advance
Kristof, Did you get an answer to your question? I've been working on a multi-player application recently as well, though I've chosen to host the server (originally). I'm now reconsidering my choice, though, but the library I'm using fully supports peer to peer communications. The underlying protocol is built on top of Google Protobuf. It's essentially a full duplex RPC stack built on top of Netty, which can use Protobuf. Here's the URL to the RPC protobuf stack: http://code.google.com/p/protobuf-rpc-pro/
The author has been very helpful and I've found a couple of bugs, nothing major. I also had very little issues getting these libraries working on my Android phone, but they're not terribly "compact." Nothing extraordinarily large, just not small :). So far, I've had no issues getting the communications working both synchronously and asynchronously. As such, I may be moving my game over to a "peer to peer" style, and just provide the necessary location/registration server that would be used to find existing games/server.
Using XMMP should be possible for you case. Look at smack from igniterealtime. They have a nice and active java api that helps to build you own jabber extension packets that can be used to transport the changes in game state.
I think that using two google talk clients at the same time with the same account could be difficult. But it would be great because you could invite all the friends from you list to play with you directly from your game. This way you could easily get more people to play your game.
You can't use the existing Google Talk Service/Connection from what we've seen. You should take Janusz's advice and check out the smack library, that's your best bet. To allow multiple non-interfering connections with the same GTalk login take a look at the resource component of the XMPP address, it's what allows you to be logged into two clients at the same time to the same account. You can effectively make your game another client. More here: http://code.google.com/appengine/docs/java/xmpp/overview.html#JIDs_and_Resources
Finally, there appears to be some new functionality in 2.2 relating to device push communication, but I haven't looked into it yet. 2.2 is not widely deployed yet either, so probably of limited use.
Basicly, if you want to write a multi user game or a game built on top of XMPP (Jabber), you should have a serious look at pubsub extension of XMPP. It's designed for pushing data from a server to clients, in the opposite way of HTTP. In HTTP the client has to pull information from the server all the time to be able to know when some new data is pushed. While XMPP is designed to push data to clients, when something happens. Less resources used on server and clients.
You should not use the Chat part of XMPP, as that will interfere with the users presence.
In pubsub you can create a tree of nodes, where clients can listen to any new data published in any node or subnod in the tree that the client subscribes to. So if some client publish data on one node, all clients that has subscribed to that node, or any parent, will be notified about this data.
The good part with XMPP is that it's extensible so you can extend the protocol with your own extensions. I also give you user authorization, authentification and encryption, and you don't need to debug that yourself.
You could use any XMPP-server with good support for pubsub or you can host one server yourself. There are plenty of servers usable for this. GTalk doesn't have support for PubSub last time I looked.