<?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_12</id>
	<title>Mobile App Development 2021W Lecture 12 - 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_12"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2021W_Lecture_12&amp;action=history"/>
	<updated>2026-04-26T12:47:32Z</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_12&amp;diff=22967&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on February 24, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec12-20210224.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_12&amp;diff=22967&amp;oldid=prev"/>
		<updated>2021-02-24T21:38:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on February 24, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec12-20210224.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 February 24, 2021 [https://homeostasis.scs.carleton.ca/~soma/mad-2021w/lectures/comp1601-2021w-lec12-20210224.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 12&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
 - assignment/tutorial questions&lt;br /&gt;
 - installing Android Studio&lt;br /&gt;
 - defining characteristics of mobile platforms&lt;br /&gt;
&lt;br /&gt;
To lock an angle to 45 degree increments...&lt;br /&gt;
&lt;br /&gt;
divide by 45, round, then multiply by 45&lt;br /&gt;
&lt;br /&gt;
 - you want to do this where the angle is changed by a drag gesture&lt;br /&gt;
   (not where it is inputted via the keyboard)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
17 degrees + 45 degrees is 62 degrees, not a multiple of 45&lt;br /&gt;
&lt;br /&gt;
angles should be 0, 45, 90, etc.&lt;br /&gt;
&lt;br /&gt;
So for question 5, you need to have an array you can index properly.&lt;br /&gt;
 - it may be easier to change the assets to have the same name&lt;br /&gt;
   as the strings used in the menus, that is permissible&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running Android studio&lt;br /&gt;
 - on Linux, easy (I used the snap)&lt;br /&gt;
 - on Windows, a bit tricky to get simulator running&lt;br /&gt;
    - need to disable Hyper-V, which isn&amp;#039;t so simple because&lt;br /&gt;
      many things use it (but by default it is off in Win10 home)&lt;br /&gt;
    - and, make sure virtualization is enabled in your BIOS&lt;br /&gt;
&lt;br /&gt;
Android Studio isn&amp;#039;t currently supported on M1 macs&lt;br /&gt;
 - but IntelliJ is, so you can do everything except run the simulator&lt;br /&gt;
   (I believe)&lt;br /&gt;
 - there are preview builds of Android Studio&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What&amp;#039;s so different about mobile application development?&lt;br /&gt;
 - as compared with (most) current desktop and server development?&lt;br /&gt;
&lt;br /&gt;
* multitouch interfaces (but Windows 8/10 supports that too, some Linux)&lt;br /&gt;
  - touch first interfaces, limited mouse support (traditionally)&lt;br /&gt;
* &amp;quot;walled gardens&amp;quot; - you can&amp;#039;t install arbitrary code (beyond a web browser)&lt;br /&gt;
  - more like game consoles than desktops&lt;br /&gt;
* the original iPhone had *no* support for 3rd party apps&lt;br /&gt;
  - everything not coming from Apple had to run in a browser&lt;br /&gt;
&lt;br /&gt;
Mobile app development is really different from desktops because of the security model&lt;br /&gt;
 - which is actually different from traditional game consoles&lt;br /&gt;
 - all code needs to be signed (to verify integrity and authenticity)&lt;br /&gt;
    - this has become standard&lt;br /&gt;
 - code is sandboxed, with privileged operations gated behind access controls&lt;br /&gt;
   - Android: permissions asked at install time, some at run time now&lt;br /&gt;
   - iOS: all 3rd party apps have same limited access, can ask&lt;br /&gt;
     for some runtime permissions&lt;br /&gt;
&lt;br /&gt;
Compare 3rd party keyboards on iOS and Android&lt;br /&gt;
 - Android has had them since (almost) the beginning&lt;br /&gt;
   - can do everything that 1st party keyboards do&lt;br /&gt;
 - iOS 3rd party keyboards are relatively recent&lt;br /&gt;
   - even today, they can&amp;#039;t be used for sensitive tasks like entering passwords unless you specifically say to (but not Apple ID passwords)&lt;br /&gt;
&lt;br /&gt;
A keyboard can steal all typed input&lt;br /&gt;
 - iOS is very paranoid about them&lt;br /&gt;
 - android says, sure, go ahead&lt;br /&gt;
&lt;br /&gt;
Note which ecosystem has more malware!&lt;br /&gt;
&lt;br /&gt;
fundamental difference between iOS and Mac malware&lt;br /&gt;
 - macs let you install anything, iOS doesn&amp;#039;t&lt;br /&gt;
&lt;br /&gt;
Android is more widespread, so that is part of why there is more malware&lt;br /&gt;
&lt;br /&gt;
But also, Android allows for more customization&lt;br /&gt;
 - those lower-level permissions can also be used by malware&lt;br /&gt;
&lt;br /&gt;
(BTW don&amp;#039;t run antivirus on a Mac, they almost all cause more problems than they solve)&lt;br /&gt;
&lt;br /&gt;
And on Windows, just use Microsoft&amp;#039;s AV.&lt;br /&gt;
&lt;br /&gt;
 - yes, there are still risks, but nobody catches all malware&lt;br /&gt;
&lt;br /&gt;
AV in general is a messed up product category&lt;br /&gt;
 - lots of snake oil&lt;br /&gt;
 - nobody catches the new threats&lt;br /&gt;
&lt;br /&gt;
The real problem is security requires deep OS access&lt;br /&gt;
 - and deep OS access is exactly what malware wants too&lt;br /&gt;
&lt;br /&gt;
So letting any third party have such access reduces platform security&lt;br /&gt;
 - iOS is the extreme example of this&lt;br /&gt;
&lt;br /&gt;
M1 macs aren&amp;#039;t really new from a software perspective&lt;br /&gt;
 - mostly recompiled code&lt;br /&gt;
 - code was already being compiled for ARM since iOS and MacOS share so much code&lt;br /&gt;
&lt;br /&gt;
This is all why apps installed from app stores on Windows and Mac have less access to the system than regular apps&lt;br /&gt;
 - Linux snaps are this way by default as well&lt;br /&gt;
&lt;br /&gt;
less access -&amp;gt; more security -&amp;gt; less user control&lt;br /&gt;
 (I don&amp;#039;t like this...)&lt;br /&gt;
&lt;br /&gt;
Android devices have a really poor record of security updates, and fundamental&lt;br /&gt;
platform design choices make them harder to lock down&lt;br /&gt;
 - but if you&amp;#039;re really careful about what you install, much of this can be mitigated.  Third party tools can help too, but some can cause more problems than they solve&lt;br /&gt;
&lt;br /&gt;
Mobile apps by default have less access than desktop apps&lt;br /&gt;
 - all desktop apps can access everything on your system, at least&lt;br /&gt;
   in your account (which is the data you care about)&lt;br /&gt;
 - mobile device apps get limited access&lt;br /&gt;
&lt;br /&gt;
again, desktop apps are catching up to mobile devices in locking things down&lt;br /&gt;
 - really, mobile devices came after the desktop, so they learned from the choices that were made on the desktop&lt;br /&gt;
    - why Apple didn&amp;#039;t allow apps to be installed at first, and then&lt;br /&gt;
      has only given access in a limited way&lt;br /&gt;
&lt;br /&gt;
Other difference is the particular APIs you use&lt;br /&gt;
 - but that isn&amp;#039;t always so different&lt;br /&gt;
 - SwiftUI is supported on desktop and mobile, for example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More hints for Assignment 2&lt;br /&gt;
 - question 5, remember how to do a circular list&lt;br /&gt;
    - modulo length of the list&lt;br /&gt;
&lt;br /&gt;
array of 5 items, want to always get the next item, wrapping around when we get to the end&lt;br /&gt;
&lt;br /&gt;
a[0]...a[4] are the elements&lt;br /&gt;
&lt;br /&gt;
So, we always access a[i % 5], so (i mod 5), which is the remainder of dividing i by 5, so will always be a value between 0 and 4.&lt;br /&gt;
&lt;br /&gt;
Note that 5 mod 5 = 0, 6 mod 5 = 1, so it wraps around&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>