Is it possible to create a chat application in android between two systems without implementing a server as a middle ware? I have created an application , and I want to make the chat possible between two different emulators on two different systems , I need some help guys ...!!!
Yes it is possible thats how I made my Phd project. When my application is started it asks the user to chose if it will be a "server" or client. And on the second phone it choses the other. But there is nothing in the middle of the communication.
XMPP is often used for Chat. It is typically used with a server but there also exists an extension XEP-0174 Serverless Messaging supporting chat without an intermediate server.
I don't know whether there are Android libraries supporting this though.
An alternative could be to
use eg SSDP (or Bonjour(mDNS + DNS-SD)) for discovery of devices
write your own protocol on top of it
I guess there is a solution which may work.
You can use http://programminglife.io/android-http-server-with-nanohttpd/
NanoHttpd and if both mobile phone are in same network and they can ping each other there is a possibility that you can easily create an app which help to create the chat app peer to peer mobile.
Related
Is it possible to create a websocket / VOIP that will connect to a device (android device) to make a call or a text message? is there an existing app for this or tutorial that i can base my project?
Im planning to create an app and web app that can access my phone to make calls and text.
You can use XMPP based project to have a chat system and voice/video call
.I recommend you to use Ejabberd .it is so nice platform that provide amazing features like chat ,voice/video call and also it is massively scalable around 1 million connection I think in one node.
And you can use variety of Xmpp library in Android that you can see bellow link XMPP Libraries
I want to develop a system in which data is being shared between DESKTOP app and Android app.
After searching I have found that I need a server in between them. But I can't figure out what the server is? How do I create it? And how will it help me connect my two platform devices?
Desktop App will receive data from android app. And manage data. It will also be used to send notifications/messages to android apps.
Android App will be used to input data and send it to desktop app. It will receive updates/notifications from desktop app.
Now how do I connect these two? I basically need a common database for real-time data sharing and notifications.
Edit: I am building the desktop app using C# and android app using Java.
Edit2: Maybe I can host the database on CPANEL or 000webhost using PHP. And then connect it with both android and C#. Is this the correct way to do it? Is it possible to connect it with C#? I know it can be connected with Android, not sure about C#.
You don't necessarily need a database. You need a common network protocol between two applications.
All network communication is done via sockets. You need a library that allows you send data over sockets. For example, here's an Android guide that is about sockets.
A socket binds to a specific port of a computer, essentially making it a "server". Much like how web servers all expose port 80, and communicate over a protocol called HTTP. Which is important because it is up to you to decide what protocol your applications communicate between each other, because the socket just sends bytes - it doesn't care what you send or how, as long as it travels to a port on a particular server. It also won't parse the data for you, that's up to your application to handle. For example, how would your desktop app know the Android device sent it a text message, or some image to be displayed, or an address to show a map?
All in all, your reason for wanting a desktop application rather than a web application is not entirely clear. Parsing only the body of HTTP payloads from different HTTP paths that are mapped to different methods (which is typically referred to as a REST API) is much simpler than building your own protocol. You might as well build a desktop GUI over top of a web server.
Making the desktop app send updates back to your mobile application is basically impossible using a bi-directional socket architecture. Your Android should not be running an open server socket continuously just for your application, mostly because battery drain, but because its network address is subject to change frequently, and you therefore additionally need a registration server from which your device would reconnect to. Such a service exists as Firebase Cloud Messaging, which is a rebranding of the GCM technology made by Google, and it can be used to send push notifications to devices, but only with small data payloads.
See here about what activities occur on an Android device for notifications. How does push notification technology work on Android?
Back to the question about databases. Suggesting one to use is too broad. And you only need one of those if you want to store and/or query or join datasets. The same computer running the desktop app can install and run whatever flavor of database you prefer, whether it's a relational database or noSQL database, entirely up to you. The only realtime databases I know of are RethinkDB and Firebase.
You could also just hold a SQLite file which is as good as a small scale database (even the SQLite documentation recommends it for low traffic web sites).
Firebase supports web interface, so you can develop html code and integrate in desktop app, something like web integration in windows form application
Starting to build an app where we will have a desktop and a mobile client applications. These two apps will exchange messages/info on frequent basis. The idea is not to have any server/central entity for this communication. We want to send/receive messages without any server implementation. I googled on these and got peerjs.com, openpeer.org and google project apprtc. Peerjs and apprtc are kind of web based applications which are not in our kind of.
But still it's not very clear on how this things works out as they involve any server or not. Kind of stuck and not sure where to start and how. Is it possible at all?
We are not yet tied to any platform, so open to any kind of implementation. Please share if you have any similar experiences of any applications using this kind of technical stack?
use webrtc ios project, and its what you need
https://github.com/gandg/webrtc-ios
Sockets is what I'd use, assuming the network requirements mentioned above
Those two devices may or may not be on the same network.
Then you need a server of some form, whether you want one or not. That server may simply be a data broker (see PeerJS) or provide more functionality, but it must exist. That server may be one that you host yourself or be some common cloud provider, but it must exist.
Hi I need to develop a fully functional IM solution (like viber or whatsapp) for android. It will have the basic chat features plus many more. Can any one direct me on this. I don't want to re invent the wheel so my target is to use the existing thing as much as possible for the chat server etc (some thing like jabber). If one can direct me for this, or give me some good advice for this it will be a great help.
Edit -
I will extend the application future to allow other platform clients like Windows Mobile or iOS clients. In that sense what would be the best technology to implement the server? It must handle real time traffic well. Will I be able to wrap or extend some sort of a XAMPP server to get my work done?
This is what you need. http://developer.android.com/google/gcm/index.html
It has everything you need for developing applications like viber, gtalk, instant messaging sistems, global user notifications etc...and its pretty easy to implement.
A good solution if you don't want to reinvent the wheel is to create a Jabber / XMPP client on Android and all other platforms.
Server-side, you can use an OpenFire server for managing the roster and conversations with the Smack Library
Google Cloud Messaging as mentioned Janbo is the best way for sending push notifications to your mobile app.
What you could look into, is something like Firebase. They have an incredible api for such applications
firebase link to android docs
Plus it gives you a backend at the same time for free.
I'm posting this here because the thread I made on programmers stackexchange didn't get any answer and I need an answer for this rather fast, so here we go:
For a school project we are looking to implement push like technologies in our Android app, we need to send push messages from a server (Tomcat) to the Phone (Android).
After doing some research I've found that XMPP would be a good option for achieving this type of push notifications, now my problem is how I should integrate this with our Tomcat server where all the information and events will happen as well as where all our other pages are.
Is it at all possible to have a XMPP server or module running inside of Tomcat or can I build my own lightweight module(I was thinking something like a servlet) to handle this?
If you have any better ideas on how to achieve push notifications I would be really glad to hear them, whether it be using a totally different approach then XMPP (I've looked at long polling, MQTT and some other things) or some other way to integrate the solution into Tomcat.
The requirements we have is that we must use Tomcat and Android 2.1 (so C2DM is not an option) and set up push notifications between these.
You can probably run some servers within Tomcat, but I don't think you really gain anything from this setup with respect to XMPP. You will in effect have a server running inside of another server.
The only advantage I can see with this is if you want access to the server internals from some other web application, but for that I would either make the web app another client, or build a custom communication module in the xmpp server that the web app can use to communicate outside of standard XMPP.