1. Homepage
  2. Programming
  3. 159.336 Assignment 2: Gallery application

159.336 Assignment 2: Gallery application

Engage in a Conversation
Massey159336Mobile Application DevelopmentGallery applicationAndroidJava

159.336 Assignment 2

Due 22nd September 2023 CourseNana.COM

For this assignment you need to write a simple gallery application for Android to view all the photos that are stored on the device. CourseNana.COM

The gallery must show a scrollable grid of all photos. When you click on a photo it must open in a separate activity which shows only that photo. CourseNana.COM

Your app must use a GridView or RecyclerView and an Adapter, the Adapter must load photos using a background thread. Use the MediaStore content provider to get a list of all photos ordered by date added with the most recent first, for each photo you will need the id, orientation, width and height. You must use a target API of at least 30. For API level 33 and above you need to get the READ_MEDIA_IMAGES permission, below this you need READ_EXTERNAL_STORAGE permission. To get an InputStream for a photo use: CourseNana.COM

is=getContentResolver().openInputStream(Uri.withAppendedPath(MediaStore.Images.Media.
EXTERNAL_CONTENT_URI,id)); // id is a string obtained forom the mediastore _ID column

You can use BitmapFactory.decodeStream with inSampleSize Options to load a low resolution image and ThumbnailUtils.extractThumbnail to create a reasonable size thumbnail. You may need to rotate the thumbnail depending on the MediaStore.Images.Media.ORIENTATION. CourseNana.COM

To speed up loading you may want to use a cache of thumbnails. You are not allowed to use an image library such as Glide, Fresco, Picasso or Photo Picker (submissions using any of these will get 0 marks) but you can use a memory or disk cache as described here: CourseNana.COM

https://developer.android.com/topic/performance/graphics/cache-bitmap CourseNana.COM

The single photo activity view should have a higher resolution than the thumbnail. You can optionally add pinch to zoom to the photo viewer and gallery. Make sure your app behaves correctly when the device is rotated and when photos are added or deleted. Make sure your app works with large images, i.e. up to 12MP. CourseNana.COM

Submit your assignment on Stream. You must submit a zip file containing a clean source tree. To do this, use “File..Export to Zip File...” in Android Studio. Do not use any libraries other than those included in the latest Android SDK. You will lose marks if you submit a zip which was not created by Android Studio or in any other format (such as rar or 7z). Marks will be deducted for zip files which do not build correctly. Do not change the top level gradle build file. There are some example images on Stream, transfer them to the emulator using the Android Studio device explorer. You will need to do a cold boot for them to appear in MediaStore. CourseNana.COM

This is an individual assignment, you can not work in groups. Marks will be awarded for well written programs. Use comments in your code to document it. Marks will be subtracted for plagiarism, late submission and bad documentation. This assignment is worth 20% of the total marks for the course. M Johnson 2023 CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Massey代写,159336代写,Mobile Application Development代写,Gallery application代写,Android代写,Java代写,Massey代编,159336代编,Mobile Application Development代编,Gallery application代编,Android代编,Java代编,Massey代考,159336代考,Mobile Application Development代考,Gallery application代考,Android代考,Java代考,Masseyhelp,159336help,Mobile Application Developmenthelp,Gallery applicationhelp,Androidhelp,Javahelp,Massey作业代写,159336作业代写,Mobile Application Development作业代写,Gallery application作业代写,Android作业代写,Java作业代写,Massey编程代写,159336编程代写,Mobile Application Development编程代写,Gallery application编程代写,Android编程代写,Java编程代写,Masseyprogramming help,159336programming help,Mobile Application Developmentprogramming help,Gallery applicationprogramming help,Androidprogramming help,Javaprogramming help,Masseyassignment help,159336assignment help,Mobile Application Developmentassignment help,Gallery applicationassignment help,Androidassignment help,Javaassignment help,Masseysolution,159336solution,Mobile Application Developmentsolution,Gallery applicationsolution,Androidsolution,Javasolution,