Device to Device Communication in Android - java

I have been tasked for university to program a mobile phone application. I have oppted for two mobiles to communicate with each other via message.
I would like the application to connect the mobile to the internet to send the message and the other mobile to connect to the internet to recieve the message.
I am using Eclipse IDE.
Does anyone have any ideas for good examples of similar application source code so I can develop my application using appropriate protocols.
I would appreciate any advice and I am certainly not looking for someone to give me "the answer" I am really looking forward to getting stuck in. Though I have never touched an android phone let alone programed one. So some advice would be amazing!!
Thanks
Si

Get used to this site: http://developer.android.com/index.html Learn it, love it. It's full of useful information. The Videos section gives plenty of live talks about what exactly Android is among other topics. One of the first things you need to do is go to the SDK section. It gives a detailed guide on how to get setup. The Dev Guide is great for learning more about Android and how to program Android apps (not just Java programs) especially while just getting started. Resources is full of code examples and articles on specific issues and Reference is the entire platform documentation. #Matthew Willis has already given a helpful link from the Dev Guide.
Look around the site, download and install the SDK, and come back whenever you have any questions. Good Luck!

Before you determine the technical solution you need to figure out how any two devices that don't know about each other will communicate.
In your case, where you seem to be attempting to develop some kind of peer-to-peer solution you most probably will need some kind of server in between where your phones send messages to and poll for messages.
If you are using WIFI, you would have each phones IP address and could configure each phone to communicate with each other directly.
Once you determine your architecture then something simple like http may be enough to communicate.

You might check out What is Android? to get an idea of the frameworks/libraries that are available on Android. Reading the links in the left pane at that site lead you through a nice series of articles about Android.
In terms of ways for two devices to communicate, they are many and difficult to enumerate. In general you will have much better luck with specific questions here than you will with broad questions.
You might be interested in reading about C2DM for pushing messages to a device; if not, there are many other alternatives involving polling.

GCM CSS is probably your best bet
https://developer.android.com/google/gcm/ccs.html

Related

Linking two phones/users together in Android app

Hi I am designing an Android App using Android Studio for my class and one of the requirement is that the app should link two users together as "partners" so that they can receive notifications or messages from each other. I already have google sign in available but I don't know how to link two users together. Can someone point me in the right direction to get started? Thank you.
You're looking to create an app that can connect users wirelessly and then do whatever tasks you wish to do. Now I'm not going to give you the code or anything like that, but I'm going to point you in the right direction as you asked.
The Android Developers site is a good place to start: Building Apps with Connectivity
The first two categories are closely related to your type of question, and will give you the stepping stone you need to start developing an app that fits your purpose.
Anytime you have an actual issue with coding it, StackOverflow will have countless solutions I'm sure.

How to create a server for Android app which receive and transmit data to my application without socket?

I want to create a java server application which receives data from an Android client and also transmit notification to client. Actually i did not know much about server apps. I am quite familiar with servlets and mysql, is there any tutorials based on these??
So any suggestion how to build it or any tutorials for it?? please help me!
What you are probably looking for is Google App Engine a SaaS by Google. While there are many alternatives this is probably the best route you can take for implementing a Java based backend. Follow these tutorials* and you'll be good to go. Keep in mind the GAE is a bit complicated and will take some time to get on your feet.
https://cloud.google.com/appengine/docs/java
More tutorials on GAE can be found by a nice google search!

Android -> PC USB Communication

I'm something of a novice when it comes to Android apps, so bear with me. I would like to have communication between an app that I make, and a process on a computer. This could be using TCP, or with some USB-specific protocol. I was thinking I'd write the computer-side application in Java to allow for better cross-platform support.
The research I've done thus far has mentioned a concept of USB hosts, which seems like the sort of thing I need to use. The documentation for all of this has been a little unclear. Could someone please either give me a link to a clearer article, or explain an article? Thanks.
What I'm looking for is a way for a PC to send data to the android device. The device acts on that data, then sends it back to the PC.

Getting Started with Mobile Value Added Service, MVAS

I am interested in mobile development and have been self tutoring myself android development.I also plan to learn I-phone development and also cross platform development with phonegap.
But being from Nepal i see that if i would develop an app most of my users would not be smartphone users. I seen another option is SMS based MVAS applications and thus would like to learn how such applications works and how such applications are developed and deployed. I have been searching on Google and have not been able to find any resources that goes into technical details. I have found a lot of materials on what MVAS is and what it can be applied to, but not a single resource on how it works and how to develop MVAS applications.
If someone could provide me with some answers i would be grateful as i am really interested in finding more about how such applications work.
PS: I really do hope that there is someone who can help me out with this because i see that there does not yet exist a MVAS tag in stackoverflow.
I have found two ways this can be done. There are Open Source Solutions called front Line SMS and Rapid SMS. These tools can be used for receiving and sending SMS and can be integrated with you server using a GSM phone or GSM modem. After you receive the data how you use and handle it totally depends on you. This solutions can be integrated into your existing systems and you can also write new solutions to serve content and other data.
http://www.frontlinesms.com/
http://www.rapidsms.org/

communication project using android

i'm doin my project in 8th sem telecomm engineering, and i'm plannin to create a DUPLEX(not confident whether it'd be full or half) communication app using bluetooth and wifi as channels,something more advanced than a simple walkie talkie, and i was wondering if this is possible for a one man army??? also i was wondering if it is possible to do so with android versions 2.2 and above... can i just program the bluetooth settings in app in such a way, that, it doesn't pop up for user permission to accept a voice message from the calling party??
and is there a possibility for creating multiple channels(one for Forward Voice Channel and one for Reverse Voice Channel) using bluetooth or wifi?? here's a list of few knowledge i possess:
JAVA: basics, done some gui in desktops, know some imp classes,only SE6...
WIRELESS COMMUNICATION: learning it this semester, stuff like how base station accepts incoming mobile station request and redirects it to dest, mostly 1g in our portions...
OPERATING SYSTEMS: general, looking forward to learning android and linux os...
C,C++,DSP,and SOME ELECTRONICS...
oh, and iwoul like to implement these well within 7 months duration...
people please ENLIGTHEN me with your wisdom and references to useful websites ASAP...
my THANKS AND WISHES to thee...:)
The first big problem i see is that on using wifi for this, and as i understood it is some sort of (advanced) walkie-talkie app with no rooter inbetween the communicating phones, you have to implement adhoc-wlan on your android device, which is not supported by android, so you will need a rooted device for that, and the implementation of adhoc-wlan on android is definitve possible (have a look at this code: http://code.google.com/p/android-wifi-tether/) but nothing easy (i have done it myself for an university project).
And you asked if you can avoid the permission pop-up for an incoming message, but on an android phone activating your bluetooth or pairing it with an other device will always ask for permission from the user.
I cant help about the multiple channels you were asking for.
As Answer to your big Question: "is it possible for a one man army?" i would say generelly yes, but it depends on how much other stuff you have to do. Since you were writing this is an project for university, i dont know if this is your only project and you can invest a lot of time in it. If so i guess it is possible, but it will be an quite big project and you should be willing to work yourself relativly deep into networking stuff.
On google.Code you can find some projects similar (at least the wifi part) to what you think about to do, take a look at them...

Categories

Resources