How to send notifications to iOS and Android using Python - python-3.x

I have created some code for sending alerts, for now only by emails. I was wondering if there is an easy way to send push notifications to iOS and Android mobiles using Python. Thanks a lot.

Without getting device tokens from the devices (iOS / Android), and without a valid APNS certificate for the iOS app, there is no way to send push notification to any app.
For iOS, device token and certificate is must.
For Android, a Firebase project has to be setup, and the device token has to be fetched from the app.
If you are the owner of the backend that the mobile apps are using, it is easy to send device tokens from the apps provided you have access to the Firebase project (for Android) and the certificate used (for iOS).

Related

Xamarin Forms MSAL and AAD authentication problem with Device ID

We are implementing application, that should confirm our internal processes. We are using Azure AD and we would like to make this app only for company purposes. So we would like to have it managed by InTune.
When we start application, we are redirect to mobile browser where is MS authentication form and if we have success logg in, then their API check whether is the mobile enrolled under company management profile, if yes return to app otherwise end up with warnign only for company purposes.
The problem is that despite we have endrolled mobile their API does not recognize it and canĀ“t proceed. In the error description is that the mobile is not regeistered and the Device ID is null, but when we check device under AZURE portal we can see that the device has logged Device ID and is correctly enrolled. And in list of access to this application we can see log, where is login failed (missing Device ID).
This problem occures only on android, not with iOS. In case of iOS is everything OK.
Could not be the problem with reading this device ID from mobile? In iOS, we set up access to KeyChainAccess with microsoft.adalcache. Does exist anything like that in Android?
I have go throught this tutorial: https://github.com/Azure-Samples/active-directory-xamarin-native-v2
Thanks for any idea.

Firebase push notification using node js and polymer web app

I want to send device push notification to android app. Here is what I am doing:
Created a webapp server(node js) and client code is written in polymer.
Deploying this webapp to android device as android app using some third party android container(Predix Mobile).
The third party container takes the web app and deployed it into android device as android app.
The third party web app doesn't have any plugin which can generate device token used to send device push notification using google firebase.
I have a login page in my web app, when I login, I want to generate the device token. But I can't find any help how to do that, because my client code is written in Polymer.
I will send that token to my server code which will be deployed to cloud, the server will do a post call to push the notification to device.
Is there a way I can achieve this?
I used OneSignal to do something similar in a project.
https://onesignal.com/
Your UI loads in a webview and you have full control of the MainActivity. In your micro service, you can make a call to the OneSignal API with the message you want to send as a push notification. You can handle the push notification in your MainActivity. You can send notifications to a specific device, a group of devices, or all devices running the app.
You can create an interface between your MainActivity and Polymer WebView to move data between them.
https://developer.android.com/guide/webapps/webview.html

Which Google Oauth 2.0 Client ID type choose for cordova hybrid mobile apps?

I am developing cordova based hybrid mobile apps targeted for android and iOS smartphones.
Usecase: The application authenticate user and then would be accessing Google Calendar API's, and finally display user events on the app.
Note: I will be Using 3-legged OAuth and Google Data APIs without the client libraries.
Question
The Cordova-enabled WebView provides the application with its entire user interface, so what should be the application type in this case?
Since everything is going inside webview, so Shall I choose "Web Application"?
OR
Do I need to create seperate Applications type for Android and iOS
seperately?
Or can iOS Application Type work for both Android and iOS?
Please suggest what should be the proper approach to choose application type in this case.
Thanks!
It depends on how your app is setup. If you plan on handling all of the OAUTH processing on a backend server then you can use the Web application type, and you can have all the OAUTH work offloaded to the backend server.
If you do not have a backend server and will do all OAUTH processing on the user's device, then you should create both an iOS and Android client ID. For example:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus
This plugin's documentation shows the creation of both an iOS and Android client ID to enable Google Sign In on a Cordova app.

Protocol (algorithm ) for safely authorizing payments via mobile app

I'm looking for most secure algorithm/protocol to safely authorize actions done via mobile app.
Let's say I'm developing a system that requires user authorisation of certain actions. You can think of it as "banking platform". Let's say there are two ways of accessing the platform: web via normal browser and mobile via app on a smartphone.
One-time tokens and SMS codes are good for the web frontend - when it's separated from the device generating tokens / receiving SMS. But how can I assure security the mobile that's almost certainly used to receive SMS or generates tokens? More secure would be to ask for password. How can I patch this obvious security hole?
Youre probably interested in the PCI guidelines for mobile payment. Read this:
https://www.pcisecuritystandards.org/documents/Mobile%20Payment%20Security%20Guidelines%20v1%200.pdf

Self-Signing J2me App

I have created a small j2me app (for personal use) for sending text messages.This j2me app fetches the messages
from my HTTP server and then send them to the fetched mobile number.
Now the Problem is that it asks for permission every time it send messages,
and as far as i know , i need to sign my app for permanent permission.
I don't want to buy the certificate just for my personal use. So i decide to self-sign
my app.I followed this blog http://browndrf.blogspot.com/2006/06/build-and-install-singed-midlet.html
but unable to install .cer on my phone(Samsung GT-S5230).
I don't know if there is any eclipse plugin available for this.
Is there any other easy way to self-sign the j2me app.
Don't go with self-signing for Java ME applications. Its not worth for MIDlet signing and also its not working most of the devices. So better option is buy it from some third party providers.

Resources