Kotlin and Android Basics

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Who developed Kotlin?

JetBrains

Which extension is responsible to save Kotlin files?

.kt

In Kotlin, _____ is the default visibility modifier.

public

What is super keyword?

<p>references the parent class</p> Signup and view all the answers

What is the meaning of interface?

<p>A contract that defines a set of methods that a class must implement.</p> Signup and view all the answers

What is the meaning of this keyword?

<p>Refers to the current instance of the class.</p> Signup and view all the answers

Explain visibility modifier.

<p>Visibility modifiers control the accessibility of classes, objects, interfaces, constructors, functions, properties and their setters. Kotlin has four visibility modifiers: private, protected, internal, and public.</p> Signup and view all the answers

Explain abstract class.

<p>An abstract class is a class that cannot be instantiated directly and may contain abstract members (methods without implementation).</p> Signup and view all the answers

Explain loop in Kotlin.

<p>Kotlin has several types of loops: <code>for</code>, <code>while</code>, and <code>do-while</code>. <code>for</code> is used for iterating over a range, collection, or array; <code>while</code> and <code>do-while</code> are used for repeated execution based on a condition.</p> Signup and view all the answers

Explain inheritance if Kotlin.

<p>Inheritance in Kotlin allows a class (subclass or derived class) to inherit properties and methods from another class (superclass or base class). Kotlin uses the <code>:</code> operator to denote inheritance.</p> Signup and view all the answers

OHA stands for _____

<p>Open Handset Alliance</p> Signup and view all the answers

APK file found in _____ folder.

<p>bin</p> Signup and view all the answers

What is service?

<p>A component that runs in the background to perform long-running operations or to perform work for remote processes.</p> Signup and view all the answers

What is Linux Kernel?

<p>The core of the Linux operating system, providing essential services like hardware abstraction, memory management, and process management.</p> Signup and view all the answers

Explain Android Manifest.xml file.

<p>The AndroidManifest.xml file provides essential information about your app to the Android system. It declares the app's permissions, hardware and software features, activities, services, and more.</p> Signup and view all the answers

Explain inter filter.

<p>An inter filter in Android allows a component to advertise its ability to handle certain implicit intents. When an app tries to start an activity or service, the system uses intent filters to determine which components can handle the intent.</p> Signup and view all the answers

Explain Android architecture.

<p>Android architecture is divided into layers: Linux kernel, Hardware Abstraction Layer (HAL), Native Libraries, Android Runtime (ART), Application Framework, and Applications.</p> Signup and view all the answers

Explain activity life cycle.

<p>The activity lifecycle includes states such as onCreate, onStart, onResume, onPause, onStop, and onDestroy, each triggered by specific events as the user interacts with the app.</p> Signup and view all the answers

A _____ allows the user to type text into your application.

<p>EditText</p> Signup and view all the answers

_____ enables you to specify the location of child objects relative to each other.

<p>RelativeLayout</p> Signup and view all the answers

What is the meaning of ViewGroup?

<p>ViewGroup is a base class for layouts and views containers. It holds other views and defines the layout properties for its children.</p> Signup and view all the answers

What is the meaning of fragment?

<p>A fragment represents a portion of a UI in an Activity. It enables more modular activity design and is reusable across multiple activities.</p> Signup and view all the answers

What is Canvas?

<p>Canvas provides methods to draw shapes, text, bitmaps, and other objects onto a bitmap. It is typically used in conjunction with a View to draw custom graphics.</p> Signup and view all the answers

List of basic UI. Define any one.

<p>TextView: Displays text to the user. Button: A clickable UI element that performs an action when pressed.</p> Signup and view all the answers

Explain Progress Bar.

<p>A ProgressBar is a visual element that indicates the progress of a lengthy operation. It can be determinate (showing specific progress) or indeterminate (showing that something is happening without indicating how much is completed).</p> Signup and view all the answers

Explain Array Adapter.

<p>ArrayAdapter is a type of adapter that provides views for each item in an array of data. It's commonly used with ListView or Spinner to display a list of items.</p> Signup and view all the answers

Explain different types of layout in detail.

<p>LinearLayout: Arranges views in a single row or column. RelativeLayout: Positions views relative to each other or the parent. ConstraintLayout: Provides a flexible way to design UIs with constraints.</p> Signup and view all the answers

Explain types of animation.

<p>View Animation (Tween Animation): Performs animations on views such as scaling, rotating, translating, and fading. Property Animation: Animates properties of objects over a period of time. Drawable Animation (Frame Animation): A sequence of images that create an animation.</p> Signup and view all the answers

_____ is used to get string values from Shared Preferences.

<p>getString()</p> Signup and view all the answers

_____ method is used to delete file.

<p>delete()</p> Signup and view all the answers

In android, by default, SQLite database save data in _____.

<p>/data/data/&lt;package_name&gt;/databases</p> Signup and view all the answers

_____ is the recommended way for sharing data across packages.

<p>ContentProvider</p> Signup and view all the answers

Explain the methods of data storage.

<p>Shared Preferences: Store private primitive data in key-value pairs. Internal Storage: Store private data on the device's internal memory. External Storage: Store public data on the shared external storage.</p> Signup and view all the answers

What is contract class ?

<p>A contract class defines constants for the URIs, data columns, and table names used to access a database. It organizes and centralizes the database schema.</p> Signup and view all the answers

Explain schema.

<p>Schema defines the structure of data, including the tables, columns, data types, and relationships in a database.</p> Signup and view all the answers

How to obtain permission to write data to external storage?

<p>Declare the <code>WRITE_EXTERNAL_STORAGE</code> permission in the AndroidManifest.xml file. Request the permission from the user at runtime using <code>ActivityCompat.requestPermissions()</code>.</p> Signup and view all the answers

What is SQLite Database ? Explain methods for creating and deleting database records.

<p>SQLite is a lightweight, file-based database. Create records with <code>INSERT</code>, delete records with <code>DELETE</code> statements.</p> Signup and view all the answers

What is Shared Preferences ? Explain methods for create, search, read, add, update and delete shared preferences.

<p>Shared Preferences allow you to save small collections of key-value pairs. Use <code>SharedPreferences.Editor</code> to <code>put</code> (create/update), <code>get</code> (read or search), and <code>remove</code> (delete) data.</p> Signup and view all the answers

A _____ service is the server in a client-server interface.

<p>bound</p> Signup and view all the answers

To set up a notification so it can be updated issue it with a _____.

<p>unique ID</p> Signup and view all the answers

Use the _____ method to issue the notification.

<p>NotificationManager.notify()</p> Signup and view all the answers

List out the components available with notification.

<p>Content Title, Content Text, Small Icon, Large Icon, Actions</p> Signup and view all the answers

Explain Android telephony API.

<p>The Telephony API provides access to phone-related information and control, like phone state, network information, and making calls.</p> Signup and view all the answers

Explain Manage Network Usage.

<p>Monitoring and controlling the amount of data an app uses to avoid excessive data consumption.</p> Signup and view all the answers

Write steps to publish your android application.

<p>Create a developer account, prepare your app, create a release build, upload to Play Console, set pricing and distribution, and publish.</p> Signup and view all the answers

Flashcards

Who developed Kotlin?

Kotlin was developed by JetBrains.

What is internal in Kotlin?

Default visibility modifier in Kotlin.

What is an interface?

An interface is a contract that classes can implement, defining a set of methods that the implementing class must provide.

Where is APK file found?

APK files are found in the 'bin' folder

Signup and view all the flashcards

What is service?

A service is a background process that performs long-running operations without a user interface.

Signup and view all the flashcards

What is ViewGroup?

A ViewGroup is a container that holds other Views and manages their layout.

Signup and view all the flashcards

What is fragment?

A fragment is a modular section of an Android activity's user interface.

Signup and view all the flashcards

How to retrieve a string from Shared Preferences

"getString() function" is used to get string values from shared preferences.

Signup and view all the flashcards

What is LBS?

LBS stands for Location-Based Service

Signup and view all the flashcards

What is WebView?

A WebView is a view that displays web pages directly inside your application.

Signup and view all the flashcards

Study Notes

  • The following are potential questions from a Mobile Application Development in Android using Kotlin course.

Kotlin Fundamentals

  • Need to know who developed Kotlin.
  • Need to know what file extension is used to save Kotlin files.
  • Need to know what the default visibility modifier in Kotlin is.
  • Need to explain the use of the super keyword.
  • Need to define the meaning of "interface" in the context of Kotlin.
  • Need to define other Kotlin keywords.
  • Aim to explain visibility modifiers.
  • Aim to explain abstract classes.
  • Aim to explain loops in Kotlin.
  • Aim to explain inheritance in Kotlin.

Android Basics

  • Need to explain what OHA, SDK, NFC stand for.
  • Need to know which folder the APK file is found in.
  • Need to know what a service is.
  • Need to know what the Linux Kernel is.
  • Need to explain the Android Manifest.xml file.
  • Need to explain inter filter functionality.
  • Need to explain Android architecture and the Activity life cycle.
  • Understand how an EditText field allows users to type in the application.
  • Understand how coordinates are specified relative to each other.
  • What is the meaning of ViewGroup?
  • What is the meaning of fragment?
  • What is the "canvas"?
  • List basic user interfaces and define one.
  • Explain the Progress Bar and Array Adapter.
  • Explain different types of layouts and animation.
  • Explain how to get string values from Shared Preferences.
  • Which method is used to delete files?
  • By default, SQLite databases save data in a specific location in Android.
  • Know the recommended method for sharing data across packages.
  • Explain the methods of data storage and what the contract class is.

Data Handling and External Storage

  • Explain schemas and how to obtain permission to write data to external storage.
  • Need to define SQLite Database.
  • Need to explain the methods for creating and deleting database records in SQLite.
  • Need to define Shared Preferences and explain methods for create, search, read, add, update, and delete shared preferences.

Client-Server Interaction and Notifications

  • Define which service is the server in a client-server interface.
  • Understand how to set up a notification.
  • Understand the meaning of GPS.
  • Know which method to use to issue notifications.
  • Need to define LBS and WebView.
  • List the components available with notifications.
  • Explain the Android telephony API.

Application Publication

  • Explain how to manage Network Usage.
  • Explain the steps to publish an Android application.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser