Send push-notification from Android to iOS and vice versa? - android

I've just learned that its going to be pretty tough for me to realize an app that can send a push notification to another device, BUT: is it even worse to send it from Android to iOS respectively iOS to Android ? I know it's possible because WhatsApp does it, but okay, WhatsApp...
The way I need it is, on Phone A (Android) a user clicks on a button "Send 'ring'" to user B (iOS).
When A clicks that Button, an AlertDialog (UIAlertView) shall appear on user B's screen.
That's just to describe what I want to do, it obviously won't only send a 'ring'.
Any suggestions or good tutorials?

To do this, you need to implements the server-side logic, but everithing it's much simple if you use some services like Parse
Here the docs related to iOS and Android.
They have their SDK, there is a pretty good documentation, you can setup everything very quickly. We are using Parse a lot recently and (specially for notifications) it's very helpful.
There are others services like this (most of them based on node.js):
Deployd Open Source
Sockethub Open Source

Related

Is it possible to communicate between website and app?

When a website is implemented in an app, is it possible to open an popup in the app when clicken on a link/button in the website?
If so, what are the possibilities?
Thanks
Grtz
Your case I understand may have two scenarios to it. Say on the same device, click a link on browser it opens in the app much of what medium and a couple of other apps do. Second case is an independent phone and independent browser. Here I would suggest using web sockets to send real time data to the client app when a certain change occurs on the server side which may be caused by change in another client. Basically close to what services like Firebase offer but not actually the same

Building an app with group messaging feature. Suggestions?

without getting into too many details, I would like to build an app capable of messaging between small groups of people. Basically, I need an API that will allow me to a) create a group message, and b) will allow me to later add people to it based on their selections from the application itself. I am relatively new to server side coding and am looking for some suggestions, tutorials, suggested apis (google hangouts vs facebook vs any other services that would be of use), etc. I already have google plus integration with the client side and server side authentication, so it seems like if something is possible with hangouts that would be the easiest route, but again I am just looking for anything really at this point.
The way I was kind of (hoping) it would work is that some messaging service provides the group chat and gives me an ID to it, which I could then have the clients request to be added to a particular chat and then I pass them back the ID to the chat and it begins an intent that takes them to the app itself that is hosting the chat between my users. Let me know if this is possible please, along with any suggestions!
You might want to try researching the ejabberd messaging server. It is probably going to be a bit heavy for your needs as well as difficult to learn (it is in Erlang) but I've found it extremely steady as a back-end for building a messaging server.

Send text to app (not specific phone number)

I don't know if this is even possible, couldn't find anything usefull on the internet.
I wanted to make an app, that me and some of my friends could send a message trough "my app" and that everyone who has that app, receive the message, without using a phone number.
So basically, same as WhatsApp GroupConversation, but then without using a phone number.
Is this even possible?
If it is possible, could you put me on the right track to start with.
Hope I am clear enough, if not, tell me :)
Edit:
This just pops up in my head (didn't look on internet yet), but what I want, is a kind of a shoutbox.
This is possible, in fact WhatsApp does not use your phone number for this at all.
You simply provide your phone number to asure a unique ID and proof that you are indeed in possession of this phone with the validation SMS.
From there on, your phone number isn't even used anymore.
You can go 2 ways with this;
Create a simple webservice with a database on which you just save and request messages. Maybe make a little difference between get all or get latest message. Anyone, hooking into the group, can just fetch the same data. With the use of GCM push notifications, you can make this pretty instant.
Use XMPP, which is a chat protocol kinda all the chats use. Whatsapp, Google talk, FB messenger... This will provide you with instant messaging just like any other chat app or program you know.
Option 2 is by far the best in final functionality, but be warned that XMPP is quite complex and error prone.
You can look into the asmack and asmackx libraries for Android, which will give you the basic functionality with ease. Going a bit deeper, you'll have to dig into the protocol and really get to know it though.
ps. For both you'll need your own server, however with asmack(x) you are also allowed to use Google's Talk servers for free. Communication will go through your Gmail account. Basically with this you just make your own version of Google Talk.
It is possible by implementing server-client architecture. Your app will use a common database for all the users. whenever an user install your app, he will achieve an unique user ID. if anyone uninstall it, his id will be destroyed. You can track the users from those ID in database. You don't need phone numbers.

Send data from web browser to android app

I am working on an home automation system my android application can turn lights on and off using bluetooth, i want to add another feature of controlling the devices from webpage.
Can anyone tell me what is the easiest way to do this, i know GCM(Google Cloud Messaging) is the best solution but is there any other better or easy way of doing it.
And if anyone has some working piece of code, please share it with me; I want to finish this project as soon as possible
If you have a backend built using PHP, Rails etc you can have API's that the app can call and check for instructions. However, this has the side effect of draining he battery due to continous polling.
If you don't wanna go the "polling the server periodically" way, you can use GCM as you mentioned.
You can send data using the JSON data format. This is easily the lighest and most versatile data format used by many web and android apps and has tremendous support from third party libraries as well.
Here are some tutorials for this:
http://developer.android.com/guide/google/gcm/demo.html
http://android.amolgupta.in/2012/07/google-cloud-messaging-gcm-tutorial.html
http://www.londatiga.net/featured-articles/how-to-send-message-to-google-cloud-messaging-gcm-server-using-json-and-php/
http://fundroiding.wordpress.com/2012/06/29/google-cloud-messaging-for-android-gcm-simple-tutorial/
http://androidjayavelu.blogspot.in/2012/07/google-cloud-messaging-gcm-tutorial_27.html

Implement app able to receive push notifications and launch web browser

What is the easiest way to implement a simple app which does two things:
receive push notifications (new messages in user's inbox),
open a page on my website in a webview or web browser.
It would be best if the solution was portable among iOS, Android and possibly other mobile systems like Windows Phone and BlackBerry 10, but I'm happy with separate solutions, if it's the only way to do it.
I suggest that, checking out Parse apis for this task.
There are solutions like http://xtify.com/ or http://urbanairship.com/products/push-notifications/ that provide an all in one package across platforms but I don't know the quality of service or which one would be right for you, some research on your part will be necessary if you choose this path.
Or you could implement it yourself but it will require your own server. The server would notify both Androids C2DM And Apple Push Service at the same time. You will have to implement the client side on each.
For iPhone here's a good tutorial for setting it up http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
For Android http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html
You register your app with both services then sends the push keys to your server. With the keys the server can then notify both platforms respective push services to send a notification .
I can't really help with the server setup stuff as its not my area of expertise but this is how we implement push notifications for the apps my company makes.
I'd recommend a Phonegap (Cordova) app and UrbanAirship for the notifications. You can get a free account with that. It's relatively easy to implement too.
As for the browser, I'm not sure exactly what you want it for. Could you elaborate and I'll post a response.

Categories

Resources