I want to build an app that continues an only one group maybe with API.
Someone can guide me with this, please?
It's for an Educational app.
One option you have is to work with a server.
On your server, you host a database and an API. You can use the database to save the users and the messages. You should also send your push notifications with this server. You can send push using FCM, but I personally had some problems with it and switched to OneSignal.
In your APP you can show the different messages using a ListView with custom list items. To communicate between server and app you can use a Volley request.
Some time ago I wrote nearly the same app. I would recommend you to use a server with an API (a simple PHP API is enough).
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.
I am developing an Android app, which deals with allocating orders to multiple suppliers. Each supplier will have the same Android app installed. Every day, the in charge of the suppliers will open the app, pick up the suppliers to assign from the recyclerview and enter a customised message on the days' supply in an editText.
The message should be delivered in form of push notification to other suppliers he has selected from the recyclerview. So, in this case I cannot use Firebase console to send notifications. I initially thought of using Twilio to do this. But my client wanted to keep this as last option. They want me to try Push notifications.
I am researching, but every one is illustrating on how the notification can be sent through Firebase console. I also heard that GCM is obsolete now.
Please can anyone give me some pointers on how this can be done? Please note that I am a beginner in Android.
I think you can use firebase cloud messaging to achieve this. See FCM documentation.
You can send a push notification through firebase by using firebase HTTP protocol instead of the firebase console. In this way, you can programmatically send a push notification by making a REST call.
There are 2 firebase HTTP protocols that you may use to achieve this:
Legacy protocol:
This is the older firebase HTTP protocol. This is easier to set up and you can find a lot of material online explaining how to use this like medium article.
New protocol(HTTP V1):
This is the newer HTTP protocol. This is a little more difficult as authentication is done by oAuth token. However, this is more secure and extensible. Also, it seems like firebase might eventually deprecate the legacy API.
Hence, in your app, once the in charge of suppliers assigns the duties, you can call the firebase APIs to send out push notifications to all the assigned suppliers.
I'm developing a Transport Management System using Dingo API with Laravel and Retrofit for Mobile App. When the clerk approves the request, the notification should be send to who uses android app(Client),So i wanna send data from Server to App.What are the possible ways to do it ?
Updated
How to use brozot/laravel-firebase cloud messaging ? Can anyone give an example for that ?
We can use:
Use push notification system like.
This approach is supported by Google. But is delayed to inform like what you are doing is right. Work that is not suitable for real-time. And does not require you to have a server and a lot of code to write.
https://firebase.google.com/docs/cloud-messaging/android/client
Or
https://developers.google.com/cloud-messaging/ -> move to firebase upper link
Use signalR
This real-time but connections are not loose management.And a lot of coding.
https://github.com/ahmadaghazadeh/SignalRAndroid
I'm creating an app consists 7 fragments using recycler view. Now i want something that can help me to change the data inside the fragments weekly or monthly or yearly through servers. I googled this kind of topic even found some like GCM, JSON, SQLite but these are for pushing the notifications, snack bars and toast.
Is there any proper way to deal with this?
Or I have to create my own web tool that acts like an admin?
A serious Help!!!!!
Google Cloud Messaging is for sending information from the server to the app. You can send anything. You will receive the call back in your app with the data that you sent from your server. Normally is shown a notification but the developer implemented this notification in the app/client side, GCM only deliver the data, it didn't show the notification.
IMHO is the best approach for you. You can send the link to the data, download it in the app and update your recycler view.
Google has tutorials that show you how to implement the server and the app part.
Here is the link: https://developers.google.com/cloud-messaging/
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