Can a website (HTML5,JavaScript) access a mobile device's (android/iPhone) contact list, SDCard files

6 Solutions Collect From Internet About “Can a website (HTML5,JavaScript) access a mobile device's (android/iPhone) contact list, SDCard files”

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.

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/

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.

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…

  1. Include the BridgeIt JavaScript in your page

    <script type="text/javascript" src="http://api.bridgeit.mobi/bridgeit/bridgeit.js"></script>
    
  2. 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);
    
  3. 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

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.

iOS Settings

Using pure HTML

<input type="file">

you can access files from mobile device,but you cant access contact.