Ios android app Assingment
Budget: $10 – $30 USD
You are again to construct both an Android and iOS app. These apps should demonstrate lifecycles on these platforms. Here is a description of the two apps.
Android
In the Android app, create a two activity app. One activity is the MainActivity and the other is a manually created alert Activity (AlertActivity, as demonstrated in class, start the second activity upon a button click in the first view. Both activities should override the following activity lifecycle methods: onRestart, onStart, onResume, onPause, onStop, and onDestroy. The only actions in each of these methods are to call the parent's corresponding (overridden) method and to log the name of the class and the name of the method being called. That is, call
android.util.Log.d
passing the string name of the class (this.getClass().getSimpleName()) and the string name of the method.
The MainActivity and its corresponding view (layout/activity_main.xml should include a button and a simple message. When the button is clicked, create a new Intent for the AlertActivity and start the activity associated with the intent. The AlertActivity should only take up a portion of the screen (about a third) and include a message, such as "Hello Android Developer", and a Button labeled OK. Clicking the OK button should cause the AlertActivity to finish.
iOS
In the iOS app, do not implement the same functionality as you did for Android. Instead, log all of the AppDelegate lifecycle methods. Use the NSLog or the print method. These provide the opportunity for the app developer to react to any state changes in the app from a single place in the app's code. All of these methods have empty implementations in the Single View Application template. You should provide a log that names the method that has been called. Explore with the App and the Simulator to discover how to get all of the six methods to be called and generate a log that displays in Xcode. Add the scenario for getting the method to be called in the source code comments above the method.
In this app, implement two simple views that demonstrate each of the optional lifecycle methods in UIViewController:
override func viewWillAppear(_ animated: Bool)
override func viewDidAppear(_ animated: Bool)
override func viewWillDisappear(_ animated: Bool)
override func viewDidDisappear(_ animated: Bool)
For both Android and iOS, implement these methods to create a log entry (NSLog, print, and/or android.util.Log.d method) that identifies the view controller and method that's been called. In comments before the method implementation, indicate what you had to do to get the system to call the method, thus generating a log entry.
Same as with the Android app, get each life-cycle (state transition) method to be called. Using comments before each method, explain what you had to do to get the method to be called. Augment the template comments in the app delegate methods with a description of what you had to do on the Simulator/Xcode to get the message to display in the Xcode log.
As part of the class header comments, include a right to use statement. The examples presented in class use the Apache License Version 2, but you should put whatever rights you prefer. At the very least, you must provide the instructor and the University with the right to build and evaluate the software package for the purpose of determining your grade and program assessment.
These comments are required on all code that you generate this semester. If you hand in an assignment that does not include them, it will not be graded. Here are the StudentJson classes that were constructed during the first class session as part of the example Android and iOS apps. See studentJsonClasses.jar. Use java's jar command to extract this file. It will create a folder containing a playground that can be opened in Xcode and a Java class in the file StudentJson.java.
Android
In the Android app, create a two activity app. One activity is the MainActivity and the other is a manually created alert Activity (AlertActivity, as demonstrated in class, start the second activity upon a button click in the first view. Both activities should override the following activity lifecycle methods: onRestart, onStart, onResume, onPause, onStop, and onDestroy. The only actions in each of these methods are to call the parent's corresponding (overridden) method and to log the name of the class and the name of the method being called. That is, call
android.util.Log.d
passing the string name of the class (this.getClass().getSimpleName()) and the string name of the method.
The MainActivity and its corresponding view (layout/activity_main.xml should include a button and a simple message. When the button is clicked, create a new Intent for the AlertActivity and start the activity associated with the intent. The AlertActivity should only take up a portion of the screen (about a third) and include a message, such as "Hello Android Developer", and a Button labeled OK. Clicking the OK button should cause the AlertActivity to finish.
iOS
In the iOS app, do not implement the same functionality as you did for Android. Instead, log all of the AppDelegate lifecycle methods. Use the NSLog or the print method. These provide the opportunity for the app developer to react to any state changes in the app from a single place in the app's code. All of these methods have empty implementations in the Single View Application template. You should provide a log that names the method that has been called. Explore with the App and the Simulator to discover how to get all of the six methods to be called and generate a log that displays in Xcode. Add the scenario for getting the method to be called in the source code comments above the method.
In this app, implement two simple views that demonstrate each of the optional lifecycle methods in UIViewController:
override func viewWillAppear(_ animated: Bool)
override func viewDidAppear(_ animated: Bool)
override func viewWillDisappear(_ animated: Bool)
override func viewDidDisappear(_ animated: Bool)
For both Android and iOS, implement these methods to create a log entry (NSLog, print, and/or android.util.Log.d method) that identifies the view controller and method that's been called. In comments before the method implementation, indicate what you had to do to get the system to call the method, thus generating a log entry.
Same as with the Android app, get each life-cycle (state transition) method to be called. Using comments before each method, explain what you had to do to get the method to be called. Augment the template comments in the app delegate methods with a description of what you had to do on the Simulator/Xcode to get the message to display in the Xcode log.
As part of the class header comments, include a right to use statement. The examples presented in class use the Apache License Version 2, but you should put whatever rights you prefer. At the very least, you must provide the instructor and the University with the right to build and evaluate the software package for the purpose of determining your grade and program assessment.
These comments are required on all code that you generate this semester. If you hand in an assignment that does not include them, it will not be graded. Here are the StudentJson classes that were constructed during the first class session as part of the example Android and iOS apps. See studentJsonClasses.jar. Use java's jar command to extract this file. It will create a folder containing a playground that can be opened in Xcode and a Java class in the file StudentJson.java.
Related categories:
Business, Accounting, Human Resources & Legal
Mobile App Development
iPhone
Android
iPad