I searched a lot but I found no solution. I'm pretty sure that it is not possible but maybe one of you how you can do this.
I have a Server that can send Push-Notifications to my app. Therefore I use the Google Cloud Messageing Service https://developers.google.com/cloud-messaging/
Unfortunately the rules for when a notification should be sended are not that easy. So I would feel a lot better if I could write JUnit-Testcases that can subscripe to the project and receive these notifications. And it would be very helpful if I could test this against a real system.
Howoever it seems that you can only recive push-notifications in real Android and IPhone -Apps. Additionally there is a Chrome-App thatcan do it https://developers.google.com/cloud-messaging/gcm
Is there any possibility to receive a GCM Push-Notification in a Java desktop application?
Since there seems to be no Solution for this I wrote Something that suits my needs. Feel free if to do anything you want with this:
https://github.com/codemaker219/gcmproxy
Related
I need to create an app for android with Java for voice call, the data which are provided to me are: iceServer: ["stun:stun.l.google.com:19302"], channelName and EventName. Are they enough to build an application for voice calls or even needed something for signaling? Thank you!!
Yes you need of course a Signalling server, you can find many good free open source servers in the Codelab, but if you really want to go for production I recommend hiring a backend developer who has experience with webrtc.
I also recommend to check for Socket.io to firing and catching events.
There is another option for Signaling, which is renting, take this for example:
https://www.ably.io/
https://www.simplewebrtc.com/
but you will pay for these
By the way webrtc in Android is a nightmare because of the lake of resources, so good luck.
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!
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.
I would like to repeatedly (every second) ask for the message (object or value) to GAE (if android client did not create or change something there) from another android device. I need to check it pretty fast, but I know that it happens aproximately once in hour.
I use restlet and I don't want to create new thread and poll by get from this thread every second, because this is very battery consuming. I also don't want to use C2DM.
Is it somehow possible to do this? I have found something about NIO nonblocking http connectors here:
http://restlet-code.1609877.n2.nabble.com/Push-data-from-server-using-a-live-HTTP-connection-td2906563.html
But here is described only the client side and I also don't know if this solution would even be possible to use on GAE and how. Does anyone know more about this approach?
Thank you very much in advance.
As the author of uniqush, I created an entry in the FAQ page specific to this question.
Can I use uniqush on Google App Engine?
Yes and no.
If you just want to use GCM on Google App Engine, then there are some code in uniqush-push which you can directly use.
However, because Google App Engine does not support socket connection, there is no way to use APNS. In another work, if you want to setup a server on Google App Engine, you cannot push any notification to iOS devices no matter what software/library you are using.
I did considered to port uniqush to Google App Engine. But because of this fact, I think it may be better to port it until Google let us use client-side socket connections, or provide some way to connect to APNS server.
Again, if you are considering to use Google App Engine as a server for your App, please be aware that you will not be able to push notification to any iOS device right now. If this fact does not bother you, then do it.
Personally, I recommend you to run a server with full control. It is not expensive nowadays. Amazon EC2 or similar cloud products may be a good choice to run uniqush.
As I recommended above, using a (virtual) server with full control would be a better choice if you want to support more platforms besides Android.
If there is any other question, please feel free to reply.
For being future proof I would suggest you have a single push notification service for both kind of devices. You can either build on your own, or leverage something like uniqush or this
Also the Urban Airship's SDK would be a good option to look at, more details here
this is similar to Urban Airship but only a fraction of the cost. The API allows you to send a C2DM message to a user via a call. After you implement the broadcast reciever, when a user installs the app they are prompted to accept the message. If they accept a token is sent to the C2DM server identifying the user. This token is then used to send them a message via the C2DM platform. The Zend PHP Framework has built in functions for this but if reliability is a concern go with an external provider like Remote Queries or Urban Airship
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