Is there any way for Extension to hook VSCode events? - vscode-extensions

I'm developing an Extension.
For example, using "Remote Extension(SSH,WSL,Containers)", is there any way for Extension to get the connection completed event when the connection to the remote destination is completed?

Related

Solution for IPC when firewall is activated and no rules can by added

For my application, I decided to implement the "Jump List" (added with W7 - Windows7CodePack).
The problem with JumpList, you cannot (or I ignore how to code) make an action on your active application. Link in menu open a new instance of application and this communicate informations with the first instance (play music, pass to next video, ...)
I tested Socket and WCF but I blocked by firewall and parts of code on the web I find is insufficient to implement correction or for test a another solution in my app.
I want only execute an action on my active application when a click on a task, in the jumplist.
Anybody have a idea ?

Problem of Command Window with LIVE555 testRTSPClient project

I would like to implement how to capture audio from a microphone in IP (network) camera, and in real time stream it so that can listen to it live.
I was downloading and building the LIVE555 library.
I compiled the project with the testRTSPClient.cpp in the directory of the testProgs in live555 (without modifying the code).
The compile succeeds, but the command window opens and then closes immediately. What's the problem?
The testRTSPClient application expect an url argument.
From the documentation
RTSP client
testRTSPClient is a command-line program that shows you
how to open and receive media streams that are specified by a RTSP URL
- i.e., an URL that begins with rtsp://
You should open a console and execute something like :
testRTSPClient rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

Finder badge icon not refresh after complete sync in Finder Extension in Cocoa

I am new to MAC development and using finder sync extension and successfully set badge icons for file and folder but my issue is that when i complete sync any file or folder to server the badge icon is not changing form sync to complete state. Please any suggestion how do i can refresh my file/folder badge icon (Like Dropbox)
It's simple, First establish an Inter Process communication between your app and your extension. In an IPC, your app acts as a client and extension act as a server.
Now you know the state of a specific file, so just send the file path and status to the extension through IPC, Once extension receives the path and status, then call the Finder Sync controller’s setBadgeIdentifier:forURL: method to set the appropriate badge.

IBM Worklight 6.2. Change default behavior for Remote disable in native apps

I'm using worklight application management features from an Android native App.
I want that when in the console the application status is changed to "Access Disabled" the only option for the user will be to quit.
In the Knowledge Center and in Developer works there is documentation about how to do it:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.appadmin.doc/admin/t_denying_access_to_older_app_versions.html?lang=en
https://www.ibm.com/developerworks/community/blogs/worklight/entry/how_to_create_a_customized_remote_disable_behavior?lang=en
It is explained that you must set a specific value for the initOptions object used in the WL.Client.init() method.
But in the Android native API I have not found the way to set the initOptions. The init method is deprecated and it does not accept initOptions.
Also, in case of Remote Disable the ResponseListener used in the WLClient.connect(aResponseListener) is not invoked, success or failure, no method is executed. Is this working as designed? I would expect a failure or success but not nothing.
Is it possible in a native app to force the application to close in case of Remote Disable?
How could I handle this situation manually in the app?
Unfortunately I do not have an example for you, but this is the general idea.
See if you can work with it (if someone can produce an example - please do...):
You need to create your own Remote Disable challenge handler that will extend the default Worklight Remote Disable challenge handler (RemoteDisableChallengeHandler.java).
class MyRemoteDisableChallengeHandler extends WLRemoteDisableChallengeHandler
Then you need to implement your custom logic in MyRemoteDisableChallengeHandler
WLClient.registerChallengeHander(new MyRemoteDisableChallengeHandler())
This will override the original.
You'll need to create your own dialog with a Quit button.
Some additional documentation.
For handling MaM configurations, this is, when you configure the app as Lost, Stolen, etc, in the Worklight Console -> Devices tab you must install the Fix IF201408281937 (Worklight 6.2) or later.
This events are also handled with the ChallengeHandler registered for the realm "wl_remoteDisableRealm"

Background js doesn't work on error pages

Is there any way to load background js even on error pages (such as net::ERR_NETWORK_CHANGED)? I need to keep persistence connection with WS server from the extension, but error pages don't load background js. So I lose the connection and possibility to restart it (due this is automated tool without access to browser ui).
The only solution I found is to use proxy server to customize error pages and load background js inside of them.
The assertion "Background js doesn't work on error pages" does not make any sense, because there's only one background page per extension two if you use split incognito mode.
So I assume that you want to detect a network connectivity loss in order to restore the web socket. Chrome offers two reliable global events for this: online and offline.
I have published the source code of Real-time desktop notifications for Stack Exchange inbox, which also accounts for network connectivity loss/regain. The relevant Web Socket part of the Chrome extension is found in stackexchange-notifications/Chrome/using-websocket.js on Github.