PhoneGap é uma plataforma que permite o desenvolvimento de aplicativos móveis multiplataforma usando HTML, CSS e JavaScript. Ela fornece acesso às APIs nativas dos dispositivos como câmera, geolocalização e acelerômetro através de wrappers JavaScript.
26. Acesso Tempo App Cross
Velocidade
Device Desenvolvimento
Store Platform
Nativo Sim Sim Caro Sim Não
Web Parcial ? Sussa Não Sim
Híbrido Sim ? Sussa* Sim Sim
27. Acesso Tempo App Cross
Velocidade
Device Desenvolvimento
Store Platform
Nativo Sim Sim Caro Sim Não
Web Parcial ? Sussa Não Sim
Híbrido Sim ? Sussa* Sim Sim
? Já vamos discutir
Sussa* Já vamos discutir
34. •2008: início
•2008:suporte a iPhone, Android e Blackberry 4
•2009: suporte a Symbian e webOS
•2011: suporte a Windows Phone 7
•2011: Projeto sob Apache - novo nome
62. Notification - Confirm
function showConfirm() {
navigator.notification.confirm(
'Confirmar?', // message
onConfirm, // callback to invoke with index of button pressed
'Titulo', // title
'OK,Cancel' // buttonLabels
);
}
63. Notification - Beep
// Beepa 3 vezes
function playBeep() {
navigator.notification.beep(3);
}
Não funciona no iOS
64. Notification - Vibrar
// Vibra por 2 segundos
function vibrate() {
navigator.notification.vibrate(2000);
}
68. Contatos
function onDeviceReady() {
// acha todos os contatos com 'Loiane' em qualquer campo nome
var options = new ContactFindOptions();
options.filter="Loiane";
var fields = ["displayName", "name"];
navigator.contacts.find(fields, onSuccess, onError, options);
}
// onSuccess: loga o contato que foi achado
function onSuccess(contacts) {
for (var i=0; i<contacts.length; i++) {
console.log("Display Name = " + contacts[i].displayName);
}
}
// onError: Failed to get the contacts
function onError(contactError) {
alert('onError!');
}
97. Parece uma
diferente App Aprenda a
web desenvolver
Parece para mobile,
app iOS não web
App
Buttons, única Hyperlink
iOS Human Interface
Design Guidelines Eventos Touch,
não Web
Agregador de
links
Pinch,
Zoom
#fail
App Intuitiva