Hybrid app, push notifications, user created channels - android

I'm working on an app that will allow authors to send push notifications to readers on their mobile devices. I've already created a backend in Yii2 (php framework) that gets data from an author.
However, now that I'm working on the app (using ionic.io), I seem to have encountered a problem. Here are the requirements that seem to be conflicting:
I'd like to send push notifications to all readers that are subscribed to an author whenever that author inputs data into my backend.
These push notifications should be scheduled by the author.
The author should have access to analytics on their books on my backend.
The backend should have a count of how many readers are subscribed to each author (for billing purposes)
I've looked into things like parse, but it doesn't seem to provide me with any method of solving requirements 3 or 4. I've also looked into ionics push notification system but I can't seem to find enough on it to understand how this would all be possible.
Being that this is a reader centered app, I'm also going to need support for Kindle Fire.
Can anyone point me in the right direction? Even if I have to change from developing in ionic to another language I'm open to suggestions from the more experienced devs.
EDIT 1: I've already developed functionality for parts 3 and 4 in my backend, however I'm mostly unsure as to how I can populate it and keep it up to date with what's happening on parse's side (should I choose to go that route). Currently, it can only populate itself from my backend testing methods.

Related

Receive notifications on android upon database change

I have an android app which is capable to interact with a (for now local, but in future online) RESTful database (using PHP and Slim framework).
A registered user can create/upload new text, view all its texts, delete and modify them.
The user can log through different devices (Android smartphones for now, but in future with Desktop computers as well) and perform said operations.
I need that EVERY device (on which the user is logged in) is notified upon each change in the database.
What is the best approach to implement such notification capability either on the PHP/MySQL server and in my android app?
I have heard about Google's Firebase Cloud Messaging but i'm not sure neither if it is the easiest and fastest way to do it, nor if it is compatible with my already working environment.
Please guide me in the right direction as i don't have a clue on what is best for my case.
You have to registered mobile device or desktop to fcm/gcm server or apns in case of iOS . When database is updated on server then it will get a trigger so on after save will send notification push with your payload.

Implementing FCM (Firebase Cloud Messaging) on a MVC Web App

I am developing a MVC Web App. The app will provide a platform for people to sell products and allow people to then search for an view these products.
I have no experience of what functionality Firebase FCM can provide. So my two questions are:
Can FCM be added to a MVC App to send push notifications to Android and IOS phones when a triggered by an event e.g a new product gets added to the web app
If it can be added to the Web App how customizable are the notifications e.g. can a notification be sent based on different type of events e.g. can different notifications be sent when different types of products are added to the web app?
Any advise would be helpful!
Yes... but it's up to you to write the code to do this. That is, you'd need to have some kind of process on your side (probably on a server) that's observing the data powering your web app, or your web app could do the work itself to "trigger" this process when it changes. (It really depends on how everything is structured.) This process could then submit a FCM notification that would go to all your mobile clients.
There is currently no way for this to happen automatically. That is, if you're hoping for some kind of "Hey, Firebase, send off a notification through FCM when you notice that a new child is added to your database" functionality, that's something that does not currently exist.
Since you'd be writing the code to create the notification, you can customize as much as you'd like. :)

Android Push Notifications

I have a news website and i'm developing an android app that gets the news articles from a url as JSON and everything is working well. Now i want to implement push notifications in the android app, so whenever a new article is published a notification with the article's title appears on the android device screen. (like facebook).
I made some research and i found that i have to use Google Cloud Messaging (GCM) but it's not that easy to implement, is there any easy-to-follow tutorial about that ?
Parse is a very good solution, it is very easy to implement and you get unlimited number of push with the free service up to 1 million users (last time i checked)
read here about it, should be pretty straight forward:
https://developer.android.com/google/gcm/client.html
also you can follow this:
http://www.youtube.com/watch?v=rmzv716SYkQ
and send specific errors you encounter during the process.

In-App messaging vs Push Messages: Pros and Cons

I am finding difficulty to know about in-App messaging.
And how to do it.
I have the following things in my mind,
in-App messaging:
Is an idea to receive contents from a server only the app is alive on screen.
This is possible only the app is active.
App should make a call to server and needs to receive contents.
Push messages
Is an idea to receive contents from a server even though the app is not active.
This is possible at any time, we can notify users while our app is closed and running also.
App do not need to make a call.
But the app should have code implemented to receive push notifications.
We can use GCM for Android and Push Notification for iOS.
Am i right with my understandings ?
If i am not and i missed something , please give your hand to take me out of this confusion.
Thanks,
When I think of in-app messaging, to me it means that you're sending a message from one part of your app to another. "Sending a message" is a very generic term that can be accomplished in a number of different ways. Among others:
Sending a broadcast to a message receiver. You'll need to call sendBroadcast to a BroadcastReceiver.
You can pass a Handler to another component and it can post messages to your handler where they're processed
You can use a third party library such as the open source "otto" library
You can build your own version using the observer pattern.
For push messages, your understanding seems about right. However, look at this post for details on the last item, "We can use GCM for Android and Push Notification for iOS".
You are right, though I would change the term in-App Messaging to Pull Messages, since you are referring to the app pulling messages from the server, while in-App Messaging implies that the application is sending the messages.
You points are mostly correct, though Pull Messages does not require the app to be in the foreground (on screen) - a part of your app can run in the background and fetch messages from the server. This is more doable on Android, since iOS limits the operation an app can do in the background.
Another point that should be added to your list is that Push messages also have the advantage of conserving battery life.
In-App Messaging can also be viewed from another standpoint. AT&T has an API for In-App messaging that allows you to send SMS cross carrier. The API can be found here. along with others. From this you can imagine the ability to message from within an app, say a game or a social app and retrieve responses. There are examples for all the platforms you have added as tags. It might be good for you to look this over as it can expand your understanding of the concept in a different direction than the other answers, Somewhere in all of these you will find what you are looking for.

PushNotifications - How to Implement

I am a newbie in android. I have developed few applications, but all are plain and simple, just used the built in features of android.
I was asked about push notifications, in one of my interviews and I decided to have a look at what Push Notifications are. I understand the concept of Push Notifications(I think), but whenever I read the term "Server", it's freaking me out.
I understand all the client side coding, but I don't get how to implement the server side coding. I have seen some people use XMPP, MQTT, etc., What are those? Here is my scenario and what I want to know..
Scenario ::: Let's say I have a website, with a table (the values are retrieved from database), where I update a few columns every day. I want these updates to be reflected in my android application. So, as I have read, push notifications can tell the application that there are updates available. Good. I am fine till here..
When the application gets the notification, should my application, contact the website and get the latest information? or will the updated information sent through Push Notification? I guess, my application would be contacting the website and get the information. Now, how do I get the data from the website? Should I get the source of the page and do some kind of parsing or something?
I will be asking more questions, as the experts clear my questions...
Sorry, if my questions are too naive, but this is the only place that can help me...
Push Notifications means Google Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device.
You can refer to this documentation
Google Cloud Messaging for Android
GCM: Getting Started
And there is also Demo App Tutorial given
in your case you need to create HTTP web service for getting data from the server.so when you get notification about update on server side.you just need to call this web service and get the data you need to update

Categories

Resources