CO838 Internet of Things /: Mobile
CO838 Internet of Things /: Mobile
CO838 Internet of Things /: Mobile
Ian Utting
Web App or Native App?
http://xkcd.com/1174/
Web App or Native App?
<script>
var x=document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation not supported by this browser.";}
}
function showPosition(position) {
x.innerHTML="Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
From W3Schools
Geolocation information
• Views
• UI elements
• Content Providers
• Enable data sharing between applications
• Resource Manager
• Provides access to non-code resources
• Notification Manager
• Enables applications to display alerts, status
messages, etc
• Activity Manager
• Manages lifecycles of activities
Applications (1)
• Activity
• User interface (composed of Views) for a single task
• App may use several Activities
• Service
• Background process, no UI
• May be used by several apps
• Broadcast Receiver
• Receives/acts on notifications
• Intent
• Used to activate Activities, Services and Broadcast
Receivers
• Content Provider
• Makes data available to other apps, typically from an
on-device SQLite database
The Manifest file