<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2021W_Lecture_21</id>
	<title>Mobile App Development 2021W Lecture 21 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2021W_Lecture_21"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2021W_Lecture_21&amp;action=history"/>
	<updated>2026-04-24T00:40:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2021W_Lecture_21&amp;diff=23118&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on March 31, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec21-20210331.m4v is now available].  =...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2021W_Lecture_21&amp;diff=23118&amp;oldid=prev"/>
		<updated>2021-03-31T18:36:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on March 31, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec21-20210331.m4v is now available].  =...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on March 31, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec21-20210331.m4v is now available].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 21&lt;br /&gt;
----------&lt;br /&gt;
* Assignment 3 solutions&lt;br /&gt;
* app manifest&lt;br /&gt;
* Intents&lt;br /&gt;
  - explicit&lt;br /&gt;
  - implicit&lt;br /&gt;
* drawable shapes&lt;br /&gt;
* touch events&lt;br /&gt;
&lt;br /&gt;
Tutorial 9 and A4 will come out this week, probably tomorrow.&lt;br /&gt;
&lt;br /&gt;
Tutorial 10 will be optional and on iOS storyboard&lt;br /&gt;
 - can substitute for a tutorial that you missed&lt;br /&gt;
 - won&amp;#039;t be on the final exam&lt;br /&gt;
&lt;br /&gt;
Application manifest&lt;br /&gt;
 - tells Android how to run the app&lt;br /&gt;
 - this is where you define activities&lt;br /&gt;
   - really, classes that are associated with layouts&lt;br /&gt;
 - and also define intents your app will respond to&lt;br /&gt;
   - such as launching the app&lt;br /&gt;
&lt;br /&gt;
Intents are the basic inter-process communication mechanism on android&lt;br /&gt;
 - think of them as messages that can be sent between programs, including a program to itself&lt;br /&gt;
 - used to launch activities&lt;br /&gt;
&lt;br /&gt;
(By the way, intents are built on mechanisms that are not&lt;br /&gt;
Linux-native, rely on modifications to the Linux kernel that were only upstreamed relatively recently)&lt;br /&gt;
&lt;br /&gt;
idea is to do fast message passing with minimal amount of memory copying&lt;br /&gt;
  - copying memory is slow&lt;br /&gt;
  - example, zero-copy networking&lt;br /&gt;
&lt;br /&gt;
If you want to start a new class with a new screen, standard way is to use an intent&lt;br /&gt;
 - and your new class will have to set things up just&lt;br /&gt;
   as we did in MainActivity, including specifying the layout&lt;br /&gt;
 - be sure to add the activity to the application manifest&lt;br /&gt;
&lt;br /&gt;
Launching your own class as a new activity is an &amp;quot;explicit&amp;quot; intent&lt;br /&gt;
 - you specified what code should run (i.e., the class)&lt;br /&gt;
&lt;br /&gt;
But in many contexts, you don&amp;#039;t know what code to run&lt;br /&gt;
 - you want a service provided by another application&lt;br /&gt;
&lt;br /&gt;
Implicit intents let you make requests when you don&amp;#039;t know what application will handle the request.&lt;br /&gt;
 - simple example: open web page in a browser&lt;br /&gt;
 - when you specify a default browser in android, you&lt;br /&gt;
   are specifying what browser will handle intents such as&lt;br /&gt;
   ACTION_VIEW&lt;br /&gt;
&lt;br /&gt;
You have to be careful when defining intents, especially implicit intents&lt;br /&gt;
 - can be called by arbitrary apps&lt;br /&gt;
 - so, you may need to do access control&lt;br /&gt;
 - can be a big security hole, depending on how they are used&lt;br /&gt;
&lt;br /&gt;
If you care about security or privacy at all as a developer, you need to pay attention to android intents and the permissions associated with them&lt;br /&gt;
 &lt;br /&gt;
Drawable shapes&lt;br /&gt;
 - in iOS SwiftUI, we&amp;#039;d just say Circle, Rectangle etc&lt;br /&gt;
   and we&amp;#039;d get shapes&lt;br /&gt;
 - in Android, it is a bit more complicated&lt;br /&gt;
    - with a canvas, we can do these things programmatically&lt;br /&gt;
      much like a canvas in a web page&lt;br /&gt;
 - but in a regular view, you need to specify&lt;br /&gt;
   drawings using drawable shapes and paths normally&lt;br /&gt;
   specified in XML&lt;br /&gt;
    - you can display using an ImageView (just like a jpeg)&lt;br /&gt;
&lt;br /&gt;
Touch events in Android are a lot more complicated than in SwiftUI&lt;br /&gt;
 - we&amp;#039;re not going to achieve parity with iOS in this class,&lt;br /&gt;
   that will have to wait until 2601&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regarding grading&lt;br /&gt;
 - assignments, tutorials, and participation can&lt;br /&gt;
   only improve your grade relative to the midterm and final&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>