java : voice chat and text chat - java

I want to make a card game made in Java. People can run it on their pc. They can add their friends to their contacts list and when there are 4 players online they can begin a game by one of the players hosting the game. The players can communicate by text or by voice chat Think of it like a chat client that allows users to play a card game and allows voice chat between the 4 players at the same time.
i dont know how do go abt the above project.Can anyone suggest me
some framework or other things that i can use to devlop the above app?
Will it be like a p2p application?

Start with chat using this tutorial. Run your own jabber client or use gTalk and write some code for the client side.

As I understand you are going to make some kind of browser or desktop game app with both text and audio chat options.
For chat app you will need a backend and client-side solutions.
If I understand you right, you have not much experience with chat apps, so preparing everything from scratch might be tricky for you.
Therefore, I'd recommend trying a ready backend and SDK for developing chat and audio chat part of your app. That should spare a lot of effort and work for you and you will be able to concentrate on UI implementation of your chat and audio chat.
Since you need both text chat and audio chat solutions, I can recommend ConnectyCube, since there you can find both at one place.
For browser or desktop apps you can use JS SDK. Here is the documentation how to connect it to your project.

Related

Display activity on 2 android devices simultaneously over a network

I have to create a simple single and multiplayer game in android about tilting the phone and recording the quickest time in a certain direction. I have successfully managed to create the single player version in Java. However I have no clue where to start with the multiplayer option where the game starts simultaneously on both devices where one is a server and the other the client (decided beforehand by the 2 people). I did take a look at the Android p2p website, but it wasn't much help. I have used Android Studio for the project.
I have all the math and logic ready from the single player, I am only struggling to how I can start the multiplayer by displaying an activity on 2 separate devices simultaneously. Unfortunately I don't have code to show for multiplayer as I have no idea where to begin.
Any help or advice will be highly appreciated.

Java lan video chatting

I want to build a project of video chatting + messaging by java without internet connection through *lan*. But i can't get any idea about what to do and how to do? I am beginner in java GUI. So I want to know the topics that i have to learn and from where?
well, you will need to look up data streaming, showing video stream on panel and socket and protocol manipulation in the java docs and other online guides. those are the foundation you will need for the project. as for the GUI, it is not hard.. there are many tutorials out there.
if you face a problem we will help, but we will NOT do it for you... start something first.
examples:
GUI
Network basics
Video streaming
do your research... that is the way to learn
also, research steps of making (analyzing) a project

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.
I found this:
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
from here: https://stackoverflow.com/a/8024626/1184256
This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access?
I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction.
I have also found OpenTok which after building a sample server and client on my site I have found that it works on desktop browsers but not in Android browsers. Please don't steal/use my apiKey or sessionId.
I have also found libjingle which will allow me to use Google Talk's peer-to-peer voice and video chat. I am thinking this will be the way to go, but it means building a video chat app from the ground up and wrapping it around these libraries... yeah. Anybody done this already?
I know this is essentially a duplicate thread, but I have searched for days and days for an answer and this is the closest I have come to getting this done.
BTW the reason I need this without user interaction is for a Telepresence robot, thus there won't be anybody actually holding/using the phone when I initiate this call.
Please HELP!
You'd have to actually change the built in android app (Talk?) that receives this intent to automatically accept these types of intents. There's no way to do it from a standalone app for security reasons.
I don't think that live video streaming will work natively in Android Browsers, since they dont support WebRTC (Yet) and do not support flash. With that said, OpenTok has an Android SDK in beta that lets you stream live video from android phone to browser, another android phone, or even an iOS phone as long as everyone is connected to the same session. Like you said, this does not work over the browser and you would have to build a native app.

Java Server Options

I want to make a browser-based game in Java that will depend heavily on networking. I wanted to make it so that one player in the game hosts it and the rest in that game play with him, but with Java that requires signing the applet and port forwarding and all kinds of stuff.
So my question is, What would be the best way to design a server system for my game without
spending tons of money on 24/7 server hosting? If I didn't explain parts of my question well enough, please tell me and I will reword it. Thanks in advance!
A Java Applet is not a strictly 'browser-based' game because it will require the JRE.
If you're intent on Java, you might look in the Google Web Toolkit. It allows you to write client and server code entirely in Java and compile it to JavaScript. I'd caution that it has a steep learning curve especially if you aren't familiar with servlets and client-server programming in general.
Here's an example game made in GWT:
http://allen-sauer.com/com.allen_sauer.gwt.game.hornetblast.HornetBlast/HornetBlast.html
As for server hosting, if you don't want to purchase/maintain your own server, you might consider a cloud provider such as Amazon Elastic Compute Cloud (EC2). A single instance will run you $40-$70 per month.
My first guess would be to make the game peer-2-peer , so that a server is not involved except for downloading the game. When the game starts, have it prompt for the IP addresses of your friends. This could be sortof a password into the game to get it started.
Some thoughts/ideas:
http://java.sun.com/developer/technicalArticles/peer/
http://code.google.com/p/jsmpp/
http://www.ibm.com/developerworks/java/library/j-jxta2/

Need java code for chat program in wireless network

I have been written chat program code for wired network.
I want to write the chat code in java for wireless network.I googled it for this.But i can't found that.So please guide me to write the chat code in java for wireless networks in java.
Thanks in advance.
The reason why do didn't find anything on Google is probably because it's no different from working with a wired network. The type of medium used for network communication lies on a lower level than your Java application is suppose to care about.
Creating a chat program on a wireless network is not different from creating a chat program on any network. Normaly, you don't have to handle layers that deep in the network stack.
So basically, what you are looking for is infos about how to create a chat program in Java. Your question is a bit vague. Do you want to create your own chat protocol or implement an existing protocole, like XMPP (the protocol behind Jabber and Google Talk)? The first possibility is a bit complicated and kind of pointless outside an academic context, so I go with the second. You can look at libraries letting you use XMPP in Java, like Smack:
http://www.igniterealtime.org/projects/smack/index.jsp
Hope it helps...

Categories