I have a Custom Action in WiX (windows installer toolset) that is written in Javascript. What are my options to make web requests? As far as I know, fetch is a web api which is not accessible in the runtime provided by the windows installer. Is there a way to import third-party libraries?
Microsoft JScript (which is what is run in WiX custom actions) provides native web requests like this:
// Instantiate a WinHttpRequest object.
var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
WinHttpRequest can then be used similar to XMLHttpRequest.
see documentation here
I am creating an Office 365 plugin for outlook using NodeJS and javascript... I use OfficeJS library to interact with Outlook. My plugin appears in the Outlook taskpane. I want to have button in my plugin HTML. When clicking on that button the taskpane must be closed. Anybody knows how ? thank you !
This feature is not available yet, but you will be able to add it into your add-in soon. As of Office.js API level 1.5 you will be able to call the method "closeContainer()". Preview documantation is available at Office.context.ui.closeContainer()
EDIT:
Office.context.ui.closeContainer() method is available at Mailbox 1.5 level API. The supported host is limited to Outlook.
Currently there is no support for any other hosts to open and close taskpain. If you have strong requirements for this feature please consider up-vote the uservoice suggestion for Office developers.
Can a website (HTML5,JavaScript) access a mobile device's (android/iPhone)
contact list, SDCard files?
A website as in one opened in a browser not a phonegap application/webapp.
There was an attempt at the W3C to create a browser API to access contacts from the browser.
This is often mentioned as one of the new HTML5 APIs.
However the attempt never became a real specification and never got implemented by any browser vendors. Now it is officially discontinued:
http://www.w3.org/TR/contacts-api/
You can't access the mobile device file system through a website, it would be a major security problem. You might be able to steal all user files if you can access them through the browser. Hope this helps.
At this point in time there is no way to access the internal APIs from Android, iOS and Windows Phone via a simple website. This also precludes you from accessing aspects such as the contact list because these are all only accessible via API calls.
Solutions that allow you to code phone apps or web apps in JavaScript or HTML5 and still grant access to APIs do so by utilizing a wrapper with calls back to the native code. But you can't call native code from an external source such as a website.
Chrome has since shipped their own version of a "Contact Picker" HTML5 API in Chrome 80: https://web.dev/contact-picker.
Chrome only: it is not a W3C Standard nor is it on the W3C Standards Track.
selectRecipientsButton.addEventListener('click', async () => {
const contacts = await navigator.contacts.select(['name', 'email'], {multiple: true});
if (!contacts.length) {
// No contacts were selected in the picker.
return;
}
// Use the names and e-mail addresses in |contacts| to populate the
// recipients field in the website’s UI.
populateRecipients(contacts);
});
Am not so sure if the author of this question will still be interested in a solution but I use this on my apps, its really a handy way of access native api from html5 apps. http://bridgeit.mobi/bridgeit.html#features
BridgeIt enables any web application to access a wide range of mobile device capabilities using a simple JavaScript API.
Using this tool is as easy as 1, 2, 3…
Include the BridgeIt JavaScript in your page
<script type="text/javascript" src="http://api.bridgeit.mobi/bridgeit/bridgeit.js"></script>
Attach a BridgeIt call to some action element on your page, and provide a callback to handle returned values from BridgeIt. For instance, a button to retrieve a contact from the address book...
bridgeit.fetchContact('element_ID', callback_Function);
Access the page from your mobile browser. If the BridgeIt utility app is not already installed, you will be prompted to do so. Once the BridgeIt utility app is installed, your application can access all of BridgeIt's native features.
Example code can be found here https://github.com/bridgeit/bridgeit.js/wiki/Contact-List-Tutorial
https://developers.google.com/people/
You can't access Contacts by website stored on phone, but you can do it server side using People API. If user stored everything on the cloud - you win. Perhaps this is only way to provide native-like experience on your website
You can access address book using Autofill feature of safari browser in iOS devices (but settings > safari > autofill > contact info must be turn on). And the name field in must be "name, email, phone, tel, etc" to get autofill works properly. It works only in Safari but not in other browsers.
Using pure HTML
<input type="file">
you can access files from mobile device,but you cant access contact.
I'm having a problem and I really need your support!
Here's the problem:
I have an application (.NET 4.0) that exposes a COM interface. Most of our clients is able to simply use the tag in the HTML and that will launch our application; also they are able to interact with it.
Today a customer, that have a lot of Javascript rendering, informed us that using IE is not possible; in IE the page is very slow but in Google Chrome is very fast. So, they ask us how to interact with our application using Google Chrome.
I've made some searches in Google but it seems that OLE is only available in IE.
Anyone have a solution for my problem?
Basically the requirements are:
Launch our application as Local Server using a GUID or a name;
Be able to invoke methods in our COM interface;
Be able to receive events from our COM interface;
Thanks a lot.
I am developing mobile web page. I want send from this page request to my native mobile app (for example android app, and android app should send me current location of user.
Thanks in advance !
Look for the accepted language header on the server side. Or via js:
navigator.language
See this question: JavaScript for detecting browser language preference
It looks like you'll want to use the geolocation API.
The geolocation API will work on phone browsers that support that API. It may be worth checking the compatibility of the handsets you are targeting.
Also, just bringing these alternatives to your attention, however, they are restricted to certain operators and regions.
BlueVia location API available on O2 and Telefonica networks using their REST API https://bluevia.com/en/page/tech.APIs.LocationAPI
AT&T location API available using their REST API http://developer.att.com/developer/apiDetailPage.jsp?passedItemId=10100355
Just so you know about these, the geolocation API is most likely the best option for you though.