firebase cloud messaging push notification - python

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.

Related

How to run python programs for android app in cloud for each user

I have a python programs & classes combined together by main.py for the backend algorithms and works. I was developing the app for android using Jetpack compose in android studio.
Last week I started my research for cloud services that can run my python programs for my android.
I find that App Engine of Google Cloud Platform and Firebase. But after looking for tutorials I couldn’t find a way to work with App engine so I decided to go for Firebase.
In Firebase page, they had a service called - Cloud function. Now as per my understanding even I if I had gone with App engine, I would have used the Cloud function too.
How my app works?
My app is a social media app. I have a MongoDB server cluster in MongoDB Atlas that store every data. For authentication I had decided to go just for plain custom username & password stored encrypted on my same MongoDB server, but I was open to Firebase Authentication too. Since my app had a feed where photos, videos are stored - I needed a cloud storage for that. I found that Google Cloud storage for that.
So back to my question. Is there any service that is server-less (as I’ve very less people in my team to manage a server too) that can run Python programs for different requests from different users of my android app.
For sake of comparison, my app can be compared to Instagram without Reels!
My question is how to upload my python project, which contains different classes that are used to as algorithms for my app. It's like this, for ex., if an user goes to feed page then it has to call function in my python program that gets the feeds as per calling user's preference & followed accounts. My understanding is that I have to call this function from my android app.
I need help to find a tutorial for following things:
How to set up Firebase or App Engine & implement it in Android Studio
How to deploy my python files to firebase or App Engine for Cloud Functions
How to call this function from Android app (Kotlin + Compose) and receive in Python.
Note: I've already implemented the class that communicate with my MongoDB Atlas, So I also have functions in Python that updates the MongoDB.
Finally, how to upload the files from user input in Android app to Cloud Storage through my Python functions. And how to download files from Cloud Storage to Android app through my Python functions.

Creating a desktop Python app with Firebase, how do I include the private key?

I'm trying to build a desktop application that is built with python and pyqt5. I want to send it to users with their own login details, but I am not totally sure what to do with the private key. Up until now, I've had to do
export GOOGLE_APPLICATION_CREDENTIALS=[path to private key json]
or for windows
set GOOGLE_APPLICATION_CREDENTIALS=[path to private key json]
Obviously I don't want to give out the private key. Is it ok to store it in the program, or is there a special safe way to do that? I'm using pyinstaller to package everything.
The only SDK Firebase provides for use wit Python is a so-called Admin SDK. As the documentation on [setting up the Admin SDK] says:
The Admin SDK lets you interact with Firebase from privileged environments
So this SDK is not suitable for developing applications for your regular users, as the credentials it requires grant the user full administrative access to your Firebase project.
There is no official Firebase SDK for developing Python applications for regular clients, so your options are limited to:
Using the REST APIs for the various Firebase services, and writing your own client-side Python code against that.
Using a third-party API, such as Pyrebase that supports both client-side and administrative access.

Firebase Create and Login?

Can I use firebase with python to do user account creation and logging in and out?
or any other recommendations? I've read but seems like it only uses nodejs
There is an Admin SDK for Python for certain Firebase products, including Firebase Authentication.
The Admin SDK for Firebase is meant to run on servers and in other trusted environments. This means that a process using the Admin SDK has administrative access to all Firebase services. This for example allows you to easily create a new user account with the Python SDK.
But that also means that the Python SDK cannot be used to sign in with Firebase Authentication: after all, the process already runs with administrative privileges.
If you want to use the Python SDK to verify users, you should have the users sign in on the client with one of the regular Firebase Authentication SDKs. Then send the ID token from the client to your server, and use the Python SDK to verify that token.

Using openshift Rest Api in Django framework Python application

i want to strarted to build an application using framework Django in python to consume Openshift rest api that the user will be able to authentication and use their resources.
the objectif of this project is to provide a web-based platform to enable Openshift users to create or interact with their online resources using Openshift web api Rest 3.0 .
Specifications of project : The required service should enable existing projects and new projects management for any user having an Openshift online account. Management includes: -Authentication and Authorization -Teams , members and subscription plan management -SSH keys management -Gear, cartridge and application management -Deployment All these capabilities must be implemented using the Openshift API and provided using a Django based web interface.
i try to read the officiel documentation through URL:https://access.redhat.com/documentation/en-US/OpenShift_Online/2.0/html/REST_API_Guide/index.html
but i can't find a way to start building the application and consuming this rest api. have any one an idea to start
If you are writing a new application, I suggest using v3. The web console already has most of this functionality. The REST API reference should help you get started.

Push notifications for mobile application

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.

Categories