Monday, 16 October 2023

Internet of Things

Definition of IOT 

The Internet of Things (IoT) refers to the network of physical objects, devices, vehicles, buildings, and other items embedded with sensors, software, and network connectivity, allowing them to collect and exchange data.

Characteristics of IOT are as follow :

1. Connectivity

2. Sesors

3. Self adapting 

4. Data Processing

5. Automation

6. Scalability

7. Unique identity


History and Evolution of IOT

The concept of IoT dates back to the early 1980s, but significant progress began in the 2000s with the emergence of RFID technology and the integration of the internet. The evolution of IoT has been driven by advancements in sensor technology, connectivity, and cloud computing. It has found applications in various industries, including healthcare, agriculture, and smart cities.


IOT - An Architectural Overview

It typically includes a high-level representation of the key components and layers that make up an IoT system


  • Sensing Layer : first layer of the IoT architecture and is responsible forcollecting data from different sources. 
  • Network Layer : It is responsible for providing communication and connectivity between devices in the IoT system
  • Data processing layer : It refers to the software and hardware components that are responsible for collecting, analyzing, and interpreting data
  • Application Layer : It is the topmost layer that interacts directly with the end-user and it is responsible for providing user-friendly interfaces. 

Building an Architecture: It involves various layers, such as device layer, communication layer, middleware layer, and application layer. It is designed to enable data flow from devices to applications, encompassing protocols, gateways, and cloud-based services.


Main Design Principles and Needed Capabilities: It include scalability, security, interoperability, and reliability. IoT architectures should be able to handle diverse devices and data types, maintain data privacy, and ensure seamless communication.

An IoT Architecture Outline: IoT architecture includes edge devices (sensors and actuators), local processing (gateways), cloud or edge servers, and user applications. Data flows through these components, often using protocols like MQTT or HTTP.


Standardizing the IoT

Smart objects produce large volumes of data. This data needs to be managed, processed, transferred and stored securely. Standardization is key to achieving universally accepted specifications and protocols for true interoperability between devices and applications.

Here are some important considerations regarding standards in IoT:

  • Interoperability
  • Security
  • Data formats and models
  • Communication Protocols
  • Device management 
  • Wireless connectivity

M2M and IoT Technology Fundamentals

Devices and gateways: IoT devices range from simple sensors to complex machines. Gateways act as intermediaries between devices and the network, aggregating data and facilitating communication.

Local and wide area networking : IoT devices use various networking technologies, including Wi-Fi, Bluetooth, Zigbee for local connectivity, and cellular, LPWAN, and satellite for wide-area coverage.

Data Management : Data from IoT devices needs to be stored, processed, and analyzed. Cloud platforms and edge computing are common solutions for data management.

  • Data collection
  • Data ingestion
  • Data storage 
  • Data processing
  • Data integration
  • Data security

Business Process in IOT : IoT transforms business processes by providing real-time data, improving decision-making, and enabling automation. It has applications in inventory management, predictive maintenance, and supply chain optimization.

Here are some key roles that IoT plays in BPM:

  • Process Automation: to automate various aspects of business processes.
  • Realtime monitoring:  provides real-time data from sensors and devices, allowing organizations to monitor processes as they happen.
  • Data driven decision making: It generates vast amounts of data, which can be analyzedto gain insights into process efficiency, product quality, and customer behavior.
  • Predictive mantainace
  • Supply chain optimization
  • Customer experience enhancement
  • Energy efficiency
  • Healthcare process improvement
  • New business models
  • Security and privacy

Everything as a Service (XaaS)

XaaS refers to delivering various services over the internet, including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). In IoT, XaaS allows users to access IoT-related services on-demand, such as IoT platforms and analytics.

M2M and IoT Analytics

M2M (Machine-to-Machine) and IoT analytics involve processing and deriving insights from the vast amount of data generated by IoT devices. This helps in making data-driven decisions, predicting trends, and optimizing operations.



Knowledge Management

In IoT, knowledge management involves capturing, storing, and utilizing insights and information gained from IoT data. It enables organizations to make informed decisions, improve processes, and innovate based on IoT-generated knowledge.


Introduction Basics of Embedded Systems Design

Embedded systems are specialized computing systems designed to perform specific tasks. They are embedded within larger systems or products. Key characteristics include real-time operation, reliability, and resource constraints. 

Advantages: 

  • Compact Size
  • Lower Power consumption
  • Reliability
  • Cost efficiency
  • Enhanced control
  • customization
Disadvantages:
  • Limited flexibility
  • Development complexity
  • Maintainance complexity
  • Cost of customization
  • Compatibility issues

Basic aspects of embedded systems design include:

  • Hardware Integration: Embedded systems often involve integrating microcontrollers or microprocessors with various peripherals and sensors to perform specific functions.
  • Software Development: Designing software for embedded systems requires considering memory limitations, real-time requirements, and efficient code execution.
  • Testing and Validation: Rigorous testing and validation are essential to ensure the reliability and correctness of embedded systems.

Embedded OS - Design Constraints and Applications:

  • Design Constraints: Embedded operating systems must adhere to constraints such as minimal memory and storage requirements, real-time capabilities, and power efficiency. They are often specialized to the specific task at hand.
  • Applications: Embedded OSs are used in diverse applications, including consumer electronics, automotive systems, industrial automation, medical devices, and IoT devices.

Architecting Mobile Applications

  • User Interfaces for Mobile Applications: Mobile app architecture includes designing the user interface (UI) to provide a seamless user experience. It involves layout design, navigation, and responsiveness for different devices and screen sizes.
  • Touch Events and Gestures: Mobile apps are heavily reliant on touch-based interactions. Designing for touch events and gestures is crucial for user-friendliness. This includes swipe, pinch, tap, and multi-touch gestures.

Achieving Quality Constraints in Mobile Applications:
  • Performance: Mobile apps must be responsive and performant. Optimizing code, minimizing resource usage, and employing efficient algorithms are key for good performance.
  • Usability: User experience is a top priority. A well-designed UI, intuitive navigation, and user-friendly interactions enhance usability.
  • Security: Protecting user data and the app from security threats is vital. Secure coding practices, data encryption, and authentication mechanisms are essential.
  • Availability: Ensuring that the app is available when users need it is crucial. This includes robust server infrastructure and handling network interruptions gracefully.
  • Modifiability: Mobile apps need to be adaptable to changing requirements. Well-structured code and modular architecture make it easier to modify and extend the app.

Monday, 9 October 2023

Mobile Application Development Notes

 Fillups:

1. APK stands for Android Application Package

2. Android is an Linux-based mobile operating system

3. Android is mainly developed for touchscreen devices, cell phones, and tablets.

4. Android is based on Java, with some C and C++ libraries.

5. API stands for Application programming interface.


Questions and Answers :

Q1.  Feautres of android operating system are as follow :-

Near Field Communication : NFC is a wireless technology by which you can quickly send your data to different devices with just one click.

Multiple Language Support : Android's Multilingual capability enables users to switch between different languages. 

Multi-tasking : Multitasking by Android Operating System can make phone users use various applications simultaneously.

Connectivity : Android devices provide a wide range of connectivity possibilities. WiFi, Bluetooth, Hotspots, CDMA, and GSM are some examples.

Customizability : It enables the user to personalize your device completely. Users can use Widgets that help display necessary elements on their home screen.

Storage and battery optimization : Customers can choose the amount of memory they need and expand.

Security : Special functions like camera and microphone require the user's permission. Built-in data encryption features provide additional security protection for user data


Q2. Discuss about fragments and intents.

Fragments: As there are a lot of android devices with different resolutions, its a bit tough to handle all of those, that’s where fragments come handy. We can combine 2 or more fragments and show them in an activity. A Fragment is a component that is used by an activity.

Even though it is used by an activity, it has its own lifecycle.



There are also some different fragments which you can extend: DialogFragment, ListFragment, PreferenceFragment.

Intents :

Intent is one of the most important and most used app component of an android application.

Using Intents, you call to other app components or to other activity or also call other applications on your phone.

Intents are two types:

Explicit Intents where you call another activity or something with a class name. For instance, you can call another activity when some action happened in one activity. So you here explicitly specifies which activity to call.

Implicit Intents where we do not specify a class name but specify some sort of action, which can be handled by some other inbuilt apps or some other apps. For instance, you may want to open a camera, showing a map, sending emails etc. Here you don’t directly call camera app or map app, you will just specify the action.


Q3. Difference between Table Layout and Frame Layout.

Table Layout : It is a ViewGroup subclass that is used to display the child View elements in rows and columns. Following is the pictorial representation of table layout in android applications.


In android, TableLayout will position its children elements into rows and columns and it won’t display any border lines for rows, columns or cells.

The TableLayout in android will work same as the HTML table and the table will have as many columns as the row with the most cells. The TableLayout can be explained as <table> and TableRow is like <tr> element.

Frame Layout : In android, Framelayout is a ViewGroup subclass that is used to specify the position of View instances it contains on the top of each other to display only single View inside the FrameLayout.

In simple manner, we can say FrameLayout is designed to block out an area on the screen to display a single item. Following is the pictorial representation of frame layout in android applications.

In android, FrameLayout will act as a placeholder on the screen and it is used to hold a single child view.

In FrameLayout, the child views are added in a stack and the most recently added child will show on the top. We can add multiple children views to FrameLayout and control their position by using gravity attributes in FrameLayout.



Q4. Difference between basic and picker view.

Basic view : Commonly used views such as the TextView, EditText, and Button views.

Picker view : It displays one or more wheels that the user manipulates to select items. Each wheel — known as a component — has a series of indexed rows representing the selectable items. Each row displays a string or view so that the user can identify the item on that row. Ex- Selecting date from a month of calender.


Q5. Short note on Android Stack.

The Android software stack generally consists of a Linux kernel and a collection of C/C++ libraries that are exposed through an application framework that provides services, and management of the applications and run time.

Android Architecture: Layers in the Android Stack
Linux Kernel Layer.
Native Layer.
Application Framework Layer.
Applications layer.


Q6. Database cursor and its types are as follow :

A database cursor is used to referred to a program to fetch and process the rows returned by the SQL statement, one at a time. It is to point to a single row of the result fetched by the query. We load the row pointed by the cursor object. By using cursor we can save lot of ram and memory.

Types of database cursor :

1. Implicit Cursor :  The implicit cursors are automatically generated by Oracle while an SQL statement is executed, if you don't use an explicit cursor for the statement.gram to fetch and process the rows returned by the SQL statement, one at a time.

2. Explicit Cursor : The Explicit cursors are defined by the programmers to gain more control over the context area. These cursors should be defined in the declaration section of the PL/SQL block. It is created on a SELECT statement which returns more than one row.


Q7. Role of GPS in Android devices.

GPS is used in a variety of applications, including navigation, tracking, and location-based services. Some common uses of GPS on a mobile phone include: Navigation: GPS can be used to provide turn-by-turn directions to a destination, helping you find your way to a new location or back home.
 
Q8. What is persisting data in SQLite.

Persistent data is data which you want to be available even after you fully close and restart your app. The three most common ways to safe this data localy is by using SharedPreferences, a local database or the file system (store data as a file)