We have a requirement to send notification to the Mobile App Users on periodic basis. (Say Every day morning 6 AM). We are using Nativescript to develop the Mobile Application.
Can someone help to confirm if this can be achieved? if yes, Any sample code/plugin/directions will be highly appreciated.
Thanks!!
If you want to do it from within your app, this might help (not using myself)
https://github.com/EddyVerbruggen/nativescript-local-notifications
Another solution could be to generate scheduled notifications from your server and push them to your app via FCM. In which case you could use this plugin https://github.com/NativeScript/push-plugin (I'm using this)
Yes, possible. Checkout the nativescript-plugin-firebase or nativescript-push. You will have all the details documented in the ReadMe along with sample code.
You might setup a job in your server which would fetch all the list of users and their device tokens you want to send push notification to, pass it on to FCM.
Related
I am building my first Android app and need to know how I could use push notification.
My project is a home alarm system and also I have built my own local web server. Now I want to push a notification from my server to my Android app when an alarm appears in my server.
Currently my garage doors use the MyQ app and when the garage door opens or closes I get a notification on my phone, I want to implement the same thing in my app.
I've been reading about the Google Firebase Cloud Messaging but it seems exceeding my need.
If you need push notification on your cell phone then you definitely need to integrate your app with Google Firebase. (or at least that's the right way of doing it).
Alternatively, there is something called as local notifications & background process in Android you could do long polling to check if the garage door is open (probably every 2 mins or something). However, I don't recommend that as it can drain your mobile battery.
Also I recommend using Flutter as oppose to using Native Android. As there are some pre-built libraries for android and Google Firebase integration.
Take a look at this Youtube video - https://www.youtube.com/watch?v=2TSm2YGBT1s
Ouh, maybe thats a little bit too much for starting with android - nevertheless I want to help you.
You need a communication protocol between your server and your phone (i.e. Firebase as you mentioned or Websockets).
If your server sends a message to you client (your phone) you have to create a notification. (Android Developer Guide). That's the theoretical part. You will also stumble across a lot of
challenges with
asynchronous programming.
Firebase might actually be the simplest option. You could build your own web socket service too, but that would probably be more than you need. See this previous question for more options: Android push notification without firebase
Android has some services that communicate with firebase to receive notifications.
You'll need to implement a service on top of your web server (using backend languages such as Python, Node.js, PHP,...) so it can send notifications when an event happened (like the door closed) witch isn't a simple way for a beginner.
then your web server sends a message to firebase and tells it to send a notification to my client.
so I highly recommend using firebase because of the simplicity of usage. otherwise, you should implement a separate service on your android phone to get the notification (if you want to run it locally) also as explained do the backend side.
If I store a specific time (a stringified Date object in localStorage perhaps, or some equivalent local persistent storage facility on the native device… I'm new to this so I'm not sure what is best yet, and any suggestions would be appreciated!), how can I trigger an alert (vibration, noise, push notification) to iOS or Android at that specific time?
I'm trying to make an alarm-clock type application that notifies the user each specific time stored in a local storage facility. Maybe there is even a way to simply say, “Push a notification at 11:00 am” or something like that. I'm working with Appgyver which uses PhoneGap and Cordova technologies, and I'm trying to build an app using Angular.js for iOS and Android. Thank you in advance!
you must use android services for keep codes running even when your app is closed.
i think this answer is for you:
creating-an-android-service-with-phonegap-have-phonegap-app-run-even-when-close
You could schedule a push notification from your backend. In-app push notifications are not yet supported on AppGyver, but push notifications from the network can be used with https://github.com/AppGyver/PushNotifications
this is rather a generic question and I'm not sure where to put it.
Just wondering if there are any good app builders which offer user subscription as a feature and if it is possible to send push notifications to certain unique users. For example, if I have 10 users who have downloaded my app (numbered 1 to 10), would it be possible for them all to log in and would it be possible for me to send push notifications to only User 1,3 and 5?
Also, is there any way they can respond to this notification via my app?
Any info about an app builder with such features would be appreciated. I've checked a few such as AppMakr, but they don't seem to offer such functionality/
Any help will be much appreciated.
Cheers
Try GCM (Google Cloud Messeging)Please check the below link to start with.
http://developer.android.com/google/gcm/index.html
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
I am making new version of my app and i have uploaded it on android market now i want my users to get notification that new version of app is available.I don't know how to do this.Any help regarding this will be appreciated.
Thanks in advance for help.
Use Push notifications to notify users using C2DM.. https://developers.google.com/android/c2dm/
As of the moment I believe there is no mechanism to handle that for you automatically (android market notifying an app).
What you can do, since you yourself releases the application to the market, is have another server (your own) notified or updated that an update is available. That server can then do push notifications to your app.
You can use Android's c2dm push, or implement your own using your gateway of your choice.
There are 2 alternatives -
Push - You can send a push notification to all the users of your application that there is an upgrade available. (But it will require work and resources in terms of coding and server).
You can find a good tutorial for doing Push here
http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html
2
. Pull - Do a asynctask in your Android app, such that, whenever the app is opened, it checks asynchronously if there are any upgrades (by having a version code in a URL), and show a dialog to the user if the version code is greater than what it is in the device. This is a easier approach.