chrome.permissions is not available in Edge extension - google-chrome-extension

I am porting my Chrome extension to work in Microsoft Edge. I used Microsoft's toolkit and bridged the code. But i get an error is console saying "SCRIPT5007: Unable to get property 'contains' of undefined or null reference". This is thrown at the place where i have called chrome.permissions.contains.
Let me know if there is a solution for this or if there is a documentation for all these incompatibilities.

The API is not currently supported by Edge. Microsoft lists it as "Under consideration".
So the only solutions are:
Do not use chrome.permissions in your port. Probably by granting the widest permissions possible. Unpleasant, but you have to explain to users that it's a platform limitation.
Wait until it is supported (which is not guaranteed; FF's WebExtension platform doesn't support them yet either).
The roadmap of API support is here: Microsoft Edge extension API roadmap
Detailed list of supported APIs with known issues/incompatibilities: Supported APIs

Related

Word Addin - how to check if the createDocument() function is available?

I am using Office JS to develop a Word addin.
Thanks to previous answers, I found that I can open a new document in Word by doing:
context.application.createDocument().open();
However, that seems to only work on the Desktop version of Office.
If I try that same addin in the online version, I get an error:
Sorry, this function isn’t available. Perform a runtime check on the Office add-in to find out whether the feature is supported by the host
How can I programatically find out if that function is available so that I can make the plugin default to a different behavior if it's not?
Also, is there some documentation on the createDocument function? (I googled and could not find anything).
In the general case, you should use the isSetSupported API check at runtime to be able to see whether a particular method is available. See https://dev.office.com/docs/add-ins/develop/office-js-versioning
In this particular case, you're running into the fact that createDocument is part of a not-yet-released (preview-only) WordApi 1.4 (PREVIEW) API set (you can see it in the IntelliSense, both in the d.ts file (TypeScript) and vsdoc (JavaScript in VS 2015 and earlier). For example, in https://github.com/OfficeDev/office-js/blob/beta/dist/office.d.ts
Because it's Preview, this unfortunately means that isSetSupported will return "false" regardless... because it simply might not be reliably available anywhere yet (or at least, the team has not signed off on it being done and available). So for these Preview APIs, it's really meant just for your own dev testing, not anything you would use in production.

Can I use Yandex Maps in a Nokiax app?

I need to use Yandex Maps in an app instead of Here Maps. Could this be possible? Any hints or tricks to help me?
Thanks
Basically the rules of using APIs is very simple. If the API is not requiring any parts that are not available in the platform, then it works.
Thus if the API is using parts that are supported in AOSP 4.1.2 API level 16, and using any Google services, then it is likely to work just fine.
And you can always check the compatibility with free online tools very easily. First go to Online Analyser drag and drop the APK there, and let the tool check the compatibility issues.
Then you can also use a real device for testing, just visit Remote Device Access, and reserve a device for testing your app.
Both steps should onlky take you couple of minutes to complete.
For Yandex maps, you would need to visit their developer site to see how the maps API can be used, and what restrictions they would pose on utilizing the API.

Chrome: Google Cast Retrieve Available Device List

I worked with the pre-release SDK before the official SDK was released. Before I could retrieve a list of devices and display them however I wanted. For example, Google Music still has this functionality.
With the official release, is there any other way, besides having the Chromecast Extension popup with the list, to show available devices? I've been searching the documentation for an answer with no results.
Thanks!
No, the functionality is now handled by the extension to make it more uniform across all apps that use this feature, and to avoid confusion as to what the cast icon is in the chrome itself on the top right and what is the cast icon inside the player. Now both provide the same functionality if you are within a cast-enabled app.

Google Maps on website in Android OS

Hello I have this webiste www.liiklusinfo.ee and it's basically designed to work on web browsers, but is it possible to see that map on an Android mobile-phone? I can see that it is possible, because http://kraater.eu/en/map shows up on my android phone, but why isn't my website showing up? When I open the page, it states that I must get a new API code, but I have all the right API keys..
It's definitely due to the fact that you are using Maps API v2 instead of v3.
"http://maps.google.com/maps?file=api&v=2&hl=en&sensor=false&key=ABQIAAAAzrzbFLxHQWFbTQr9PqQ_HhRwAQ6CP1ccuJFaeFcXqlGX2NtZ2xQSe3YINEpjxiDi-m_GSubdYtbMEg">
V2 is causing some issues which is preventing v3 from loading. You may be able to find the route of those problems, but it would just be easier to switch to v3.
I would recommend reading this guide:
http://blogs.missouristate.edu/web/2010/05/12/google-maps-api-v3-developing-for-mobile-devices/
I'd suggest upgrading to the version 3 api, the tag line is V3: The Solution for Maps Applications for both the Desktop and Mobile Devices after all.
This should solve your problem. Moreover, i can see the map on the opera mini browser on my android just not the other.

Detecting Antivirus State

According to http://support.microsoft.com/kb/883792 , MS can detect installed AV using either WMI or a manual method involving registry keys that MS knows about. Is there an API to access this functionality?
This Google search yields this MSDN documentation which appears to be what you're looking for, the Windows Security Center API. The documentation says Vista only, but I believe this API is also available through the Windows XP SP2 SDK.
If you can't find documentation for it and you want to do some manual digging, you can try executing Process Monitor from SysInternals and then launch the Security Center. It'll show you what keys are read, and what files are accessed.
You can use the Win32 Registry access APIs if you knew the keys.

Resources