Connect from java mobile application to webservice to read messages - java

I have a website where users can send personal messages between them, now I want them to recieve the messages also on their mobile phone but without having to send them a SMS.
I am thinking about providing them with a mobile phone with internet access over GPRS or 3G, then develop a Java application that will connect to the website and retrieve the messages.
On the website I am thinking to make a webservice where the phone will login, get new messages, and also be able to answer back to messages.
Does anyone know any mobile application tutorial that will do that? Or do you recommend me where to start? I never done a java mobile application before, I only work with websites and PHP.
I also tried to use ICQ, the client is already done for java and for iphone, and I've also found a script that will send ICQ messages from PHP, but ICQ server bans you for 20 minutes when you do many reconnections, so I have to develop some kind of ICQ bot always online that will check for new messages to send from the mySQL database and then send them, one per 2-3 seconds, so the server won't ban me for flooding.
Well any advice or recommendation is welcome about how to have users connected to the website messaging system from their phones.
Thank you!

Instead of a Java Application, I would do a mobile HTML web page for the mobile devices because it will be simpler to deploy. I know Java is supposed to be WRITE ONCE RUN ANYWHERE, but with JavaME is not that simple. You will have to create special deployments for different phones, and there are phones that do not support JavaME (iPhone) at all.
With a mobile WEB SITE, the only thing your mobile phone needs is a browser. Pretty much every feature/smart phone have a browser these days.
If you insist on developing a JavaME application, you are on the right track. You can publish some WebServices on your WebSite and consume them from JavaME. Here is a tutorial on how to do that.

Related

.NET MVC website into Chrome App

at my job we are developing a MVC .NET website, which use RXTX Java library for serial communication, it's really simple, just sending strings to serial port, but i really want to part away with java and i thinks that a chrome app could solve our problems.
My question is, how can i have a chrome app that shows our website, and how can our website use the serial api from the chrome app. It's that possible? What other possibilities do i have?
I know that i could use a service for communicate with the serial port too, but i like the idea of having a website that runs just like a native app, but, is a good idea?
There is the USB api, perhaps you can find a USB-to-serial adapter and write a module using chrome.usb
I hope I understand your question.
You can write a packaged app which communicates with the clients serial port.
A description can be found here: http://developer.chrome.com/apps/serial.html
Once you receive data on the client, you can push it back to the server.

Create a basic network app

I have a little question about an android app with a function "remote" use via internet.
So I have these ideas:
Create a webservice using php on the server, and refresh the client app all x time like 4-5 sec
Or make a java server (so I don't know how I can do that)
I just want make a remote connected via user/password to the server and the other app connect to the server and refresh his status.
Do you know the best way for do that?
Thanks
The question is not very precise, but as far as I understand it, both your ideas implement the 'pull' concept, that is the client app checking the status of the server every now and then.
If you want the app to be instantly notified of the server status change, I would suggest push notifications with GCM (Google Clound Messaging). You can find some basic descriptions and examples at: http://developer.android.com/google/gcm/index.html
Sending a server-to-client notification is simple regardless of the platform you use server side. E.g. for PHP integration with GCM, check out this thread: GCM with PHP (Google Cloud Messaging)

How to send message to another android mobile using socket programming?

I am using API 10 and trying to develop an app for sending text and Multimedia messages to another android mobile using socket programming. What should I do for to fetch the IP address of mobile?
Lets explore the concept first..
Here we go :
What should I do for to fetch the IP address of mobile?
Which IP address...? Which keeps changing over the fraction of time and which does not hold any static ip...? You must read and study..
Network Systems
Operating Systems
Data structures
Database Systems
Software Developmental Life Cycles and Paradigms
Information Systems
Procedure oriented Languages
OOPS languages
Then you must have analytical and reasoning abilities of how things must be developed and how it can be implemented along with above knowledge.
Every device on internet may be mobile phone or a computer holds dynamic ip address.
I am using API 10 ..??
This does not matters what you use..!!
Trying to develop an app for sending text and Multimedia messages to another android mobile using socket programming.
socket programming..!! Please Do some basics of socket programming implement some sample codes first.
I have done it all... :(
Then its time to get all books back on the table to clear the concepts again as we do know nothing.. Or very poor a reasoning skills..!!
How Stuff Works :
Lets take example of any major social media like whatsapp and not only whatsapp but it is the very basic concept which every developer can tell you or follow to develop what you said..
Program your app to communicate with your web-server via sockets
Every App user must register to create account on server.
If any user sends message save it into his accounts sentbox on server
Check if recipient has a account on this web-server?
If yes then copy that message into his accounts inbox
Make app to fetch data via sockets if there is a change in his account on web-server
These are basics which can be extended to the IsSent and IsReceived by some tricks
Tricks..? Fetch user data via app on which screen user is? and send it to server.
The same data can be shared to show IsSent and IsReceived ..!!
In Short :
Every app performs socket programming and communicates to the fix server. which has fix static Ip address or a web server. As a end user who does not know programming and basics of software engineering :
Keeps both phones near to each other and asks another ... I have sent a whatsapp message to your phone.., Look does it received...? Not received yet...???!!! Get the both phones close to each - other .., so that it will get sent and received soon... Oooh... See .... I said .. Keep phones closer to receive messages faster..!! :)

Send an SMS from mobile connected to a PC and persist the incoming messages

I want to send an SMS from a mobile phone which is connected to a PC. This sending process should be accessed using a browser (should be a web based application). Moreover, incoming messages should be persisted in a MySQL database. Is this possible? Any ideas may help me a lot.
Check whether there's any kind of API for the mobile. If not, get another mobile. If you post the exact product name someone may point you in the right direction.
Al other requirements are easily handled with any web application. Dive into servlet/JSP or PHP programming.

Server on windows, clients on android

I am now trying to do a project which is, there will be a server on windows pc and there are some clients on android devices.The point is the server one should control the android devices.For example it choose a image or video, send them to the clients and the clients play or show them.Remember the clients should be control by the server.
So could anyone tell me a proper way to do that, which protocol should i use, how do i send the files to the clients and how do the clients react? I am thinking of using java for the server and of course the client will use android application.
Thank you.
You might find Cloud to Device Messaging (c2dm) useful: http://code.google.com/android/c2dm/index.html
In essence, c2dm allows a remote server to send an Intent to an Android app. The device-side app can then respond to that intent to take the requested action. Chrome2phone works this way to open web links on a target device. http://code.google.com/p/chrometophone/

Categories

Resources