Two Android Clients And One Java Server?

Mar 5, 2013

I've created a java server and an android client (A), the client(A) gets it's GPS coordinates and sends them to the server, I need the server to send them to client(B). I'm not entirely sure as to what to do, whether I should have separate ports etc or what.

Below is my two clients and server

SERVER

[HIGH]import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;

[code].....

With this, I run the server, then run CLIENT B in the emulator and CLIENT A on the device, once I run CLIENT A, CLIENT B force shuts.

CLIENT A / SERVER connectivity is 100%, it prints to console (for testing). What I need to try to find out is how do I send the data to CLIENT B, I have used different ports and i'm sure that's why CLIENT B force shuts.

Two android clients and one java server?


Android :: Strategy For WCF Server With Net Clients?

Apr 15, 2010

I am using WCF to write a server that should be able to communicate with .Net clients, Android clients and possibly other types of clients. The main type of client is a desktop application that will be written in .Net. This client will usually be on the same intranet as the server. It will make an initial call to the server to get the current state of the system and will then receive updates from the server whenever a value changes. These updates are frequent, perhaps once a second. The Android clients will connect over the Internet. This client is also interested in updates, but it is not as critical as for the desktop client so a (less frequent) polling scenario might be acceptable.

All clients will have to login to use the services, and when connecting over the Internet the connection should be secure. I am familiar with WCF but I am not sure what bindings are most appropriate for the scenario and what security solution to use. Also, I have not used Android, but I would like to make it as simple as possible for the person implementing the Android client to consume my services. So, what is my strategy?

View 1 Replies View Related

Android :: Socket Programming - Java - Many Clients One Socket

Nov 12, 2009

Essentially Im trying to get many many java clients connect to a socket on my ColdFusion server (Using the Socket Gateway). However before i even start to code this, Im a little confused about sockets and their performance. First of all, are sockets meant for many(1000+) clients connecting to one socket (say port 2202) on one server? How is the performance if all there waiting for is basically a ping, or something such that when these clients receive this "ping" they can go get some new data.

View 5 Replies View Related

Android :: Communication Between Java Client / Php Server App?

Feb 13, 2010

I have a simple Java client application (Android app). I have to write a PHP server application which receives a request from the Java client application to write some data to a MySQL database or read some data from the MySQL database. It should respond with a status message (Write failed/success) or the data requested respectively. How would I get the Java client send a request and receive the reply from the PHP program and how would the PHP program receive the request and send the reply? I have googled about SOAP and REST architectures, but looking for a simple tutorial which will allow me to implement this simple program.

View 2 Replies View Related

Android :: Sending / Receiving Java Objects To Server

Sep 23, 2009

I have a Tomcat Server in front of a Servlet that gets/stores information in a MySQL Database. My Android application needs to get/ put information on to this server. I control both ends of the communication, so I've basically been exploring the "best" way to send information back and forth. So far, I've tried Jackson for JSON and the native Java Serialization packages. My object is relatively complex and completely serializable.I have no desire to write a "custom" guy at all, as I doubt I'd actually be able to improve on most of the packages.So with that being said, are there any other strategies/packages I should try to get information to/from my server?

View 9 Replies View Related

Android :: Client And PC Server (JAVA) Can't Open TCP Connection

Jun 21, 2010

I'm trying to open tcp connection between android (emulator) and PC. I'm trying to create a new socket and then it crash. the line where it crash: Socket s = new Socket("10.0.2.2", 27015);

View 2 Replies View Related

Android :: Java Server To Handle Client Requests

Jul 29, 2010

Im looking for the concept of creating Java Server to handle Client requests and respond to it , i want to use Google App engine which does not allow Socket connections , so is the client & server in this case will communicate using Http requests? i'll be glad if someone could clarify the logic to me and provide a few lines of code.

View 3 Replies View Related

Android :: Unable To Send Data Over TCP From Java Socket To .net Tcp Server

Nov 2, 2010

i am trying to get an android app to send tcp data to a server on my network. The server was written in c#. When i use the code below to transmit data, the server only receives a whole series of.

Socket socket = new Socket(host, port);
PrintWriter pw = new PrintWriter(socket.getOutputStream(), true);
pw.print("test");
socket.close();

View 3 Replies View Related

Android :: Unable To Create Server Socket In Eclipse (java)

Oct 20, 2010

Hi, i am very new to programming in java however have a lot of experience in .NET (c# & vb.net). I am trying to create a new instance of a serversocket class in eclipse IDE and when i type the following code it is giving me an "Unhandled exception type IOException" and i havent even tried to run the code yet! I dont understand how my code is exceptioning before runtime or what i can do to fix it.

View 2 Replies View Related

Android :: Getting Java.lang.VerifyError When Reading Image And Sending To Server

Aug 27, 2010

I had write one application in that I am reading a image and sending it to the server, I am using Base64OutputStream class. I had tried it in core java and image is encoded successfully, But when I am using same logic in android then I am getting error as java.lang.VerifyError. And Logcat gives following error as............

View 4 Replies View Related

Android :: UrlConnection Working With Java Code But Not For Android - Use In Digest Authenticated Server

Jul 7, 2010

I'm using URLConnection to connect to the main server. The server implements digest authentication. If I connect to the server with java library, the connection is successful. But if I use the same code for android, the connection is rejected for the reason - username and password do not match.

Here is the code for my Java project:

code:...........

The above code works fine and I'm able to connect to my host server which is implementing digest authentication. I'm unable to use the same code for Android to connect.

Here is my android code:

code:.........

If the same code works for Java, it should also work for Android.

The code loops in the Authenticator as it finds username and password not matching in the Android code for some reason which in fact are correct. The code runs perfect for Java project.

View 1 Replies View Related

Android :: Android (Java) Simple Send And Receive With Server

Jun 11, 2009

I'm writing an Android App and I'm looking for the fastest (In terms of setup) way for me to send data to a server and receive information back on request. We're talking basic stuff. I have a log file which tells me how a user is using my application (In beta, I wouldn't runin a user experience by constantly logging usually) and I want to communicate that to my server (That I haven't setup).

I don't need security, I don't need high throughput or concurrent connections (I have 3 phones to play with) but I do need to set it up fast! I remember back in the day that setting up XAMPP was particularly brainless, then maybe I could use PHP to send the file from the phone to the Server? The Server would ideally be able to respond to a GET which would allow me to send back some SQL statements which ultimately affect the UI. (It's meant to adapt the presented options depending on those most commonly used).

So there you have it, I used PHP about 4 years ago and will go down that route if it's the best but if there's some kind of new fangled port open closing binary streaming singing and dancing method that has superseeded that option I would love to know. This tutorial seems useful but I don't really need object serialization, just text files back and forth, compressed naturally. Android comes with the Apache HTTP Client 4.0 built in as well as java.net.URL and java.net.HttpUrlConnection, I'd rather not add too much bult to my App with third party libraries.

View 5 Replies View Related

Android :: Using OS 2.1 With POP3 And Email Clients

Jul 16, 2010

I'm using the EMail Client "Eudora" on my computer to retrieve messages on a POP3 Server. I don't understand if there is a way to retrieve the same messages from the POP3 Server on my mobile phone. The phone is running Android OS 2.1. I manually added all the information into the native E-Mail application on my phone, and it works fine for a couple hours then stops for a few hours, and then it works fine again, but then stops working again for a few hours, and so on and so on.

In addition, I received messages from 8:07AM to 10:39AM, then received no messages between 10:40AM to 1:42PM. At 1:42PM I started receiving messages again; the weird thing is I only received messages after 1:42PM, I can't retrieve the messages from the gap between 10:40AM and 1:42PM. And yes I'm sure I received messages during that time. I can't figure out any correlation between what I'm doing with the phone, and when the phone receives emails.So, my question - Is there a way to view messages from a POP3 server on my Android OS 2.1 phone using any E-Mail client?

View 1 Replies View Related

Android :: Email Clients That Support OWA

Sep 22, 2010

Let's get real here. There are tons of threads that cover email on the droid. But Seriously, What are some good apps that support OWA <-- Emoze is the only one I can find so far, however it is not supported on droid at this time. This should be a very basic piece of software.
- connect to a https:// site - you may need to install a security certificate?
- logon with username and password
- send / receive mail

View 5 Replies View Related

Android :: Inbuilt VPN Not Work For Cisco Clients

May 31, 2010

I am using vpnc on my computer to connect on my university VPN. Once again, the configuration is not straightforward, but, mainly, I use IPSec, I have an ID for the VPN, a gateway URL, a secret word, IKE Authmode of PSK, IKE DH Group, Xauth username, Xauth password, I need to enable Single DES, and I have two 'target networks'.

The fact is that Android (2.1)'s built-in VPN does not ask me all these info. It keeps asking for a pre-shared key (this is evidently the contrary of the certificate method), but I do not have such a pre-shared key. Connecting (to the VPN) through my computer works perfectly. What can I do to make Android compatible with the VPN?

View 2 Replies View Related

Android :: Any Multi IM Clients With Push Notification?

Oct 8, 2010

Was just curious if there were any multi IM clients (meaning, ones that have AOL, Yahoo, Facebook, MSN etc all in one) that had push notifications? The one thing I miss on my Blackberry was the IM+ program. I could set it so that I could receive IM's via email (which come's in handy when working in a hospital and the signal goes out at times).

So whenever someone messaged me, I would get it in my email when I had a signal and respond back via email. Is there anything like this out there for me on my HTC Hero Firmware 1.5? I currently use the free eBUDDY program and have slightly tried out the free IM+ and Palringo. But I am not having any luck with finding one that has the push notification.

View 5 Replies View Related

Android :: Creating IM Clients Other Than GTalk Using Smack API?

Dec 8, 2009

For the past two weeks, I am working to create an application ,which is used to communicate with all Messengers in android. I am using Smack api for that, and now I can able to connect to the GTalk.Now trying to connect it to the Yahoo messenger. But it is throwing some exception. I want to know whether we can create Yahoo IM client using smack api or not. If possible please give the list os IM clients supported by Smack api.

View 1 Replies View Related

Android :: Alternative Email Clients With More Features?

Jun 5, 2010

I find that the basic Androd (On SE Xperia X10) features reliable But basic and I'm very frustrated that I do not seem to be able to copy/paste out from received emails And it would be nicer if the same application handled Gmail too.
So are there any work-arounds or alternative email clients with more features available?

I have asked a similar question in the Droid app developers requests forum but have no responses yet.

View 1 Replies View Related

Android :: Multiple Exchange Accounts / Different Chat Clients

Dec 11, 2009

With Google Talk I'm automatically logged in with my main gmail account. Is there a way to add other gmail accounts to this? Or swap to a different account when I need to? How about non-gmail accounts? Can I add an AIM account, for example? Is there an app that can manage multiple chat accounts? I use Adium on my Mac to have 3 or 4 different chat accounts open (useful for work, people who don't have gmail etc.) and I'd love to do the same thing with my Droid.

View 2 Replies View Related

Motorola Droid :: Any Good Torrent Clients For Android?

Jan 9, 2010

I'm not looking for a program that communicates with my computer or seedbox, I have Torrent-Fu already for that. I'm wondering if there are any decent torrent clients for Android so I can just download a torrent right over my 3G connection. Searching torrent in the Market only gets one client that costs $5 and apparently is missing key features. Are there maybe some good .apk packaged torrent clients out there not in the Market? I'd assume that Vuze (as mediocre as it is), being written in Java, could be ported fairly easily as well.

View 10 Replies View Related

Android :: Techniques For Writing Clients Using Remote Data

Nov 17, 2010

I need to explore the world "You wrote a killer application, but do you have an Android/iPhone/iPad client?".

My questions are:

1) which is the best way to send data to those devices? Soap and Rest as suggested here? Or are there some specific techniques? (My app is written in Delphi and I can expose data with webservices if needed)

2) For x-platform (where by x I mean basically apple products and android) development is there a tool? Or the only solution is write one client per platform that "embeds" a web application optimized for mobile devices?

3) which are the techniques for caching locally some data / working offline? Is it different in the 2 worlds or is it common?

View 2 Replies View Related

Android :: Simple Client Application To Store Clients Information

Oct 12, 2010

I just purchased a Samsung Intercept through Virgin Mobile and am hoping I can find a simple application to store my clients information using it.

I am a Hair Colorist and I have been using a Sony Clie in the past to keep my client info up-to-date, but it finally died. I am hoping my new phone can keep track for me now.

Here is what I need the app to do.

1) Clients Name (so I can easily search for client)
2) Phone Number (so I can call them)
3) Address (not mandatory, but would probably be good)
4) Client's Hair Color Formula (text area where I can write down their color formula)
5) Date of last appointment (and maybe their upcoming appointment)

Does anyone know if there is something out there like this already? It seems like it should be a basic app, but I am BRAND NEW at this, so I have no idea .

View 4 Replies View Related

Motorola Droid X :: Any Android Mail Clients With Real Exchange Support?

Jul 20, 2010

Here's my issue: Came from a windows mobile phone. However, one area winmo is obviously good at is exchange support. Here's what I mean:
I regularly receive and forward large attachments (PDFS - usually 10 megs or so), and the winmo phone made it easy to do so when out of the office. I'd just hit forward and away it would go. The phone would tell the exchange server to forward the mail, and it was done. The phone never actually downloaded any attachments to forward, unless of course I wanted to download it for viewing.

I've found this phone instead of just telling the exchange server to forward the message actually has to download the attachment, then resend the attachment. This is stupidity in it's fullest when working with a 10 meg attachment. Instead of taking a split second to forward something it'll take minutes to download, then minutes to upload, and obviously shorten battery life considerably. So my question is - am I missing settings, or is the installed mail application not able to do so - and are there any android mail applications that will forward attachments off an exchange server without actually downloading the attachment first?

View 5 Replies View Related

HTC EVO 4G :: Use Two Different Text Messaging Clients

Jun 8, 2010

Is there a way to make the text messages from only certain people go to lets say handcentSMS instead of the standard messaging area?

View 4 Replies View Related

Motorola Droid :: IM Clients - Best BBM Clone?

Oct 27, 2010

There are many IM Clients out there and BBM like apps. Some have LiveProfile and some have KiK. Which is the best in your opinion?

View 3 Replies View Related

Android :: How To Connect Mysql Server On External Server In J2me Application

Sep 29, 2010

I have a hosting account at godaddy ruinning Linux. Is has MySQL. I am creating a J2ME application that runs on android and I was wondering if there is any simpler way to connect from j2me application to my MySQL server?
Is it required to install anything at my server? which I cannot do because of the shared account. Any way to just open the connection, update some data in the MySQL from j2me application?

View 2 Replies View Related

Motorola Droid :: IRC Clients That Work With Venison’s Network?

Nov 7, 2009

Are there any IRC clients that work with the Droid/Verizon's network? I can connect to my usual server via its CGI-IRC web application, but none of the Android applications will connect; it just times out.

View 15 Replies View Related

Transfer Data Between One Device As Host And Many Devices As Clients

Oct 9, 2012

What is the best way to transfer data between one device as host and many devices as clients .I want to transfer data(Values like string) from many devices to one in the same time .

View 1 Replies View Related

HTC Incredible :: Facebook - Differences In Various Clients - Adroid - Touch - Mobile

Aug 21, 2010

Differences in the various ways you can access Facebook from the droid (incredible)? Am I missing something here - why are there so many different ways to access it?

View 3 Replies View Related

Android :: Advanced Android Use With Email Services And Clients

Nov 7, 2009

Email Services I use - Google Apps and FastMail.FM. I use Google Apps for Email Standard (Free) Edition. Google Apps Standard Edition helps groups build communities - Google Apps Standard Edition:
* Google Mail with my own domain
* Google Talk with my own domain

Google Apps account also includes:
* Calendar
* Docs
* Contacts

The Primary Google Account has necessary features not offered in Google Apps:
* Google Voice
* Google Reader
* Blogger
* Notebook
* Finance

Unfortunately, Google does not allow the above properties to be including in Google Apps accounts at this time. Therefore, I'm continuously logged into two Google Accounts:
1) Google Apps
2) Google Account

When on the web, Android, etc., I can be logged into both the Google Account and Google Apps simultaneously - two separate gateways that do not interfere with one another. This is also nice because I use Google Voice to place calls as well as sending SMS messages.

Fastmail Account:

I also use Fastmail.FM. Here's a recent article about Fastmail with an interview with Jeremy Howard, one of the Fastmail founders. Here are a few of the reasons why I use Fastmail (enhanced account)
* Virtual Domain Management - MX Mail Servers
* Aliases - Subdomain alias features
* Compose with Personalities Management (alternate sending From: Headers)
* File Storage / Websites
* Advanced Sieve Filtering
* Alternate Logins - One Time Passwords (OTP)

Using these Services on Android
In Google Apps Mail/Gmail (on the web) I have a drop-down menu in the From: header to send from alternate email addresses. When using the Gmail App on Android or through the browser, there is no drop-down menu or option to send from an alternate email address. I've been having the same issue on the iPod Touch (or iPhone) through the Safari browser as there is also no drop-down menu or option to send from an alternate email address. Using the mobile-based Fastmail.fm, I find that this works very well on the Android browser. Fastmail.fm is the only web-mobile email service I've found that allows one to take use the drop-down menu at the From: header to select an alternate email address.

I find it odd that Gmail has a similar From: header drop-down menu on the standard web, but not on mobile devices. Hence, when I need to choose a specific header to send from and I'm on my Android device, I use Fastmail via the mobile browser. The only downside of Fastmail via the mobile browser is there is no autofill like on the Gmail App and Gmail mobile site. I have to "add from the address book" which involves extra steps. However, I have put in a request for this on the Fastmail forum.

Mobile Email Client - IMAP
Of course, all of these services (Gmail, Google Apps, Fastmail) offer IMAP and we can use the mobile email client as a viable alternative. It should be noted, however, that the email clients do not offer the option modify the default From: sending address. I really wish that Android would offer a way to include the standard From: drop-down menu within the Gmail App and on the Gmail mobile web browser.

I have placed a request here in the "Application Requests" forum:
Gmail App, or Mail App, that offers a From: drop-down menu.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved