Is it possible to receive MT4 alerts in code-readable form (E.g. webhook, API call, file etc) instead of as a push notification? - metatrader4

I'll be using a 3rd party MT4 EA or Indicator which can send push notifications or display an alert on the MT4 desktop screen. Is there a way to access these alerts somehow in code that I have running on a standard web server (for example by my code somehow receiving the push notification instead of my phone), or alternatively running e.g. in Python or whatever on the same VPS (or physical PC) that I have MT4 terminal running on, and reading the filesystem (if alerts are written there?) or communicating with the MT$ process somehow?
Thanks

Related

How does apps like Whatsapp or telegram listen to the incoming call/message events on Android?

I built a VoIP calling app which maintains a persistent connection with the server to listen to any incoming calls. I implemented a background service to do this.
But since Oreo, this running code is now broken because of the introduction of Background Execution Limits
After looking into forums, I found that some people are suggesting
Convert Service to JobService and let android schedule it
Doing so, my app won't be able to receive calls when it is stopped
Run your operations in foreground services
It is annoying for some users to see a constant notification in the notification bar. So these above-mentioned options aren't working for me to fix my code for Oreo.
How does WhatsApp get the incoming (VOIP) call in Android (Oreo onwards) working around the Background Execution Limits?
(Sticky) foreground services are not affected by the restrictions. So you could use one those as replacement for background services on Oreo.
But foreground services have two disadvantages: They are less likely killed by the system in order to reclaim resources compared to background services, and hence affects the Android system's self-healing capability. And they require you to display a permanent notification. But Users are able to suppress the notification, somewhat mitigating this disadvantage.
I am assuming that you are using SIP to establish the connection and initiate calls. Without a service constantly re-sending REGISTERs, the app doesn't receive INVITEs when the server sends them.
A workaround for this problem is what is called the "push notification strategy". It works as follows, when the server sends a INVITE, it also sends an FCM notification to your app, This wakes up your app which then sends a REGISTER to your server, which in return forks the call to your app. Here is a video that better explains this strategy
There are two options:
use platform push services (APNS or FCM)
maintain persistent socket connection and exclude application from battery optimisations.

WebUSB detect if web page is being opened

I am looking for some mechanism that would switch USB device to failsoft mode when connection to the site is broken (i.e. browser crashed, user closed tab with the site that communicates to the device or simply network connection is down).
One of the option I can see is some kind of mechanism of sending keep-alives from browser to the device - unfortunately the only (simple) way of transferring data from browser I found is via CDC (which is using bulk transfer - that the slowest way of sending data). Is there any way to utilize interrupt transfer via WebUSB? Or maybe there is a better way than sending keep-alives to achieve desired behavior?
Currently I am focused on Windows 10.
What you want to do is set up your interface with two alternate settings. Alternate setting 0 can be the failsafe mode and is selected by default. When your app opens the device it can call selectAlternateInterface() to select alternate setting 1 which would be your active mode. The OS will automatically send a SET_ALTERNATE(0) command to your interface when you call close(), the page is closed, or the browser crashes.

Keep react-native application alive on android

I work on a mobile application and use MQTT (javascript paho client) for push notification. But after user or android close application ,MQTT socket has been disconnected and cannot receive notifications. So, I need to make a service to keep socket alive. How can I make a service by react-native?
I am using react-native-background-job for a similar use case. This library allows you to run a background job that will run periodically, but for this use case the important feature is that if you pass a alwaysRunning parameter when scheduling the job, the app will keep running in the background even if the user closes it.

How send a push notification without installation?

My question is as follows:
I have a database on another server with the appropriate records of the devices.
I can send a notification by REST API without necessarily making an installation registry?
Something like:
"Send notification to the following devices:
- id1
- id2
- Id3 "
My idea is to continue to use my other server without getting spending requests or hosting Parse. Only use the push notifications service.
Is it possible?
Not sure what types of devices you are referring to (iOS? Android? Windows Phone?), but push notifications to mobile devices always require an application to be installed on the target device, since the notification is sent to a specific application on a specific device.
And the only way you can get a device ID (which you can use to send push notification to a device) is by having an application on the device send that ID to your server after obtaining it from the relevant push notifications service (APNS for iOS, GCM for Android, etc...).

iOS Inter App Communication in Background

There is a platform application which connects to the remote server and stores required information in its local repository, that is in CoreData. I want to develop my application over this platform app. Since it is not possible to access its local storage, I have to communicate with it somehow. I am able to send/receive data using URL Schemes; however it's frustrating for user to switch between apps constantly.
Is it possible to communicate with another application via URL Schemes (or any other way) without bringing it to foreground?
With few exceptions, such as receiving CoreLocation data in the background or being notified to wake up by a local notification, it is not possible in iOS for an application to "run in the background"
This is a pretty common query on Stack Overflow, the official iOS reply can be found here
There are SO articles here and here.
Background data exchange is however not going to be a thing as there are restrictions on background app rules (so the URL transfer is going to foreground your second app)