1.1.2 for: • Adding libraries as dependencies•
1.2 ManifestIn android studio platform, every application must have an AndroidManifest.xml file in root directory. This file provides necessary information about the application to the Android system, that the system must have before it can execute the code.The Manifest file does have the followings: • The Java package name for the application in this file.
This name provides unequaled descriptive for the application.• It explains the components of the application, that includes activities, services, broadcast receivers and content providers that compose the application.• It clarifies the aim and minimum level of the Android API that the application requires.
• It declares the permissions for the application must have to access protected parts of API.• It lists the libraries that the application must be linked against.• It lists the Instrumentation classes that provide profiling and other information as the application runs. While the application is being developed these declarations are present in the manifest and they are removed when the application is published1.
1.3 GradleGradle is an open source build system that works on Android Studio and automates the development steps of the android applications. When we create a project in Android Studio, the gradle build system automatically activated and the build process is performed.We use gradle for: • Adding libraries as dependencies• Defining build types such as development, release etc. • Defining version code and name,• Defining SDK version1.1.4 ProGuardProGuard is a Java class file shrinker, optimizer, obfuscator, and preverifier. The shrinking step of proguard detects and removes unused classes, fields, methods, and attributes.
Our main purpose of using ProGuard is obfuscation, it prevents reverse engineering so our code is safe when someone try to see the code from apk files.1.1.5 ResourcesAndroid resources is a big part of android. It helps developers for the separation of the code and static assets. It contains all kind of images, layouts, application logo and all other static values.1.1.
5.1 DrawablesAn android drawable resource is used for a graphics which can be drawn on the application screens such as shapes, images, selectors and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon.There are various types of drawables such as:State List: An XML file that references different bitmap graphics for different states (for example, to use a different image when a button is pressed). Creates a StateListDrawable.Vector Drawable: An XML file that describes an image. It is very useful since it supports different screen sizes.1.1.
5.2 Layout ResourceAn android layout resource file defines and modifies the architecture of UI in an Activity or a component of a UI. There are two ways to declare a layout:• Declare UI elements in XML. Android provides a straightforward XML vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts.• Instantiate layout elements at runtime.
Your application can create View and ViewGroup objects (and manipulate their properties) programmatically.The Android framework gives you the flexibility to use either or both of these methods for declaring and managing your application’s UI. The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it’s easier to debug problems.1.1.
5.3 ValuesA values resource file is the place where the application collects the different resources in the child files such as strings, integers, dimensions styles and colors.String: A string resource provides text strings for your application with optional text styling and formatting. The reason why this useful is because you can use the string you defined in this file at everywhere.Color: A color value which is defined in XML. The color identified with an RGB value and alpha channel. You can use hexadecimal value for the color where it is accepted for color resource.
Also, you can use a color resource when drawable resource is accepted in XML (for example, android:drawable=”@color/red”). The value always begins with a pound (#) character and then followed by the Alpha-Red-Green-Blue information in one of the following formats:• #RGB• #ARGB• #RRGGBB• #AARRGGBBColor State List: It describes a list that changes by state. For example, developer can describe different colors for button’s state like normal, pressed in one color file.Dimension: A dimension value defined in XML. A dimension takes a number in order to specified and it is followed by a unit of measure. For example, 5sp,10dp. There are two units of measure commonly used and are supported by Android:a) Density Pixel(Dp):An abstract unit that is based on the physical density of the screen. When running on a higher density screen, the number of pixels used to draw 1dp is scaled up by a factor appropriate for the screen’s dpi.
When running a lower density screen, just the opposite of first condition. Using dp units instead of pixel provides consistency for the real-world size of UI elements across different devices.b) Scale Pixel(Sp):This unit is likely dp but it is also scaled by the user’s font size preferences. Which means that if you specifying font sizes its recommend to use sp and it will be adjusted for both the screen density and user’s preferences.Style: A style resource file is a collection of properties that specify the look and format for a view or window.
A style can specify properties such as height, padding, font color, font size, background color and much more. Style is defined in an XML resource that is separate from the XML that specifies the layout.1.1.6 LibrariesRetrofit: Retrofit is a type-safe rest client for Android and Java.
It turns HTTP API into a Java Interface. You’ll use annotations to describe HTTP requests, URL parameter replacement and query parameter support is integrated by default. Additionally, it provides functionality for custom headers, multipart request body, file uploads and downloads, mocking responses and much more.
ButterKnife: ButterKnife is a view binding library that uses annotation to generate boilerplate code for us. It has been developed by Jake Wharton. It makes your code less and more clear.
It is time saving to write repetitive lines of code. To avoid writing repetitive code just like “findViewById(R.id.
yourview)”, butterknife helps you to binds fields, method and views for you.EvenBus: EventBus provides the communication between all classes. Performs well with activities, fragments and background threads. Picasso: Picasso allows for hassle-free image loading in application-often in one line of code.
Many common pitfalls of image loading on Android are handled automatically by Picasso:• Handling ImageView recycling and download cancelation in an adapter.• Complex image transformations with minimal memory use.• Automatic memory and disk caching.Permission Dispatcher: PermissionsDispatcher provides a simple annotation-based API to handle runtime permissions. This library lifts the burden that comes with writing a bunch of check statements whether a permission has been granted or not from you, in order to keep your code clean and safe.
JodaTime: Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. 1.1.7 Model View ControllerModel View Controller is a design pattern that android follows. There are three layers of mvc such as:• Model – the data layer, responsible for managing the business logic and handling network or database API.
• View – the UI layer, a visualization of the data from the Model.• Controller – the logic layer, gets notified of the user’s behavior and updates the model as needed. 1.1.8 PolymorphismPolymorphism is used for sending a same message to the objects of the classes and objects behave differently.
• It reduces the complexity of the object.• Through polymorphism complete implementation can be replaced by using same method signatures.• It reduces the volume of works in terms of handling various objects.1.
1.9 InterfaceAn interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. One usage of interfaces in android is to allow a Fragment to communicate with its Activity. It is defined in fragment and implement in the activity.1.
2 IOSIOS is a closed source mobile operating system created and developed by Apple. It is the second most popular OS system.1.2.1 SwiftSwift is an object-oriented programming language created by Apple to develop iOS and Mac applications for iOS and OS X platforms.1.2.2 StoryboardStoryboard is a visual representation of the user interface of an IOS application, showing screens of content and the connections between those screens.
A storyboard is composed of a sequence of scenes, each of which represents a view controller and its views; scenes are connected by segue objects, which represent a transition between two view controllers.1.2.3 ControllersThe UIViewController class defines the shared behavior that is common to all view controllers. You rarely create instances of the UIViewController class directly.
Instead, you subclass UIViewController and add the methods and properties needed to manage the view controller’s view hierarchy.A view controller’s main responsibilities include the following:• Updating the contents of the views, usually in response to changes to the underlying data.• Responding to user interactions with views.• Resizing views and managing the layout of the overall interface.• Coordinating with other objects including other view controllers in your application.1.2.
4 Property List FilesThe property list file is a structured text file that contains essential configuration information for a bundled executable. The root XML node is a dictionary, whose contents are a set of keys and values describing different aspects of the bundle. The system uses these keys and values to obtain information about your app and how it is configured. Property list files allow you to build your application in different modes such as releasing, developing or testing. There is a code for getting key from plist;Bundle.main.
object(forInfoDictionaryKey: “ApiUrl”) as! String1.2.5 LibrariesAlamofire: Alamofire is an HTTP networking library written in Swift. It provides chainable request/response methods, JSON parameter and response serialization, authentication, and many other features.DZNEmptyDataSet: Most applications show list of contents(data sets), that turn out to be empty.
This library blocks this problem and provides many things such as:• Avoiding white-screens and communicating to your users why the screen is empty• Calling to action (particularly as an onboarding process).• Avoiding other interruptive mechanisms like showing error alerts.• Being consistent and improving the user experience.• Delivering a brand presence.
ObjectMapper: ObjectMapper is a framework written in Swift that makes it easy for you to convert your Model objects to and from JSON.DateToolsSwift: DateTools was written to streamline date and time handling in iOS. DateTools removes the boilerplate required to access date components, handles more nuanced date comparisons, and serves as the foundation for entirely new concepts like Time Periods and their collections.