Push notifications for mobile application - python

I am a beginner with mobile app development. I need to build a push notification for our existing mobile app.
The current mobile app is built with HTML, backbone.js and jQuery for both Android and iOS. The backend is in Python.
I found that there are applications like firebase communication messages, parser etc for the transport layer.
I would like to know if I can use FCM with Python as backend.
Also as I do not use the native mobile app, I also like to know if I can achieve push notifications using FCM in my app.

I would like to know if I can use FCM with Python as backend.
You may want to check Python documentation which discussed regarding the use of pyfcm 1.2.2. Furthermore, this related SO post might also help.
Also as I do not use the native mobile app , I also like to know if I can achieve push notifications using FCM in my app.
Actually, Google Cloud Messaging (GCM) is used to implement push notifications for mobile devices and as mentioned, Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! Based from that statement, it's should be clear that it is possible to achieve push notifications using FCM.
I suggest that you please check Firebase Notifications and Firebase - FAQ for more detailed information on the things that you can do with Firebase.

Related

firebase cloud messaging push notification

I am using firebase cloud messaging for push notification
when I publish my notification using python and firebase cloud messaging panel notification doesn't appear in notification bar
what things I need to add to my project
There is nothing special about the python app just follow the documentation provided in the Android Offical documentation here
https://firebase.google.com/docs/cloud-messaging/send-message
Also, make sure you have added FCM properly inside the android app and also that you have added Key to the python code from Firebase Console.

Azure IoT cloud-to-device messaging via Rails?

I'm currently building an API in Rails to control devices registered with an Azure IoT Hub.
Now, in the Azure documentation, I only see Python/Node/.Net guides to control the end devices.
I require Rails for certain libraries, and hence used it to build my API. But now I've hit this road block.
Is there no way I can send cloud-to-device messages? I don't see any official Rails support. I only require c2d messaging.
Edit : The only other way I can think of with my limited knowledge is to deploy a small Python/Flask app on the same server and have my Rails code make HTTP requests to it. Is this a bad approach?
I do recommend to use the Azure HttpTrigger Function for your solutions as an API integrator/mediator.

General query on overall architecture/framework for desktop and mobile app and admin webpage

I have learned Python specifically for developing a desktop app for a new business idea. In addition, I also need to learn Android for developing the mobile app. Here is how it would work in brief.
A desktop GUI app would be installed and used by users on their respective desktop. They would use it and send/receive some data.
A mobile app would fetch the data uploaded by users and give customers the information.
I play to use the following.
1. Python for the desktop GUI app (already done).
2. Postgresql database. Currently, it's installed in my system, it needs to be in some server or cloud so that the users (numbering ~10k) can use it once the system goes into deployment.
3. An admin webpage for allotting user rights and also for data analysis of uploaded data has been developed in Django, and also the REST API using Django.
4. In the process of developing an Android app.
Everything is in bits and pieces and I am somewhat lost on how the entire thing would turn out finally.
Can someone pls explain the entire architecture of how it would finally be? Things like how GUI would connect to Postgresql on the server, sockets required, APIs required, where would the logic be stored, how would Android app fetch data from the PostgreSQL database, APIs required for mobile app, how the admin webpage for allotting user rights would fetch or send data to Postgresql on server etc.
Thanks in advance.
What you are trying to do is frontend-backend-database architecture. GUI and mobile apps shouldn't communicate with the database directly. Between them should be hosted servers. As you mentioned you can use Django and build upon Django DRF for REST API.
Your architecture could look like:

How to use Firebase with a linux based client app for bidirectional messages communication with server

I've seen Google's documentation and a lot of examples over the internet about how to use Firebase within Android / iOS applications, but I want to develop a client Firebase application which runs on a linux machine.
My requirements are:
Client runs on linux environment (either writtern in C++ or python).
Server is written in Javascript (NodeJS).
Server and client should have bi-directional communication between them using firebase realtime database.
I've seen also the firebase REST api, but I assume that is not good enough for me since I haven't seen a client listener api that listens on a something like onValueChanged.
Question:
How can I implement a linux-based app in C++ or python that listens to messages from server (data changes) using a listener, without having to call some get function each and every few seconds (just like NodeJS have the ref.on("child_changed",...) or ref.on("value",...)?
Help is much appreciated!
Unfortunately there is not official library for Realtime Database in Python but there are some third party wrappers around REST API.
Specifically I would look at Pyrebase library which also supports listening to live changes https://github.com/thisbejim/Pyrebase#streaming
For more information, libraries or other languages look at this page https://firebase.google.com/docs/database/rest/start
Google offers a C++ SDK you can download it here.
There is also a tutorial on the bottom of the page, but if you really want to dig into some code, here is the quickstart code on github from google with examples for each category on Firebase.
Google has also implemented a Game for demonstration purposes in C++ for Desktop OSs. here There you can find more advanced features and code samples.
I have only tried it with an XCode project on Mac OS X, and it works fine. I have no code for real time database but you should find the sample project in the github repo. https://github.com/firebase/quickstart-cpp
I hope this helps!
Greetings.
Haven't you try to use a Realtime Database triggers for C++ (that's is currently on beta) that allows you to simulate the same workflow as on JS?
From my point of view, it is the best way to get it to work as you want.
https://firebase.google.com/docs/functions/database-events

Developing a RIA with Django - what technology stack?

I need to develop a web application with the following requirements:
Desktop like UI on the client side
Application deployment
Scalability (i.e. distributing the service on multiple servers)
What I thought of so far (as I love Python but haven't done much web development yet):
Django
Fabric (think I've read somewhere it's suited for this)
What I'm missing is:
How to create rich clients (probably need some javascript libraries for that)?
How to distribute the service?
For RIA you need to use some client technology in your templates.
See at Dojo or ExtJs.
ExtJs docs have example of Web Desktop app, but this library is not free for commercial project. I like more Dojo, and it is free.
Rich Internet Application: Javascript to do stuff asynchronously (AJAX). If you want a desktop-like interface on the web, it seems currently CoffeeScript is the way to go. It's a language that compiles into Javascript and adapted for rich interfaces.
Deployment: fabric (I think it's used to deploy Python apps).
Distribution: you deploy the code to one server.If you need to scale it up, you just need some additional servers (of course if you have specific usages like very high load on a database, you'll also need to add more database servers etc. But you get the idea).
using web browser as your client platform?

Categories