Notes based on: https://www.linkedin.com/learning/learning-ios-for-android-developers/welcome?u=2062740
Please note that the programming language section will not be covered in detail, as the language only matters if you are developing specifically for that platform.
If you find the notes to be too brief and want to learn more indepth on each topic, be sure to checkout the Android Developer Site & iOS developer site!
The event loop is initialized when the app moves to the foreground.
onCreate
: initialize resources and create the UI.onPause
and/oronDestroy
: save changes to data before your app moves from the foreground to the background or your app process is destroyed.
There are two types of Android Services.
- Started services: merely set off on their assigned task until finished.
- Bound services: provides a handle for other components to interact with and receive notifications
Broadcast Receivers can be declared either in the Android Manifest or the Context.
- For those declared in the
AndroidManifest.xml
, the receiver will still be registered even when the app is closed. - For those declared in the
Context
object, the receiver will be registered as long as theContext
is still in scope.
These receivers will be on listening mode and when they receive an appropriate broadcast, they will call the onReceive
method to cause a change in the app that they are designated for.
For the resources of each app such as images, videos and contacts, they are provided via the Content Provider. Outside apps cannot access the app's resources directly and have to request content from the Content Provider of the app. There also exist the System Content Providers which can provide an app's data to outside apps.
Java code is compiled into ByteCodes (*.class
) that can be interpreted by the Java Virtual Machine (Android Runtime) and can be run by the Android OS Hardware.
willFinishLaunchingWithOptions
: the initiation of UI and resourcesapplicationWillResignActive
: Save data before app moves to the backgroundapplicationWillTerminate
: This method is different from Android and may not be called. Hence it is not recommended to do any cleanup / saving of state here. Cleanup must happen earlier in the life cycle.
Swift is compiled into Binary Code that can run on OS devices.