5COSC005W - Tutorial 4 Exercises

As part of this tutorial for this week, you should complete ALL the tasks described in the following links and specifications: (make sure that you ask questions to your tutor for anything that you do not understand or if you are stuck at any point):

Important Note - Because of changes in the visibility of packages in API 30 (Android 11): For the tasks below you should change the target SDK version to a version which is API 29 or below. This is done by changing it in the build.gradle module file and re-sync the project (there are 2 files with the same name, make sure you pick the module one).

Alternatively, if you target API 30 or higher you should modify your AndroidManifest.xml file to include the following <queries> tag (you might also need to "Clean the Project" from the "Build" menu):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.implicitintents">
    <queries>
	<intent>
	    <action android:name="android.intent.action.VIEW" />
	    <data android:scheme="http"/>
	</intent>
    </queries>
    <application
	android:allowBackup="true"
	android:icon="@mipmap/ic_launcher"
	android:label="@string/app_name"
	android:roundIcon="@mipmap/ic_launcher_round"
	android:supportsRtl="true"
	android:theme="@style/Theme.ImplicitIntents">
	<activity android:name=".MainActivity">
	    <intent-filter>
		<action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
	    </intent-filter>
	</activity>
    </application>
</manifest>
  1. Implicit Intents

The material for these tasks was created by Google, used under a Creative Commons Attribution 4.0 International license.