Page 1 of 6 ITECH2000 Mobile Development Fundamentals Assessment Task 3 – AppInventor App (Reddit Browser) Overview You will implement in AppInventor a multi-screen app, based on a given project...

1 answer below »
i have uploaded the question


Page 1 of 6 ITECH2000 Mobile Development Fundamentals Assessment Task 3 – AppInventor App (Reddit Browser) Overview You will implement in AppInventor a multi-screen app, based on a given project specification. This app will use a range of components taught up to and including Week 11 of the course. You will also submit a brief report containing pseudocode and a description of how your solution utilises various concepts learned in class. Timelines and Expectations Percentage value of task: 20% (of final course mark) Due date: 11:59pm, Sunday 11th October 2020 (Week 11) – after this date, you will receive a penalty Cut-off date: 11:59pm, Sunday 18th October 2020 – after this date work will not be accepted Minimum time expectation: 15 hours Maximum time expectation: 30 hours – Most students should not require this much time. Learning Outcomes Assessed The following course learning outcomes are assessed by completing this assessment. K1. Understand constructs typical of many programming languages such as: variables, expressions, assignment, sequence, selection, iteration, procedures, parameters, return values. A1. Design, develop, test and debug mobile apps from a given textual program specification. S1. Analyse the input, processing and output needs of small programming problems. S2. Design code sequences to realise algorithms in a programming language. S3. Design basic user interfaces and develop storyboards to convey designed interaction sequences. S5. Develop test cases to ensure correct behaviour. Assessment Details This assignment contains two parts: an app and a brief report. 1. App Details Your assignment is to develop an Android application, using MIT AppInventor, which will store a list of interesting “subreddits” from the popular social website Reddit (https://reddit.com), and download the current top posts from those “subreddits” for viewing. If you are not familiar with the Reddit platform, you can read more about it here: https://en.wikipedia.org/wiki/Reddit. As your application will only be reading information from the Reddit API (and not posting any information), you will not be required to register your own account on Reddit for this assignment. The application should contain a number of screens, which are described in the following sections. Note: Your app does not need to look identical to the provided screenshots. As long as you fulfil the requirements in a logical way that follows what you have learned this semester, you have free reign to design your interfaces as you like. CRICOS Provider No. 00103D | RTO Code 4909 https://reddit.com/ https://en.wikipedia.org/wiki/Reddit CRICOS Provider No. 00103D | RTO Code 4909 Page 2 of 6 Screen 1: Subreddit List When the application is first opened, a screen should be displayed which contains a list of “subreddits” that the user has previously added, as well as a “Add New Subreddit” button. When clicked, this should open Screen 2, where the user inputs a subreddit name that is returned back to this screen and added to the list of “subreddits” (if it’s not a duplicate that is already in the list). Once the user has added a subreddit, it should be displayed in the list of subreddits. The list of subreddits should be persisted using a TinyDB so that it can be reloaded after the user closes and reopens the app or returns to this screen from another screen. As an added feature, the list of subreddits should always display in alphabetical order using a sorting algorithm (see Week 10 materials). When the user clicks on a subreddit from the list, they should be presented with two options: 1. View Posts: If selected, then Screen 3 should be loaded with this subreddit being passed to it as a start value. Screen 3 will load the most recent posts from this subreddit (if it’s valid). 2. Delete Subreddit: If selected, then this subreddit should be removed from the list and no longer persisted in the TinyDB. Screen 2: Add Subreddit Screen This screen should allow the user to enter a subreddit name and choose to save it. If the user enters a subreddit name (it doesn’t have to be valid) and chooses to save it, it should return the subreddit name back to Screen 1 to be persisted. This screen should include validation so that the user can’t save an empty subreddit name. If the users decides not to add a subreddit, they should be able to cancel and return back to Screen 1 without making any changes to the list of subreddits. Screen 3: View Posts Screen After a user selects to view the posts for a subreddit from Screen 1, this screen should be loaded. The name of the subreddit that is being viewed should be displayed on this screen, as well as a list of the titles of the most recent posts from this subreddit. See the instructions below for guidance on downloading the posts. If the subreddit doesn’t exist, or there is no network connection, an appropriate error should be displayed to the user. When a post title is clicked, its associated URL should be passed to Screen 4 which will load and display the website. Downloading posts from Reddit using an API We are going to use the Pushshift Reddit API to download the most recent posts for a subreddit. You can get the most recent posts for a subreddit in JSON format using the following URL – all you need to do is replace with an actual subreddit’s name as required: https://api.pushshift.io/reddit/submission/search/?subreddit=&limit=5 CRICOS Provider No. 00103D | RTO Code 4909 Page 3 of 6 For example, https://api.pushshift.io/reddit/submission/search/?subreddit=Android&limit=5 will give us the five most recent posts from the Android subreddit. Note that the limit parameter is optional, but to keep things simple I recommend loading only a small number of posts to start with. If you visit the link and view the JSON in a web browser, you will see that the JSON contains an array (data) of posts, with each post containing a range of information that describes the post. For the purposes of this assignment, we are only interested in the title and the url values for each post, so your app should extract these and load into an appropriate data structure to achieve the functionality required for this screen. On the other hand, if you provide a subreddit to the API that doesn’t exist (try typing in some gibberish), you will see that the API returns an empty array of posts. This will help you to determine whether a subreddit is valid or not for the purpose of displaying an error to the user. Screen 4: View URL Screen After the user selects an individual post to view on Screen 3, this screen receives the post’s URL and loads it in a WebViewer component. Using relevant event blocks, the user should be shown a loading message while the website URL is loading, which should disappear once the site has completed loading. This screen should also provide the user with a mechanism to return to the previous screen (Screen 3) to select another post to view from the current subreddit. General Requirements for Coding While your app should meet the functionality described above, you need to ensure that you demonstrate the concepts we have covered in ITECH2000 so far. To achieve full marks you will need to ensure that you have correctly made use of each of the following components, constructs or concepts somewhere in your app: • Dictionary • WebViewer • Web component • ListView or ListPicker • TinyDB • Local and global variables You should follow best practices for coding that we have described this semester, including the use of procedures to promote code reuse. Make sure you thoroughly test your application to ensure that it is robust. Please read through all of the requirements before you commence work on the app, so you get a full sense of what is required to be done. It is recommended that you first model any events using pseudocode before commencing programming. 3. Brief Report As well as completing the program described above in AppInventor, you are also required to submit a brief report that includes the following: • A title page that includes your name and student ID number. • Pseudocode describing the behaviour of two (2) events that your app will respond to. Ensure that you clearly label your pseudocode so that it is clear what aspect you are modelling. https://api.pushshift.io/reddit/submission/search/?subreddit=Android&limit=5 CRICOS Provider No. 00103D | RTO Code 4909 Page 4 of 6 • For each of the design components/blocks listed in the previous section (General Requirements for Coding), you should describe in 2-3 sentences how you used this component in your solution and justify why. If you have used a component multiple times, please describe one example. • A description of how you tested your application to ensure that it functioned correctly, with respect to user inputs, outputs, and networking. Getting Assistance and Clarification If any part of the task is unclear to you, or you are not quite sure how to do some aspect of the task, you should either contact your lecturer directly (via email, or in person while you are in class), or else post a question to the Discussion Forum on Moodle. However, any questions posted to the forum on Moodle should not include anything that you plan to submit (such as screenshots of code you might want to submit). Plagiarism Plagiarism is the presentation of the expressed thought or work of another person as though it is one’s own without properly acknowledging that person. You must not allow other students to copy your work and must take care to safeguard against this happening. More information about the plagiarism policy and procedure for the university can be found at https://federation.edu.au/current-students/learning- and-study/online-help-with/plagiarism Submission You must export your AppInventor project for submission. To do this, go to the “Projects” menu, and select “Export selected project (.aia) to my computer”. Rename the .aia file to include both your name and student ID number. App files submitted in any other format than .aia (e.g. apk) will not be accepted and you will receive zero marks. You should also save your brief report as a PDF including both your name and student ID in the file
Answered Same DayOct 04, 2021ITECH2000

Answer To: Page 1 of 6 ITECH2000 Mobile Development Fundamentals Assessment Task 3 – AppInventor App (Reddit...

Kushal answered on Oct 10 2021
149 Votes
assets/blocks.png
src/appinventor/ai_17bch030/iRead2/Screen1.bky



Screen1




EQ





errorNumber




1101







InfoNotifier





No internet connectivity




please check your internet










googleBookSearchURL
This is the google's books api url.


https://www.googleapis.com/books/v1/volumes




on component_type="Form" is_generic="false" instance_name="Screen1" event_name="OtherScreenClosed">
Screen1





GetBookInfo





result





Label7
Text





result








tempData
For storing data temporarily.








Screen1



ReadButton
Visible


FALSE






Screen2









Screen1



ListView1
Elements









Screen2








bookURL
This is for storing the book url for browsing.







allTitles







isfirstItem


TRUE





ReadButton
If we were able to get a url of book info, we launch the browser with that url.




Screen5







ListView2
Elements







ListView1
Selection





ListView1
Elements













GetBookInfo
bookName
We construct and set the url property of our web component.
1. maxResults=3 because we want three possible matches from Google. You can get more by changing the maxResults value. But this will slow down the parsing process.
2. We don't want too much detail. Hence, we used projection=lite. If you don't specify it, google books api will respond with full info.




WebFetch
Url











https://api.pushshift.io/reddit/submission/search/?subreddit




=







WebFetch


bookName








&limit=5







WebFetch







ListView1



ReadButton
Visible


TRUE











ParseBookResult
jsonResponse
startTag
endTag
This is the parsing process/procedure. We parse the response from google books api.
1. jsonResponse is the response from books api.
2. startTag defines the starting text of a property (e.g. "title":) returned by books api.
3. endTag tells until what text to get.





global tempData



SPLITATFIRST


jsonResponse




startTag









EQ




global tempData






2






global tempData




global tempData




2






global tempData





SPLITATFIRST


global tempData




endTag






1






global tempData
We need to parse the json response.



WebFetch


global tempData






global tempData
If our json data contain html tags such as &, this operation (HtmlTextDecode) will replace them with readable values. Like & will be replaced with &



WebFetch


global tempData














global tempData


No Result From Google!










global tempData







WebFetch
This fetches the data returned by books api. If responseCode is 200, that means google server was able to find a match and return some response for our search. Otherwise, something went wrong with our query.




NEQ





responseCode




200







InfoNotifier





Error Getting Data : Response Received from Server -







responseCode











EQ





responseCode




200







ListView2
Elements



SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here