We developed application written in Java/J2EE using which send and receives SMS from service provider and presently we are facing problem that there is some delay in messages and it cost's more for us.
by considering above situation we planned to move to GPRS technology (which is more cheaper and considerably fast).
So please suggest a course of action I can start with and post any sample application for GPRS-enabled system in Java.
With GPRS you would need a client application running in the mobile device. This means a lot of headaches for developing, deploying and supporting. Also, although it would be trivial for the clients to send messages, receiving won't be so straightforward. You would need to implement some kind of a "push" service. One of the problems would be that the client application should be always running.
In general, it isn't easy to replace SMS messages with GPRS communication. You may need to considerably change the architecture of your system.
To make a GPRS application using java you have to need GPRS Modem. First of all you have to make one container which handle request and replay of GPRS modem and your API. API contain private ip and port number wich send the request to container and container then send request to modelm and modem will give response to container and it send back to API.
By using methd Socket("IP Address", port number) you can connect with container and modem .
You have to need a public Ip Address andPort Number, it create virtual pipline between modem and container like as a telnet.
Using GPRS instead of GSM to send an SMS will not cause the SMS to be delivered any faster. You're barking up the wrong tree.
Related
I have an idea for an application where one device is a server, and other devices connect to this server.
The clients would send data and call HTTP requests (or whatever is equal to them in this case), and the server would receive the request and act on it.
I understand there is such a thing as Sockets, but does this fulfill my requirement? Will I be able to call requests on the other device?
Example usage: The client clicks the + button, and the server increments the value.
Have a look at P2P, it uses Wifi Direct, so one device can be setup as a host server and the other devices can register to that as clients.
Check out the official documentation.
i am using this tutorial as guide. i am creating an android app which is basically chat application. this uses socket programming to communicate .
i want to connect directly to device and deliver the message. the message does not go to server. server only tell me the address of the device thats it.
i followed the tutorial i mentioned above and this only works for the case where client and server are within same wifi/network. i want to connect to server from client irrespective of their network connection place. how do i do it from any network to any network.
i think i need to use port forwarding , but this is not practical . so we better use a server for keeping track of all the ip changes. and deliver the messages directly from the source to client. so how do i do it. please suggest any resources.
update
as of now what i studied is i have to use innetaddress to communicate if i am inside an wifi router.
thank you
I would like to manage a connection between 2 applications, they will run on diffrent phones.
The purpose doesn't really matters let's say that it would be some kind of a chat.
How can I create this connection between the applications? I know how to do it on pc java programs using the socket and the serverSocket classes but I guess it's diffrent in here since the phone might change his ip when he moves between networks.
So how would you do that? how would you create a connection between 2 applications/phones
Given the scenario you described in your comment, using Push Notification i.e Google Cloud Messaging (GCM) might be sufficient.
So, when program B wants update from program A, it will ask the server to push a notification (via GCM) to program A. Note that program A will not connect to the server every x time to check for updates.
Another out-of-the-box solution is to use SMS if the communication is not so frequent and messages are short. Here I mean SMS that will be processed directly by your app (given it has certain attention word) and will not go to the inbox i.e. no SMS notification on the phone
Since the two phones will, as you note, have changing IP addresses, you'll probably need to use an intermediary.
The general design pattern here would be to have a server with a fixed IP or DNS address that relays messages between your two mobile devices. The simplest implementation would be a webserver, to which each phone would connect via HTTP(S) to transmit data or poll for updates.
There are a number of backend-as-a-service platforms that provide this type of functionality pre-built, and would likely suffice for something like a chat system. Check out Cloudmine and Parse.
If you need a low-latency or near-realtime connection, you could also consider implementing your own server that uses the Android C2DM (Cloud to Device Messaging) service.
See Android's Sample Bluetooth Chat App, It will give you an idea for how it can be achieved.
my apologies if this is a trivial question.
I've recently begun doing some android programming and I'm writing a simple app that allows you to use your android device as a controller for your windows PC. Specifically it allows the user to do things like turn off the machine, make it sleep, reboot it etc etc. I'm currently using a python library called CherryPy as a server on the windows machine to execute the actual win32api calls to perform the desired function. What i'm not sure about is how to discover (dynamically) which machine on the network is actually hosting the server. Everything is working fine if I hardcode my machines public IP into the android app, but obviously that is far less than ideal. I've considered having the user manually enter their machines public IP in the app, but if there's a way to, say, broadcast a quick message to all machines on the WiFi and check for a pre-canned response that my Python server would send out, that'd be wonderful. Is that possible?
Thanks in advance guys.
Try sending a UDP packet to the special broadcast address 255.255.255.255. Every device in the network should receive a copy of that packet (barring firewalls), and you can arrange to have the server reply to the packet with its identity.
Write your app using the alljoyn framework. AllJoyn will handle these details for you.
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/