Android Viva Question
Android Viva Question
What is Dart?
A Flutter app is always considered as a tree of widgets. Whenever you are going
to code for building anything in Flutter, it will be inside a widget. Widgets
describe how your app view should look like with their current configuration
and state. When you made any alteration in the code, the widget rebuilt its
description by calculating the difference of previous and current widget to
determine the minimal changes for rendering in the app's UI.
The Stateless widget does not have any state information. It remains static
throughout its lifecycle. The examples of the Stateless widget are Text, Row,
Column, Container, etc. If the screen or widget contains static content, it should
be a Stateless widget, but if you want to change the content, it needs to be a
Stateful widget.
It is the project's configuration file that will use a lot during working with the
Flutter project. It allows you how your application works. It also allows us to set
the constraints for the app. This file contains:
The hot reload feature allows you to quickly and easily perform an experiment
in the project. It helps to build UI, add new features, fix bugs, and make app
development fast. To perform hot reloading of a Flutter app, do the following
steps:
What is an Activity?
What is an Intent?
Answer: The container holds objects, widgets, labels, fields, icons, buttons. etc.
Answer: The Adapter is used to create child views to represent the parent view
items.
Answer: Shared preferences are the simplest mechanism to store the data in
XML documents.
in android SQLite is a opensource SQL database that stores data to a text file
on a device. Android comes in with built in SQLite database implementation.
SQLite supports all the relational database features. In order to access this
database, you don't need to establish any kind of connections for it like
JDBC,ODBC e.t.c
Client-server decoupling
Communication support
Lightweight
Uniform interface
Stateless
Layered system
Cacheable
Code on demand
What is Retrofit?
Retrofit is a REST client for Android, through which you can
1.
make easy to use interfaces which can turn any Android app
into a powerful one.
2. It is developed by Square Inc.
3. Retrofit turns your REST API into a Java interface.
4. Retrofit can perform Async and sync requests with
automatic JSON parsing without any effort.
What is Volley?
Volley is a networking library it offers great features like
1.
synchronous requests, asynchronous requests, prioritization,
making multiple requests at the same time, ordered
requests, and of course caching.
Difference Between Retrofit and Volley
Retrofit Volley
1. Retrofit can parse many 1. StringRequest – This type
other types of responses of request converts the
automatically like: response into a String.
Activities can be terminated or closed anytime the user wishes. On the other hand, services
are designed to run in the background, and they can act independently.
Most of the services run continuously, irrespective of whether there are certain or no
activities being executed.
Activities Services
They are designed to run in the These are mainly designed to run in the background. Foreground
foreground. services are also available.
SQLite is the open-source relational database used in Android. The SQLite engine is
serverless, transactional, and also self-contained. Instead of the client-server relationship of
most database management systems, the SQLite engine is integrally linked with the
application.