Accelerometer
Capturing audio/video & camera
Media playback
Contacts
Connection
Device information
Events
Dialogs
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
The Mobile Ecosystem
Mobile as the 7th mass medium
Designing for Context
Developing a Mobile Strategy
Types of Mobile Applications
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap: Accessing Device Capabilities
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Mobile Apps Development: Technological strategies and MonetizationIvano Malavolta
Mobile Apps Development: Technological strategies and Monetization
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Introduction
Require JS
Handlebars
Conclusions
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Introduction
Geolocation
Google Maps Services
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
The document discusses Backbone.js and provides details about its core components and functions. It outlines event handling methods like on, off, and listenTo. It describes models and collections, explaining attributes like get, set, and sync. It also covers views and how they connect models and the DOM through render functions and event bindings. Finally, it mentions routing and how Backbone supports defining routes and navigation actions.
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
The Mobile Ecosystem
Mobile as the 7th mass medium
Designing for Context
Developing a Mobile Strategy
Types of Mobile Applications
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap: Accessing Device Capabilities
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Mobile Apps Development: Technological strategies and MonetizationIvano Malavolta
Mobile Apps Development: Technological strategies and Monetization
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Introduction
Require JS
Handlebars
Conclusions
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Introduction
Geolocation
Google Maps Services
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
The document discusses Backbone.js and provides details about its core components and functions. It outlines event handling methods like on, off, and listenTo. It describes models and collections, explaining attributes like get, set, and sync. It also covers views and how they connect models and the DOM through render functions and event bindings. Finally, it mentions routing and how Backbone supports defining routes and navigation actions.
UI design patterns for mobile applications
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Why Backbone
Events
Models
Collections
Views
Routers
Summary
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Mobile Applications Development - Lecture 0 - Spring 2013Ivano Malavolta
Introductive lecture of the Mobile Applications Development course, Spring 2013.
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] Local data storage for web-based mobile appsIvano Malavolta
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
This presentation has been developed in the context of the Mobile Applications Development course at the Computer Science Department of the University of L'Aquila (Italy).
http://www.di.univaq.it/malavolta
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Intro + Examples
Human Interface Principles
Platform Characteristics
UX Guidelines
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Sitemaps for mobile apps
Wireframing mobile apps
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Javascript and jQuery for mobile
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] AADL (Architecture Analysis and Design Language)Ivano Malavolta
This document introduces the Architecture Analysis and Design Language (AADL) and uses a radar system as an example to demonstrate AADL modeling concepts. It breaks down the radar system into hardware and software components, showing how to model processes, threads, devices, and connections between them. It also models the deployment of software processes onto hardware processors and memories. The example illustrates key AADL concepts like components, features, connections, bindings, and properties.
[2015/2016] Introduction to software architectureIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
Anatomy of a web app
HTML5
CSS3
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
This document provides an overview of HTML5 and CSS3 concepts for building web applications. It begins with defining what a web app is and its basic anatomy. It then covers new HTML5 structural tags, forms, multimedia capabilities like audio and video, offline data storage, geolocation, and canvas/SVG graphics. For CSS3, it discusses new selectors, the box model, positioning, fonts, visual effects, and media queries. Key topics are presented at a high level with examples to illustrate the main capabilities and uses of HTML5 and CSS3 for mobile web development.
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...Ivano Malavolta
29th of June 2016. My presentation done at the 5th IEEE International Conference on Mobile Services (MS 2016).
Accompanying paper: http://www.ivanomalavolta.com/files/papers/MS_2016.pdf
RequireJS & Handlebars
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] User experience design of mobil appsIvano Malavolta
The Elements of User Experience
Navigation Model
Wireframes
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
Mobile applications Development - Lecture 15
Accessing Device Features:
Camera
Accelerometer
Contacts
Events
This presentation has been developed in the context of the Mobile Applications Development course at the Computer Science Department of the University of L’Aquila (Italy).
http://www.di.univaq.it/malavolta
Cross-platform mobile apps with Apache CordovaIvano Malavolta
Ivano Malavolta discusses cross-platform mobile app development with Apache Cordova. Cordova allows developing apps with HTML, CSS, and JavaScript that can be deployed across platforms like iOS and Android. It uses a web view to display the app within a native container, providing access to device APIs. Popular plugins extend Cordova's capabilities by integrating native functionality. Debugging can be done in the browser, emulators, or on actual devices. The talk provides examples of the Cordova CLI, accelerometer and camera APIs.
UI design patterns for mobile applications
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Why Backbone
Events
Models
Collections
Views
Routers
Summary
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Mobile Applications Development - Lecture 0 - Spring 2013Ivano Malavolta
Introductive lecture of the Mobile Applications Development course, Spring 2013.
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] Local data storage for web-based mobile appsIvano Malavolta
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
This presentation has been developed in the context of the Mobile Applications Development course at the Computer Science Department of the University of L'Aquila (Italy).
http://www.di.univaq.it/malavolta
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Intro + Examples
Human Interface Principles
Platform Characteristics
UX Guidelines
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
PhoneGap
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Sitemaps for mobile apps
Wireframing mobile apps
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Javascript and jQuery for mobile
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] AADL (Architecture Analysis and Design Language)Ivano Malavolta
This document introduces the Architecture Analysis and Design Language (AADL) and uses a radar system as an example to demonstrate AADL modeling concepts. It breaks down the radar system into hardware and software components, showing how to model processes, threads, devices, and connections between them. It also models the deployment of software processes onto hardware processors and memories. The example illustrates key AADL concepts like components, features, connections, bindings, and properties.
[2015/2016] Introduction to software architectureIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
Anatomy of a web app
HTML5
CSS3
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
This document provides an overview of HTML5 and CSS3 concepts for building web applications. It begins with defining what a web app is and its basic anatomy. It then covers new HTML5 structural tags, forms, multimedia capabilities like audio and video, offline data storage, geolocation, and canvas/SVG graphics. For CSS3, it discusses new selectors, the box model, positioning, fonts, visual effects, and media queries. Key topics are presented at a high level with examples to illustrate the main capabilities and uses of HTML5 and CSS3 for mobile web development.
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...Ivano Malavolta
29th of June 2016. My presentation done at the 5th IEEE International Conference on Mobile Services (MS 2016).
Accompanying paper: http://www.ivanomalavolta.com/files/papers/MS_2016.pdf
RequireJS & Handlebars
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
[2015/2016] User experience design of mobil appsIvano Malavolta
The Elements of User Experience
Navigation Model
Wireframes
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
Mobile applications Development - Lecture 15
Accessing Device Features:
Camera
Accelerometer
Contacts
Events
This presentation has been developed in the context of the Mobile Applications Development course at the Computer Science Department of the University of L’Aquila (Italy).
http://www.di.univaq.it/malavolta
Cross-platform mobile apps with Apache CordovaIvano Malavolta
Ivano Malavolta discusses cross-platform mobile app development with Apache Cordova. Cordova allows developing apps with HTML, CSS, and JavaScript that can be deployed across platforms like iOS and Android. It uses a web view to display the app within a native container, providing access to device APIs. Popular plugins extend Cordova's capabilities by integrating native functionality. Debugging can be done in the browser, emulators, or on actual devices. The talk provides examples of the Cordova CLI, accelerometer and camera APIs.
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineChris Adamson
Swift is great for writing iOS and Mac apps, and its creators also mean for it to be used as a systems programming language. However, certain traits about Swift make it officially off-limits for use in some audio/video-processing scenarios. What's the deal, is it not fast enough or what? We'll look at what media apps can and can't do in Swift, and what you're supposed to do instead. We'll also look at strategies for knowing what responsibilities to dole out to Swift and to C, and how to make those parts of your code play nicely with each other.
(This is a longer version of a talk previously presented at Forward Swift 2017)
The document discusses the Mobile Media API (MMAPI) which adds multimedia capabilities like video and audio capture to MIDP. It describes various controls for manipulating media like controlling playback rate and position. Examples codes are provided to demonstrate using MMAPI for playing and recording audio and video on mobile devices.
The document discusses exploring the capabilities of HTML5, including accessing the camera, using the canvas and Haar.js for face detection, and tips for working with these technologies. It covers accessing the camera in pure HTML5 and invoking the native camera, combining the canvas and Haar.js for face detection and drawing detected faces on the canvas, improving performance by resizing images before detection, and common bugs encountered in WebWorks projects. The goal is to experiment with HTML5 features like the camera and face detection for fun effects like adding virtual moustaches to detected faces.
The document discusses the Leap Motion Controller and Myo gesture control devices. It provides an overview of their technical specifications including tracking accuracy, supported languages, data models, and examples of applications. It also shares some of the author's insights on designing gesture-based applications.
This document provides a quick reference for the OpenMAX AL 1.1 API. It includes an overview of OpenMAX AL, which is an application-level multimedia API for mobile devices that provides a cross-platform interface for accessing audio, video, and imaging capabilities. The document then summarizes key OpenMAX objects, interfaces, functions, and profiles. It provides a mapping of interfaces to objects and describes common interfaces for manipulating devices, codecs, and media playback/recording.
This document discusses integrating an Android app with Chromecast. It covers the requirements for sender and receiver apps, the discovery and connection process, and data transmission. It also introduces the CastCompanionLibrary which handles common Chromecast functionality like playback controls and notifications.
Presented at Berlin.js May 31st 2018 for the #jsconfeu Special. Almost every video call begins with the same clumsy questions. Can you hear me now? Did I just turn off my camera instead of my mic now? But what if we could take the awkward troubleshooting out of the conversation, and solve it with code instead? In this talk, Ingvild Indrebø will give you a glimpse into aspects of WebRTC, WebAudio and Canvas, by showing you how she used these technologies to build a user-friendly and accessible tool to make sure you’re all set for your video call.
With recent advances in wearable technology, it's now possible to create novel fitness experiences without building custom hardware. In this talk we take you through creating a fitness tracker in C# on Android Wear, covering Google Play Services and watch-faces along the way. If this piques your interest, you can build your own Android Wear-based fitness tracker in our code lab!
Tsukasa Sugiura presented an introduction to Kinect v2. Key points included:
- Kinect v2 features improved color camera, depth sensor, infrared camera, and body tracking capabilities compared to v1.
- It supports tracking of 6 people with 25 joints per person and new hand gestures like lasso.
- The SDK provides access to color, depth, infrared, body index, and body frames from the sensor.
- Demonstrated the basic workflow of initializing the sensor, getting frame sources and readers, and processing frame data for different streams.
This document summarizes key mobile features available in the Flash runtime, including accelerometer, GPS, camera, video playback, audio control, and native extensions. It provides code examples for accessing the accelerometer, GPS, camera, and playing video. Native extensions allow adding third-party native code APIs to AIR apps to enhance performance and expand functions. They involve an Android project with native code and a Flex library defining the ActionScript API.
This document summarizes various features and APIs available for mobile web development. It discusses viewport meta tags, touch events, gesture events, media queries, and device features like the device pixel ratio and connection type. It also lists some popular mobile JavaScript libraries. The document provides code examples for touch, gesture, and device motion events.
WebRTC & Firefox OS - presentation at GoogleRobert Nyman
WebRTC allows for real-time communications capabilities directly in the browser. Mozilla is working to integrate WebRTC into Firefox and Firefox OS to enable features like video chat. Some current focuses include fixing bugs, improving audio recording support, and bringing WebRTC to the initial release of Firefox OS later this year after the v1.1 version. Firefox OS uses open web technologies and various device APIs to build customizable apps and interfaces for the mobile operating system.
This document compares video management system (VMS) software from four vendors: Genetec, Aimetis, Digifort, and SecurOS. It outlines key features of their different software versions including site management, recording features, video features, analytics capabilities, maps, clients, events/alerts handling, and PTZ control. The table aims to provide a comparison guide for choosing between VMS options from these providers.
WebRTC Standards & Implementation Q&A - All about browser interoperabilityAmir Zmora
Hosting guest speaker Jan-Ivar Bruaroey of Mozilla Firefox WebRTC R&D team and contributor to adapter.js talking about Chrome and Firefox interoperability.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1Ihu917.
Jafar Husain shows the Reactive Extensions (Rx) library which allows to treat events as collections, how Netflix uses Rx on the client and the server, allowing to build end-to-end reactive systems. Filmed at qconsf.com.
Jafar Husain developed software for companies like GE, Microsoft, and Netflix. He specializes in building web servers and clients using functional reactive programming, and was the first user of the Reactive Extensions Framework. He's also responsible for "Falkor", a RESTful data access framework that powers most Netflix clients.
How to implement camera recording for USB webcam or IP camera in C#.NETOzeki Informatics Ltd.
More info: www.camera-sdk.com
Source code: http://www.camera-sdk.com/p_123-video-tutorial-on-how-to-record-video-in-c-onvif.html
Welcome to this presentation that explains step-by-step how to develop video recording feature for your USB webcam and your IP camera / ONVIF IP camera in C#.NET to be able to capture and save the camera image. Good luck, have fun!
Advanced AV Foundation (CocoaConf, Aug '11)Chris Adamson
The iOS version of iMovie uses the AV Foundation framework, and indications are that Final Cut Pro X will be using the Mac OS X version of AVF. And if AV Foundation is powerful enough to provide the core functionality of Final Cut, it must have some great stuff going on, right? In this session, we'll dig into the more powerful (and more challenging) APIs in AV Foundation, including reading and writing raw samples, performing live processing of incoming data at capture time, and advanced editing features like mixing audio and video tracks and adding Core Animation-based titles.
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Ivano Malavolta
The document discusses conducting experiments on the software architecture of robotic systems. It describes three experiments:
1) Identifying and evaluating "green" architectural tactics for energy-efficient robotics software by mining the ROS ecosystem.
2) Empirically exploring the performance and energy trade-offs of computation offloading for ground robots communicating over WiFi.
3) Analyzing how different 2D SLAM algorithms impact resource utilization in ROS-based systems, including metrics like energy consumption, CPU usage, memory usage, and map quality.
The slides of a short presentation I gave about my experience about working in the context of EU grants. It contains tips and tricks for the before/during/after phases of a EU project.
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)Ivano Malavolta
The Green Lab allows students to measure real software products for industry-driven experiments focusing on energy efficiency, performance, and other areas. It provides infrastructure for experimenting on software, including a master course, platform, and collaboration platform. The lab contains a green computing cluster managed by Proxmox virtualization software, which hosts various virtual machines for running experiments. Hardware in the cluster includes servers, workstations, and a smartphone test farm for controlling Android devices remotely. Students use tools like Android Runner and wattsup meters to automate experiments measuring aspects like energy consumption of mobile apps. The Green Lab also serves as a learning environment where students conduct experiments for class projects and contribute to open source tools like Android Runner.
This document discusses software sustainability from Ivano Malavolta, an assistant professor. It discusses how ICT is unsustainable due to the large amounts of energy consumed by platforms like YouTube. It also discusses research on improving the energy efficiency of software, including a case study on the KPMG software platform. Additionally, it discusses experiments on the energy impact of progressive web apps and service workers. Finally, it proposes using design decision maps to help frame sustainability concerns when planning software projects.
Navigation-aware and Personalized Prefetching of Network Requests in Android ...Ivano Malavolta
Slides of my presentation at the NIER track of the 41th International Conference on Software Engineering (ICSE 2019).
The paper is available here: http://www.ivanomalavolta.com/files/papers/ICSE_2019_NAPPA.pdf
How Maintainability Issues of Android Apps Evolve [ICSME 2018]Ivano Malavolta
Slides of my presentation at the Research track of the 34th International Conference on Software Maintenance and Evolution (ICSME 2018).
The full paper is available here: http://www.ivanomalavolta.com/files/papers/ICSME_2018.pdf
Collaborative Model-Driven Software Engineering: a Classification Framework a...Ivano Malavolta
Slides of my presentation at the Journal first track of the 40th International Conference on Software Engineering (ICSE 2018).
The accompanying extended abstract is available here: http://www.ivanomalavolta.com/files/papers/ICSE_2018_JournalFirst.pdf
The original TSE paper is available here: http://www.ivanomalavolta.com/files/papers/TSE_2017.pdf
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Modeling behaviour via UML state machines [Software Design] [Computer Science...Ivano Malavolta
This document provides an introduction to modeling behavior using UML state machines. It discusses key concepts like states, transitions, events, and state types. States represent when an object is active and can execute activities. Transitions change the object's state in response to events and can include actions. Event types include signals, operation calls, time-based and change events. The document also covers state machine notation including initial/final states, decisions nodes, parallel/orthogonal states, history states, and entry/exit points. An example state machine is provided and questions are asked to help understand state machine execution order and values.
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Modeling and abstraction, software development process [Software Design] [Com...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
[2017/2018] AADL - Architecture Analysis and Design LanguageIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
[2017/2018] Introduction to Software ArchitectureIvano Malavolta
This document provides an introduction to software architecture concepts. It defines software architecture as the selection of structural elements and their interactions within a system. Common architectural styles are described, including Model-View-Controller (MVC), publish-subscribe, layered, shared data, peer-to-peer, and pipes and filters. Tactics are introduced as design decisions that refine styles to control quality attributes. The document emphasizes that architectural styles solve recurring problems and promote desired qualities like performance, security, and maintainability.
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.it/.
http://www.ivanomalavolta.com
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
This presentation provides valuable insights into effective cost-saving techniques on AWS. Learn how to optimize your AWS resources by rightsizing, increasing elasticity, picking the right storage class, and choosing the best pricing model. Additionally, discover essential governance mechanisms to ensure continuous cost efficiency. Whether you are new to AWS or an experienced user, this presentation provides clear and practical tips to help you reduce your cloud costs and get the most out of your budget.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...alexjohnson7307
Predictive maintenance is a proactive approach that anticipates equipment failures before they happen. At the forefront of this innovative strategy is Artificial Intelligence (AI), which brings unprecedented precision and efficiency. AI in predictive maintenance is transforming industries by reducing downtime, minimizing costs, and enhancing productivity.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Digital Marketing Trends in 2024 | Guide for Staying AheadWask
https://www.wask.co/ebooks/digital-marketing-trends-in-2024
Feeling lost in the digital marketing whirlwind of 2024? Technology is changing, consumer habits are evolving, and staying ahead of the curve feels like a never-ending pursuit. This e-book is your compass. Dive into actionable insights to handle the complexities of modern marketing. From hyper-personalization to the power of user-generated content, learn how to build long-term relationships with your audience and unlock the secrets to success in the ever-shifting digital landscape.
Trusted Execution Environment for Decentralized Process MiningLucaBarbaro3
Presentation of the paper "Trusted Execution Environment for Decentralized Process Mining" given during the CAiSE 2024 Conference in Cyprus on June 7, 2024.
Trusted Execution Environment for Decentralized Process Mining
Apache Cordova APIs version 4.3.0
1. Gran Sasso Science Institute
Ivano Malavolta
Apache Cordova APIs
version 4.3.0
2. Roadmap
• Accelerometer
• Compass
• Capturing audio/video & camera
• Media playback
• Contacts
• Connection
• Device information
• Events
• Dialogs
3. Accelerometer
navigator.accelerometer
It is a global object that captures device motion in the x, y, and z directions
You can call 3 methods on it:
getCurrentAcceleration
watchAcceleration
clearWatch
Accelerometer
5. watchAcceleration
var
watchID
=
navigator.accelerometer.watchAcceleration(win,
fail,
[options]);
It gets the device's current acceleration at a regular interval
win
callback function with an Acceleration parameter, it is called at regular intervals
fail
error callback
options
the interval is specified in the frequency parameter
7. The Acceleration object
It contains accelerometer data captured at a specific point in time
Properties
x (Number): Amount of acceleration on the x-axis. (in m/s^2)
y (Number): Amount of acceleration on the y-axis. (in m/s^2)
z (Number): Amount of acceleration on the z-axis. (in m/s^2)
timestamp (DOMTimestamp): Creation timestamp in milliseconds
these values include the effect
of gravity (9.81 m/s^2)
8. Accelerometer example
var
options
=
{
frequency:
3000
};
var
watchID
=
navigator.accelerometer.watchAcceleration(win,
fail,
options);
function
win(acc)
{
if((acc.x
===
0)
&&
(acc.y
===
0)
&&
(acc.z
===
9.81))
{
console.log('I
am
on
a
table');
stop();
}
else
{
console.log('Please,
leave
me
on
the
table');
}
}
function
fail()
{
alert('error');
}
function
stop()
{
if(watchID)
{
navigator.accelerometer.clearWatch(watchID);
watchID
=
null;
}
}
10. Accelerometer
navigator.device.capture
Provides access for capturing directly from the device
Audio
Image
Video
Capturing Audio and Video
Omogeneous APIs between audio, image, and video
capturing based on a W3C specification
11. Supported formats
The navigator.device.capture
object contains the supported formats it can record in
three properties
supportedAudioModes
The audio recording formats supported by the device
supportedImageModes
The recording image sizes and formats supported by the device
supportedVideoModes
The recording video resolutions and formats supported by the device
They all contain an array of
ConfigurationData objects
12. The ConfigurationData object
It is used to describe media capture modes supported by the device
Properties
type (String)
the string in lower case representing the media type
height (Number)
the height of the image or video in pixels
width (Number)
the height of the image or video in pixels
ex.
• video/3gpp
• video/quicktime
• image/jpeg
• audio/amr
• audio/wav
13. Supported format example
var
imageModes
=
navigator.device.capture.supportedImageModes;
for(var
i=0;
i
<imageModes.length;
i++)
{
var
mode
=
imageModes[i];
console.log(mode.type);
console.log(mode.height);
console.log(mode.width);
}
14. Audio capture
captureAudio(win,
fail,
[options]);
Starts the audio recorder app and returns information about captured audio clip files
win
callback function with an array of MediaFile parameter
fail
error or when the users cancels the capture operation before capturing any media file
options
audio capture options
It uses the device's default
audio recording app
The operation allows the device
user to capture multiple
recordings in a single session
15. Options
limit (Number)
the maximum number of audio clips the user can record in a single capture operation
duration (Number)
the maximum duration of an audio sound clip, in seconds
not supported in iOS
not supported in Android
16. Audio capture example
var
options
=
{
limit:
2,
duration:
5
};
navigator.device.capture.captureAudio(win,
fail,
options);
function
win(mediaFiles)
{
var
i;
for
(i=0;
i<mediaFiles.length;
i++)
{
console.log(mediaFiles[i]);
}
}
function
fail(error)
{
console.log(‘Error
with
code:
'
+
error.code);
}
17. Image capture
captureImage(win,
fail,
[options]);
Start the camera application and return information about captured image file(s)
win
callback function with an array of MediaFile parameter
fail
error or when the users cancels the capture operation before capturing any media file
options
image capture options
It uses the device's
default camera app
The operation allows the device
user to capture multiple images
in a single session
19. Video capture
captureVideo(win,
fail,
[options]);
Start the camera application and return information about captured video file(s)
win
callback function with an array of MediaFile parameter
fail
error or when the users cancels the capture operation before capturing any media file
options
video capture options
It uses the device's
default camera app
The operation allows the device
user to capture multiple videos
in a single session
20. Options
limit (Number)
the maximum number of videos the user can take in a single capture operation
duration (Number)
the maximum duration of each video, in seconds
not supported in iOS
21. The MediaFile object
A MediaFile encapsulates properties of a media capture file
Properties
name (String): the name of the file, without path information
fullPath (String) : the full path of the file, including the name
type (String): the file's mime type
lastModifiedDate (Date): the date and time that the file was last modified
size (Number): the size of the file, in bytes
22. MediaFile format data
mediaFile.getFormatData(win,
[fail]);
It is used to get information about the format of a captured media file
win
callback function with a MediaFileData parameter
fail
error callback
23. The MediaFileData object
Encapsulates format information about a media file
Properties
codecs (String): The actual format of the audio and video content
bitrate (Number) : The average bitrate of the content (zero for images)
height (Number): the height of the image or video in pixels (zero for audio clips)
width (Number): the width of the image or video in pixels (zero for audio clips)
duration (Number): the length of the video or sound clip in seconds (zero for images)
24. Capture Error
Encapsulates the error code resulting from a failed media capture operation
It contains a pre-defined error code
CaptureError.CAPTURE_INTERNAL_ERR
CaptureError.CAPTURE_APPLICATION_BUSY
CaptureError.CAPTURE_INVALID_ARGUMENT
CaptureError.CAPTURE_NO_MEDIA_FILES
CaptureError.CAPTURE_NOT__SUPPORTED
25. Camera
navigator.camera
It provides an home-grown API for capturing images from the device’s default camera
application
It is developed in-house by Cordova in order to provide more options to developers
Methods:
getPicture
cleanup
26. Getting pictures from the camera
camera.getPicture(win,
[fail],
[options]);
Takes a photo using the camera or retrieves a photo from the device's album
win
callback function with a image data parameter
fail
error callback
options
capture parameters
The result of getPicture can be:
• a base64 encoded string
• the URI of an image file
Encoding the image using Base64
can cause memory issues on some
devices
27. getPicture options
getPicture() can be called with the following options
{
quality : 75,
destinationType : Camera.DestinationType.DATA_URL,
sourceType : Camera.PictureSourceType.CAMERA,
allowEdit : true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 100,
targetHeight: 100,
popoverOptions: CameraPopoverOptions,
saveToPhotoAlbum: false
};
28. getPicture options
quality (Number)
quality of saved image Range [0, 100]
allowEdit (boolean)
allow simple editing of the image before selection
destinationType (Number)
not supported in Android
33. Camera cleanup
camera.cleanup(win,
[fail]);
Removes intermediate photos taken by the camera from temporary storage
win
callback function
fail
error callback
Valid only when
• the value of Camera.sourceType === Camera.PictureSourceType.CAMERA
• the Camera.destinationType === Camera.DestinationType.FILE_URI
iOS only
34. Camera example
var
options
=
{quality:
50,
destinationType:
Camera.DestinationType.FILE_URI,
sourceType:
Camera.PictureSourceType.CAMERA
};
setTimeout(function()
{
navigator.camera.getPicture(win,
fail,
options);
},
3000);
function
win(imageURI)
{
var
element
=
document.getElementById('block');
element.setAttribute('src',
imageURI);
}
function
fail
(error)
{
console.log(error);
//
this
is
provided
by
the
device’s
native
code
}
35. Accelerometer
Media
The Media object provides the ability to record and play back audio files on a device
Media playback
It does not adhere to any W3C
specification, it is just a convenience API
provided by Cordova
36. The Media object
var
media
=
new
Media(src,
win,
[fail],
[status]);
src (String): A URI containing the audio content
The URI can be local or can be a URL addressable by a standard HTTP get request
win: callback executed when the object executes a play, record, or stop action
fail: error callback
status: callback executed to indicate status changes
Media status parameter values:
• Media.MEDIA_NONE = 0;
• Media.MEDIA_STARTING = 1;
• Media.MEDIA_RUNNING = 2;
• Media.MEDIA_PAUSED = 3;
• Media.MEDIA_STOPPED = 4;
38. Media example
var
media
=
new
Media(“http://path/to/mp3”,
win,
fail);
media.play();
setTimeout(function()
{
media.seekTo(10000);
},
5000);
//
every
second
we
log
the
position
var
myTimer
=
setInterval(function
()
{
media.getCurrentPosition(
function
(position)
{
if
(position
>
-‐1)
{
console.log((position)
+
"
seconds");
}
});
},
1000);
function stopAudio() {
if (media) {
media.stop();
}
clearInterval(myTimer);
myTimer = null;
}
39. Recording example
function
recordAudio()
{
var
src
=
‘recording.mp3’;
var
mediaRec
=
new
Media(src,
manageSuccess,
manageError);
mediaRec.startRecord();
}
function
manageSuccess()
{
console.log(‘Audio
recording
successful’);
}
function
manageError(error)
{
console.log(‘Error
recoding:
‘
+
error.code);
}
40. Media Error
Encapsulates the error code resulting from a failed media operation
It contains a pre-defined error code
MediaError.MEDIA_ERR_ABORTED
MediaError.MEDIA_ERR_NETWORK
MediaError.MEDIA_ERR_DECODE
MediaError.MEDIA_ERR_NONE_SUPPORTED
41. Accelerometer
navigator.contacts
A global object that provides access to the device contacts DB
You can call 3 methods on navigator.contacts
• navigator.contacts.create
• navigator.contacts.find
• navigator.contacts.pickContact
Contacts
42. Creating contacts
navigator.contacts.create(properties);
One of the few synchronous functions of Cordova
It returns a new Contact object
The properties parameter is a map of properties of the new Contact object
To persist the Contact object to the device, you have to invoke the Contact.save method
43. The Contact object
It contains all the properties that a contact can have
Every platform has its own quirks,
you better check them on the
Cordova documentation
44. The Contact object
A contact object provides the following methods:
clone()
returns a new Contact object that is a deep copy of the calling object, its id property is null
remove(win, fail)
removes the contact from the device contacts database
save(win, fail)
saves a new contact to the device contacts database
updates an existing contact if a contact with the same id already exists
45. Create contact example
var
contact
=
navigator.contacts.create({
displayName:
“Ivano“
});
var
name
=
new
ContactName();
name.givenName
=
“Ivano“;
name.familyName
=
“Malavolta“;
contact.name
=
name;
contact.birthday
=
new
Date(“19
July
1983);
contact.save(win,
fail);
function
win(contact)
{
console.log(Save
Success);
};
function
fail(contactError)
{
console.log(Error
=
+
contactError.code);
};
46. Finding contacts
navigator.contacts.find(fields,
win,
fail,
options);
It queries the device contacts database and returns an array of Contact objects
fields: contact fields to be used as search qualifier. Only these fields will have values in the
resulting Contact objects
win: callback function with the array of contacts returned from the contacts database
fail: error callback
options: search options to filter contacts
47. Contact fields
Specifies which fields should be used as qualifiers of the search
var
fields
=
[displayName,
name];
//
or
[“*”]
navigator.contacts.find(fields,
win,
fail);
function
win(contacts)
{
console.log(‘ok');
};
function
fail(err)
{
console.log(err.code);
};
48. Contact find options
Contains properties that can be used to filter the results
filter (String)
the search string used to find contacts, a case-insensitive, partial value match is applied
to each field specified in the contactFields parameter
multiple (Boolean)
determines if the find operation should return multiple contacts
49. Contact Error
Encapsulates the error code resulting from a failed lookup operation in the contacts DB
It contains a pre-defined error code
ContactError.UNKNOWN_ERROR
ContactError.INVALID_ARGUMENT_ERROR
ContactError.TIMEOUT_ERROR
ContactError.PENDING_OPERATION_ERROR
ContactError.IO_ERROR
ContactError.NOT_SUPPORTED_ERROR
ContactError.PERMISSION_DENIED_ERROR
50. Contact find example
var
options
=
new
ContactFindOptions();
options.filter
=
“Ivano;
options.multiple
=
true;
filter
=
[displayName,“birthday];
navigator.contacts.find(filter,
win,
fail,
options);
function
win(contacts)
{
for
(var
i=0;
icontacts.length;
i++)
{
console.log(contacts[i].displayName);
}
};
function
fail(contactError)
{
console.log(Error
=
+
contactError.code);
};
51. Picking contacts
navigator.contacts.pickContact(win,[fail]);
Launches the device contact picker to select a single contact
win: callback function with the selected Contact object
fail: error callback navigator.contacts.pickContact(win,
fail);
function
win(contact)
{
console.log(’Just
selected:
'
+
JSON.stringify(contact));
}
function
fail(error)
{
console.log('Error:
'
+
error);
}
53. Connection.type
Encapsulates the error code resulting from a failed lookup operation in the contacts DB
Values:
Connection.UNKNOWN
Connection.ETHERNET
Connection.WIFI
Connection.CELL_2G
Connection.CELL_3G
Connection.CELL_4G
Connection.CELL
Connection.NONE
iOS can't detect the type of cellular network
connection, it will return always Connection.CELL
54. Connection events
Based on two main events:
online - fires when the application's network connection changes to being
online (that is, it is connected to the Internet)
offline - fires when the application's network connection changes to being
offline (that is, no Internet connection available)
document.addEventListener(‘offline’,
onOffline,
false);
function
onOffline()
{
console.log(‘The
user
is
not
connected
to
the
Internet
now’);
}
56. Device properties
A device object provides the following properties:
device.model
the name of the device's model or product (ex. “iPad 2”, “iPhone 5,1”, etc.)
device.cordova
the version of Cordova running on the device
device.platform
the devices’ operating system (ex. “Android”, “iOS”, etc.)
http://theiphonewiki.com/wiki/Models
57. Device properties
device.uuid
a unique identifier of the user’s device (UUID)
Android: a random 64-bit integer generated at device’s first boot
iOS: a string of hash values created from multiple hardware identifies
device.version
the OS version of the device (ex. “4.1”, “2.2”, etc.)
in iOS it is not reliable: The uuid on iOS is unique for each
device, but varies for each app, for each installation
59. Accelerometer
An event is an action that can be detected by your JavaScript code
In traditional JS programs, any element of the page can have certain events
ontouchstart, onclick, ...
To use any event, you’ll want to use an event listener
document.addEventListener(EVENTNAME,
callback,
false);
Events
60. Cordova events
• deviceready
• pause, resume
• batterycritical, batterylow, batterystatus
• backbutton, menubutton, searchbutton
• startcallbutton, endcallbutton
• volumedownbutton, volumeupbutton
these work on Blackberry 10 only
Android buttons events
61. deviceready
It is the most important in event in a Cordova app
Once deviceready is fired, you know two things:
• The DOM has loaded
• the Cordova native API are loaded too
62. App lifecycle events
Based on two main events:
pause
fires when an application is put into the background
resume
fires when a paused application is put back into the foreground
resign, active
iOS-specific events that are triggered when the users locks/unlocks the device
IOS: In the pause handler, any calls to the Cordova API or to
native plugins that go through Objective-C do not work,, they
are only processed when the app resumes.
63. Battery events
Based on two main events:
batterycritical
fires when the battery has reached the critical level threshold
batterylow
similar to batterycritical, but with a higher threeshold
batterystatus
fires a change in the battery status is detected
This value is device-specific
The battery status must
change of at least 1%
64. Battery events
The handler of a battery event is always called with an object that contains two properties:
level (Integer)
The percentage of battery (0-100)
isPlugged (Boolean)
true if the device is plugged to the battery charger
66. Alert
navigator.notification.alert(message,
callback,
[title],
[button]);
Shows a custom alert to the user
• message: the string to present to the user
• callback: the function invoked when the user taps on the button
• title: title of the alert (default is “Alert”)
• button: name of the confirm button (default is “Ok”)
67. Confirm
navigator.notification.alert(message,
callback,
[title],
[buttons]);
Similarly to alert, it shows a customizable confirmation dialog to the user
• message: the string to present to the user
• callback: the function invoked when the dialog is dismissed
it takes a “buttonIndex“ parameter to know which button has been pressed (it starts from 1)
• title: title of the dialog (default is “Confirm”)
• buttons: array of strings containing the button labels (default is [‘Ok’, ‘Cancel’])
68. Example
navigator.notification.confirm(
'You
are
the
winner!',
//
message
onConfirm,
//
callback
to
invoke
with
index
of
button
pressed
'Game
Over',
//
title
['Restart','Exit']
//
buttonLabels
);
function
onConfirm(buttonIndex)
{
alert('You
selected
button
'
+
buttonIndex);
}
69. Prompt
navigator.notification.prompt(message,
callback,
[title],
[buttons],
[text]);
It shows a customizable dialog with a prompt to the user
• message: the string to present to the user
• callback: the function invoked when the dialog is dismissed
it takes a “results“ parameter to know which button has been pressed (it starts from 1) and the
text entered by the user
• title: title of the dialog (default is “Prompt”)
• buttons: array of strings containing the button labels (default is [‘Ok’, ‘Cancel’])
• text: default text in the input box
70. Beep
navigator.notification.beep(times);
It playes a beep sound
• times (Number): the number of times to repeat the beep
Android plays the default Notification ringtone specified
under the Settings/Sound Display panel
72. What is not covered in this lecture
• Cordova Native Platform Dev workflow Plugman
• Cordova’s secondary APIs:
• Splashscreen, InAppBrowser, Globalization
• Geolocalization
• Local storage File API
• PhoneGap Build
• How to develop a plugin
We will have dedicated
lectures on these