Please tell me how to bind event when activitybar icon is clicked - vscode-extensions

Is there any way to connect activitybar event?
I searched on the VSCode API site but couldn't find it.

In VS Code you don't attach event handlers to anything. You don't have access to the DOM actually. Instead you register a command in package.json and register a command handler for it. For details read the extension documentation.

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 ?

Using postMessage in a Chrome Custom Tabs CustomTabsSession

I'm getting to grips with the functionality available in Chrome Custom Tabs and I'm curious to know how I might go about communicating between the Custom Tab and the app itself. I can see in CustomTabsSession that there are methods like requestPostMessageChannel, but it returns false every time I try to use it. I also can't find any documentation or examples about this.
Does anyone know how I'd go about successfully establishing a message channel between my native code and my Custom Tabs client? Bonus question: is it possible to postMessage to a service worker?
I just found the following Chromium patch from 2018:
https://chromium.googlesource.com/chromium/src/+/20891520570f780b13ae9725d9aa5a909338d0a9%5E%21/
🤝 Disable PostMessage on Trusted Web Activities.
Moving Trusted Web Activities over to CustomTabActivity gets us
PostMessage for free. Unfortunately we're not ready to launch that, so
disable it for the time being.
It's possible that things have changed since then, but this flag in Chrome 81 suggests it hasn't. So it might just not be possible to do this right now.

How to launch a OneSignal prompt while using ionic?

The OneSignal site goes through great detail on launching the prompt for browsers, but I'm either overlooking the option for mobile or that option doesn't exist.
I'm using Ionic 4/Angular 8 with the cordova-onesignal plugin. I've tried OneSignal.showNativePrompt() but that method doesn't exist on OneSignal. I've also tried this.oneSignal just to see what functions are available and read the comments, but there doesn't seem to be anything that triggers the prompt.
Is there some other way using Ionic to trigger the message to allow users to subscribe to notifications?
Never mind!
Guess I overlooked the promptForPushNotificationsWithUserResponse() function. Looks like it is a promise so you can perform your full suite of setup after it resolves.

New to Kimono, having problems editing an API

I'm looking for an easy to use but fast web scraping tool. I recently started experimenting with Kimono after the acquisition of Kimono and transition to a desktp app. I got stuck when I tried to go back and edit and finish my API. I tried to follow the instructions in the help menu. I opened the desktop app, opened my API then clicked on the [Edit] button. It switched to my browser and opened up the target URL. But I got nothing from Kimono - no menu bar. I'm not sure if the extension is supposed to open automatically, but it gave me no hint what I was supposed to do next, so I opened the chrome extension. There are no "properties" (or what I would usually call fields or table columns). I don't know how to open the existing API in chrome. Disclosure: I opened a thread prevviously and got some good advice, but I got stuck again and didn't get any further response. I'd reallly appreciate any advice you all can give me.

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"