Introduction to
Web Intents/Actions
Glenn Jones
2 January 2012
Glenn Jones
2 January 2012
The code under the hood
<intent
action="http://webintents.org/pick"
type="text/x-vcard"
href="http://codebits.glennjones.net/contact-intent/"
title="Pick a profile">
</intent>
<script>
var intent = new Intent();
intent.action = "http://webintents.org/save";
intent.type = "text/x-vcard";
intent.data = card;
window.navigator.startActivity(intent);
</script>
<script>
var intent = new Intent();
intent.action = "http://webintents.org/pick";
intent.type = "text/x-vcard ";
window.navigator.startActivity(intent, returnSelection)
function returnSelection(data){
var cards = data;
}
</script>