Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

MYGPT AI CHATTING APP

SYNOPSIS

The MyGPT AI Chatting App redefines the landscape of Android


applications by delivering a personalized and intelligent conversational
experience to users. This innovative app is crafted upon a solid foundation
comprising Jetpack Compose for crafting intuitive user interfaces, Python for
robust backend logic, and SQLite for efficient local data storage.

● At its core, the MyGPT AI Chatting App harnesses the formidable


capabilities of OpenAI's GPT-3.5 model, seamlessly integrating natural
language understanding and generation. This integration empowers users
with dynamic and contextually-aware conversations, setting a new
standard for interactive communication.
● Designed to cater to the needs of modern users seeking an intelligent and
adaptable personal assistant, the MyGPT AI Chatting App stands out by
enabling:
● Dynamic Conversations: Users engage in conversations that adapt to their
context and preferences, enhancing the overall conversational experience.
● Intuitive Interface: Jetpack Compose facilitates the creation of a visually
appealing and user-friendly interface, ensuring seamless navigation and
interaction.

In summary, the MyGPT AI Chatting App is a groundbreaking solution


that brings together cutting-edge technologies to deliver a transformative
conversational experience. With its intuitive interface, intelligent capabilities,
and robust architecture, the app redefines the boundaries of user interaction and
sets a new standard for personal assistant applications on the Android platform.
1. INTRODUCTION

MyGPT is an innovative Android chat application designed to offer users


a personalized and intelligent conversational experience.
Built on a robust tech stack that includes XML for frontend design with Kotlin,
a Python backend, and SQL for database management, the app seamlessly
integrates the power of OpenAI's GPT-3.5 for natural language understanding
and generation. Users can engage in dynamic and context-aware conversations,
receiving responses generated by the advanced language model. The frontend,
developed with a user-friendly interface using Android Studio, ensures an
intuitive chat experience, while the backend manages user preferences,
conversation histories, and facilitates secure communication with the GPT-3.5
API. The app not only serves as a powerful chatbot but also incorporates
features like task automation, real-time updates, and user authentication for a
comprehensive and personalized interaction.

MyGPT caters to users seeking an intelligent and adaptable personal


assistant, allowing for task automation, language translation, and integration
with external services. With a focus on privacy and security, the app provides
clear communication about data usage and implements best practices to protect
user information. The project's goal is to deliver a cutting-edge conversational
experience, combining the strengths of Android development, GPT-3.5
language capabilities, and a user-centric design to create a sophisticated yet
accessible personal assistant for Android users.

1
1.1 SYSTEM SPECIFICATION

1.1.1 HARDWARE CONFIGURATION

● Processor : i3
● Hard Disk : 20 GB
● Memory : 4GB RAM

1.1.2 SOFTWARE SPECIFICATION

● Frontend : xml with kotlin


● Backend : Kotlin
● Database : Sql
● Operating System : Windows or any OS
● Platform : Android
● Code Editor : Android studio

1.1.3 SOFTWARE DESCRIPTION

XML:

XML (eXtensible Markup Language) is a markup language that defines


a set of rules for encoding documents in a format that is both human-readable
and machine-readable. It is a widely used standard for storing and transporting
data, particularly in web development and data exchange between different
systems. Here are some key features of XML:

● Markup Language: XML uses tags to define the structure and meaning of
data within a document. Tags are enclosed in angle brackets (< >) and can
be nested to represent hierarchical relationships.

● Human-readable and Machine-readable: XML documents are designed to


be easily understandable by both humans and machines. The hierarchical
structure and use of tags make it intuitive for humans to read, while
parsers and software can easily interpret the structure for processing.

2
● Extensibility: The "eXtensible" in XML refers to its extensibility,
meaning that users can define their own customized tags and document
structures to suit specific needs or applications. This flexibility allows
XML to adapt to various data formats and requirements.

● Platform-independent: XML is platform-independent, meaning it can be


used on any operating system and with any programming language. This
makes it a versatile choice for data exchange in heterogeneous
environments.

● Structured Data Representation: XML provides a structured way to


represent data, allowing complex relationships and metadata to be
encoded within documents. This makes it suitable for a wide range of
applications, including configuration files, data interchange, and
document storage.

● Interoperability: XML promotes interoperability between different


systems and technologies by providing a common format for data
exchange. It is widely supported by programming languages, databases,
and web technologies, enabling seamless integration between diverse
systems.

● Validation: XML documents can be validated against a schema or


Document Type Definition (DTD), which defines the rules and structure
that the document must adhere to. This helps ensure the integrity and
consistency of the data within XML documents.

● Transformation: XML documents can be transformed into other formats


using technologies like XSLT (eXtensible Stylesheet Language
Transformations). This allows for the conversion of XML data into
various presentation formats such as HTML, PDF, or plain text.
● Unicode Support: XML supports Unicode, allowing for the representation
of text in different languages and character sets. This ensures that XML
documents can handle multilingual content and diverse data
requirements.

3
KOTLIN :

Kotlin is a modern programming language that runs on the Java Virtual


Machine (JVM) and can also be compiled to JavaScript or native code. It was
developed by JetBrains and was first released in 2011. Kotlin has gained
significant popularity in recent years, particularly in the Android app
development community, as it offers a more concise, safe, and expressive
alternative to Java. Here are some key features of Kotlin:

● Conciseness: Kotlin is designed to be more concise than Java, allowing


developers to write the same functionality with less code. It achieves this
through features like type inference, default parameter values, and
concise syntax for common tasks.

● Null Safety: Kotlin addresses the infamous NullPointerException (NPE)


problem by making nullability a first-class citizen in its type system.
Nullable types are explicitly declared, and the compiler enforces null
safety, reducing the risk of NPEs at runtime.

● Interoperability: Kotlin is fully interoperable with Java, meaning that


Kotlin code can call Java code and vice versa without any friction. This
makes it easy for developers to gradually migrate existing Java codebases
to Kotlin or to use Kotlin alongside existing Java libraries and
frameworks.

● Extension Functions: Kotlin allows developers to add new functions to


existing classes without modifying their source code through extension
functions. This feature promotes code reusability and enhances the
readability of code by allowing developers to write more fluent APIs.

● Coroutines: Kotlin provides first-class support for coroutines, which are


lightweight concurrent programming constructs. Coroutines enable
asynchronous programming in a more efficient and readable manner
compared to traditional threading approaches. They simplify the handling
of asynchronous tasks such as network requests and background
processing.

4
● Functional Programming Support: Kotlin supports functional
programming paradigms, including higher-order functions, lambda
expressions, and immutable data structures. These features enable concise
and expressive code, promote code reuse, and facilitate writing code in a
more declarative style.

● Smart Casts and Type Inference: Kotlin's type system includes smart
casts, which automatically cast types within a certain scope when certain
conditions are met, reducing the need for explicit type checks and casts.
Additionally, Kotlin's type inference capabilities allow developers to omit
type declarations in many cases, resulting in cleaner and more readable
code.

● Data Classes: Kotlin provides a concise syntax for defining classes whose
primary purpose is to hold data. Data classes automatically generate
boilerplate code for equals(), hashCode(), toString(), and copy() methods,
making them ideal for modeling immutable data.

● Object-oriented and Procedural Programming: While Kotlin supports


functional programming paradigms, it also fully supports object-oriented
and procedural programming styles. This versatility allows developers to
choose the most appropriate programming paradigm for their specific use
case.

ANDROID:

Android is a mobile operating system developed by Google, based on the


Linux kernel and designed primarily for touchscreen mobile devices such as
smartphones and tablets. It has become one of the most popular operating
systems globally, powering millions of devices worldwide. Here are some key
aspects of Android:

● Open Source: Android is an open-source platform, meaning its source


code is freely available to developers and device manufacturers. This
openness fosters innovation and allows for customization and
modification of the operating system to suit different needs.

5
● Application Ecosystem: Android has a vast ecosystem of applications
available through the Google Play Store and other third-party app stores.
These applications cover a wide range of categories, including
productivity, entertainment, communication, gaming, and more, providing
users with a rich and diverse selection of software.

● User Interface: Android features a user-friendly and customizable


interface that allows users to personalize their devices with widgets,
wallpapers, themes, and custom launchers. The interface is designed to be
intuitive and responsive, providing a smooth user experience across
different devices.

● Security: Google continuously invests in enhancing the security of the


Android platform, implementing features such as app sandboxing,
permissions system, verified boot, and Google Play Protect to protect
users from malware and security threats.

● Hardware Compatibility: Android is designed to run on a wide range of


hardware configurations, from low-end budget devices to high-end
flagship smartphones and tablets. This flexibility allows manufacturers to
create devices tailored to different market segments and price points.

● Customization and Flexibility: Android offers extensive customization


options for both users and developers. Users can customize their devices
with third-party launchers, themes, and apps, while developers have
access to a wide range of APIs and tools to build innovative and
feature-rich applications.

● Integration with Google Services: Android integrates seamlessly with


Google's ecosystem of services, including Gmail, Google Maps, Google
Drive, Google Photos, and more. This integration provides users with
access to a comprehensive suite of productivity tools and cloud services.

6
API:

An API (Application Programming Interface) is a set of rules, protocols,


and tools that allows different software applications to communicate and
interact with each other. APIs define the methods and data formats that
developers can use to request and exchange information between systems,
enabling seamless integration and interoperability between disparate software
components. Here are some key aspects of APIs:

● Communication Protocol: APIs define the communication protocol used


for interaction between software components. This can include protocols
such as HTTP, REST (Representational State Transfer), SOAP (Simple
Object Access Protocol), GraphQL, and others.

● Request-Response Model: APIs typically follow a request-response


model, where one system (the client) sends a request to another system
(the server), and the server processes the request and returns a response.
Requests are typically made using HTTP methods such as GET, POST,
PUT, DELETE, etc.

● Data Formats: APIs define the data formats used for representing and
exchanging information between systems. Common data formats include
JSON (JavaScript Object Notation), XML (eXtensible Markup
Language), and Protocol Buffers, among others.

● Endpoints and Methods: APIs expose endpoints, which are URLs that
clients can send requests to, along with methods or operations that clients
can perform on those endpoints. Endpoints represent specific resources or
functionalities provided by the API.

● Authentication and Authorization: APIs often require authentication and


authorization mechanisms to control access to protected resources and
ensure the security of the system. This may involve using API keys,
OAuth tokens, JWT (JSON Web Tokens), or other authentication
schemes.

7
● Rate Limiting and Quotas: APIs may implement rate limiting and usage
quotas to prevent abuse and ensure fair usage of resources. Rate limiting
restricts the number of requests a client can make within a certain time
period, while quotas limit the total amount of usage allowed for a given
period.

● Documentation: Good API documentation is essential for developers to


understand how to use an API effectively. API documentation typically
includes information about endpoints, methods, request and response
formats, authentication requirements, error handling, and usage examples.

● Versioning: APIs may evolve over time, with new features being added or
existing features being modified or deprecated. Versioning allows
developers to specify which version of the API they are targeting and
ensures backward compatibility with existing client applications.

● Third-Party Integration: APIs enable third-party developers to build


applications that integrate with existing platforms and services, allowing
for the creation of rich ecosystems of interconnected software
applications.

ANDROID STUDIO:

Android Studio is the official Integrated Development Environment


(IDE) for Android app development, provided by Google. It is based on
IntelliJ IDEA and is tailored specifically for Android development. Android
Studio offers a comprehensive set of tools and features to streamline the app
development process. Here are some key aspects of Android Studio:

● User Interface: Android Studio provides a user-friendly interface with


customizable layouts and panels to suit individual preferences. It includes
various tools, such as project navigation, code editor, emulator, build
system, and debugging tools, all accessible from within the IDE.

8
● Code Editor: Android Studio features a powerful code editor with syntax
highlighting, code completion, code refactoring, and other
productivity-enhancing features. It supports multiple programming
languages, including Java, Kotlin, and XML (for layout files).

● Layout Editor: Android Studio includes a visual layout editor that allows
developers to design user interfaces (UIs) for their apps using a
drag-and-drop interface. Developers can preview the UI in real-time
across different device screen sizes and orientations.

● Gradle Build System: Android Studio uses the Gradle build system to
automate the build process for Android apps. Gradle allows developers to
define dependencies, configure build variants, and customize the build
process through build scripts written in Groovy or Kotlin.

● Android Emulator: Android Studio includes an emulator that allows


developers to test their apps on virtual Android devices running different
versions of the Android operating system. The emulator supports features
like hardware acceleration, camera emulation, and network simulation.

● Instant Run: Android Studio's Instant Run feature allows developers to


quickly deploy and test code changes on a connected device or emulator
without restarting the app. This accelerates the development cycle and
improves productivity.

● Version Control Integration: Android Studio seamlessly integrates with


version control systems like Git, allowing developers to manage source
code repositories directly from the IDE. It provides features such as
commit, push, pull, merge, and code review workflows.

● Android SDK Manager: Android Studio includes the Android SDK


Manager, which allows developers to download and manage Android
SDK components, platform tools, system images, and emulator images.
This ensures that developers have access to the latest APIs and
development tools.

9
● Extensibility: Android Studio is highly extensible, with support for
plugins and extensions that enhance its functionality. Developers can
install plugins for additional features, code generators, template libraries,
and integration with third-party services.

SQLite:

SQLite is a lightweight, embedded relational database management


system (RDBMS) that is widely used in mobile and desktop applications,
including Android apps. Here are some key aspects of SQLite:

● Self-contained: SQLite is self-contained, meaning it operates without


requiring a separate server process. It stores the entire database as a single
file on the disk, making it easy to distribute and deploy with applications.

● Serverless: Unlike traditional client-server databases, SQLite is


serverless, meaning there is no separate server process that needs to be
installed and configured. Applications interact directly with the SQLite
database file on the local disk.

● Zero Configuration: SQLite requires minimal configuration and setup.


Developers can simply include the SQLite library in their application and
start using it immediately without any additional configuration steps.

● Relational Database: Despite its lightweight nature, SQLite is a fully


featured relational database that supports SQL (Structured Query
Language) for defining, manipulating, and querying data. It provides
support for tables, indexes, views, triggers, and transactions.

● Cross-Platform: SQLite is cross-platform and runs on various operating


systems, including Android, iOS, Windows, macOS, and Linux. This
makes it a popular choice for building applications that need to run on
multiple platforms.

10
● ACID Compliance: SQLite is ACID (Atomicity, Consistency, Isolation,
Durability) compliant, ensuring that database transactions are reliable,
consistent, and durable. It supports transactions, which allow multiple
database operations to be grouped together and treated as a single unit of
work.

● Small Footprint: SQLite has a small memory and disk footprint, making it
well-suited for embedded and mobile environments with limited
resources. The SQLite library is typically only a few hundred kilobytes in
size, making it ideal for use in mobile apps.

● High Performance: Despite its lightweight design, SQLite offers high


performance for most common database operations. It is optimized for
read-heavy workloads and can efficiently handle thousands of
transactions per second on modern hardware.

● Open Source: SQLite is open source and released into the public domain,
allowing developers to use, modify, and distribute it freely without any
licensing restrictions.

JETPACK COMPOSE:

Jetpack Compose," which is a modern toolkit for building native Android


user interfaces (UIs) using declarative Kotlin syntax. Jetpack Compose is part of
the larger Android Jetpack library, which provides a set of components, tools,
and architectural guidance to help developers build high-quality Android apps
more easily and efficiently. Here's an overview of Jetpack Compose:

● Declarative UI: Jetpack Compose uses a declarative approach to UI


development, allowing developers to describe the desired UI hierarchy
and behavior using Kotlin code. This contrasts with the traditional
imperative approach used with XML layouts and imperative UI
frameworks like View-based UI in Android.

● Kotlin-first: Jetpack Compose is designed to be Kotlin-first, meaning it


leverages the features and capabilities of the Kotlin programming
language to provide a more concise, readable, and type-safe UI

11
development experience. Developers can take advantage of Kotlin
language features such as extension functions, lambdas, and DSLs
(domain-specific languages) to define UI components and layouts.

● Composable Functions: In Jetpack Compose, UI components are defined


as composable functions, which are regular Kotlin functions annotated
with @Composable. These functions describe the UI elements and their
properties, and they can be composed together to build complex UIs from
simple building blocks.

● Reactive UI: Jetpack Compose embraces a reactive programming model,


where UI components automatically update in response to changes in
their underlying state. This simplifies UI development by eliminating the
need for manual view updates and event handling, resulting in a more
predictable and efficient UI programming model.

● Material Design Integration: Jetpack Compose provides built-in support


for Material Design, Google's design language for creating intuitive and
visually appealing user interfaces. It includes a rich set of Material
Design components and styles that developers can use to quickly build
modern and consistent UIs.

● Preview and Testing: Jetpack Compose includes tools for previewing UI


components directly within Android Studio, allowing developers to see
how their UIs will look and behave without needing to run the app on a
device or emulator. Additionally, Jetpack Compose supports unit testing
and UI testing, enabling developers to verify the correctness of their UI
logic and behavior.

● Early Adopter Program: As of my last update, Jetpack Compose was still


in an early adopter phase, with ongoing development and improvements.
While it was not yet considered stable for production use, developers
could experiment with it and provide feedback to help shape its future
direction.

12
2. SYSTEM STUDY

2.1 EXISTING SYSTEM

In the existing system, traditional chat applications lack advanced


features such as natural language understanding, task automation, and
integration with external services. Users often face limitations in the
conversational experience and may encounter challenges in managing tasks
efficiently. The drawbacks of the existing system include:

2.1.1 DRAWBACKS:

● Limited Conversational Intelligence: Existing chat applications lack


advanced AI capabilities for natural language understanding and
generation, leading to less interactive and context-aware conversations.

● Manual Task Management: Users are required to manually perform tasks


without automation, leading to inefficiencies and potential delays in task
completion.

● Lack of Integration: Traditional chat applications often lack integration


with external services, limiting their functionality and usefulness in
diverse scenarios.

2.2 PROPOSED SYSTEM

The proposed system, the MyGPT AI Chatting App, addresses the


limitations of the existing system by introducing advanced features and
capabilities powered by OpenAI's GPT-3.5 model. The proposed system offers a
comprehensive and intelligent conversational experience while providing
seamless task management and integration with external services.

13
2.2.1 FEATURES:

● Advanced Conversational Intelligence: The app leverages OpenAI's


GPT-3.5 model for natural language understanding and generation,
enabling dynamic and context-aware conversations that closely mimic
human interactions.

● Task Automation: Users can automate tasks through conversational


commands, streamlining processes and enhancing productivity.

● Integration with External Services: The app seamlessly integrates with


external services, allowing users to perform a wide range of tasks directly
within the chat interface, such as scheduling appointments, ordering food,
or making reservations.

● Personalized User Experience: The app offers personalized


recommendations and responses based on user preferences and previous
interactions, enhancing the overall user experience.

● Data Security: Robust security measures are implemented to protect user


data and ensure privacy, including encryption of sensitive information
and adherence to data protection regulations.

14
3. SYSTEM DESIGN AND DEVELOPMENT

3.1 FILE DESIGN

The file design of the MyGPT AI Chatting App includes organizing the
project files and resources efficiently to ensure a structured and maintainable
codebase. The project files are categorized based on their functionality and
purpose, such as UI components, backend logic, data models, and resource files.
Additionally, proper naming conventions and directory structures are followed
to enhance readability and ease of navigation for developers.

3.2 INPUT DESIGN

Input design focuses on creating intuitive and user-friendly interfaces for


user interactions within the app. This includes designing input fields, buttons,
and other interactive elements to ensure ease of use and accessibility. In the
MyGPT AI Chatting App, input design encompasses various components such
as text fields for entering messages, buttons for sending messages or performing
actions, and gesture-based inputs for navigating between screens.

3.3 OUTPUT DESIGN

Output design involves defining the presentation of information and


feedback to users in the app. This includes designing the layout, formatting, and
visual elements to effectively communicate information and provide feedback to
users. In the MyGPT AI Chatting App, output design includes displaying chat
messages, notifications, error messages, and other relevant information in a
visually appealing and informative manner.

3.4 DATABASE DESIGN

The database design of the MyGPT AI Chatting App involves defining


the structure and relationships of the database tables used for storing user
information and chat history. This includes creating tables for user accounts,
chat messages, and any other relevant data entities. The database design ensures
efficient storage, retrieval, and management of data, while also considering
factors such as data integrity, normalization, and scalability.

15
3.5 SYSTEM DEVELOPMENT

System development encompasses the implementation of the MyGPT AI


Chatting App using the chosen technologies and development tools. This
includes writing code for frontend UI components, backend logic, database
interactions, and integration with external APIs. System development follows
best practices and coding standards to ensure reliability, maintainability, and
scalability of the app. Additionally, thorough testing and debugging are
performed throughout the development process to identify and resolve any
issues or bugs.

3.5.1 DESCRIPTION OF MODULES

1. USER INTERFACE (UI) MODULE


Description: Implements the visual elements of the application.
Features:
● Intuitive chat interface.
● Responsive design for various screen sizes.

2. BACKEND MODULE
Description: Manages server-side functionalities and communication.
Features:
● Communication with OpenAI’s GPT-3.5 API.
● User preferences and conversation history storage.

3. DATABASE MODULE
Description: Responsible for data storage and retrieval.
Features:
● Secure management of user data.
● Integration with backend for seamless information flow.

4. INTEGRATION WITH GPT-3.5 MODULE


Description:
Incorporates the natural language understanding and generation capabilities
of GPT-3.5. OpenAI GPT-3.5 API.

16
5. TASK AUTOMATION MODULE
Description:
Enables automation of tasks based on user commands.
Integrated within the backend.

6. SECURITY MODULE
Description: Ensures user data privacy and secure communication.
Features:
● User authentication.
● Clear communication about data usage practices.

17
4. TESTING AND IMPLEMENTATION

4.1 TESTING:

Testing is a crucial phase in the development process to ensure that the


MyGPT AI Chatting App meets quality standards and performs as expected.
The testing process involves various types of testing, including unit testing,
integration testing, and user acceptance testing.

4.1.1 UNIT TESTING:

● Unit testing is performed to validate the individual components or units


of the application, such as functions, classes, or modules.
● Test cases are written to verify the functionality of each unit and ensure
that it behaves as intended.
● Mock objects or test doubles may be used to isolate units and simulate
interactions with external dependencies.

4.1.2 INTEGRATION TESTING:

● Integration testing is conducted to verify the interactions and


communication between different components or modules of the
application.
● Test cases are designed to validate the integration points and ensure
seamless interoperability between components.
● Various scenarios are tested to identify any issues related to data flow,
communication protocols, or interface compatibility.

18
4.1.3 USER ACCEPTANCE TESTING (UAT):

● User acceptance testing is performed to evaluate the app's functionality


and usability from the end user's perspective.
● Test cases are based on real-world usage scenarios, and actual users or
stakeholders may participate in the testing process.
● Feedback and observations from users are collected to identify areas for
improvement and ensure that the app meets user requirements and
expectations.

4.2 IMPLEMENTATION:

Implementation involves deploying the MyGPT AI Chatting App and


making it available to users. This phase includes preparing the app for release,
deploying it to the target platform, and monitoring its performance post-release.

19
5. CONCLUSION

The MyGPT AI Chatting App represents a significant advancement in the


realm of mobile chat applications, offering users a personalized and intelligent
conversational experience. Through the integration of advanced technologies
such as Jetpack Compose, Python, SQLite, and OpenAI's GPT-3.5 model, the
app provides users with dynamic and context-aware conversations, task
automation capabilities, and seamless integration with external services.
Throughout the development process, careful attention was paid to the design,
implementation, and testing of the app to ensure a robust and user-friendly
experience. The app's architecture was designed to be scalable and
maintainable, allowing for future enhancements and updates.
Key features of the MyGPT AI Chatting App include:

● Advanced Conversational Intelligence: Leveraging OpenAI's GPT-3.5


model for natural language understanding and generation, enabling
interactive and contextually relevant conversations.
● Task Automation: Allowing users to automate tasks through
conversational commands, improving productivity and efficiency.
● Integration with External Services: Seamlessly integrating with external
services to perform a wide range of tasks directly within the chat
interface.
● Data Security: Implementing robust security measures to protect user data
and ensure privacy, including encryption and adherence to data protection
regulations.

In conclusion, the MyGPT AI Chatting App aims to revolutionize the way users
interact with chat applications, providing them with an intelligent and adaptable
platform for communication, task management, and information retrieval. With
its advanced AI capabilities and user-centric design, the app offers a
sophisticated yet accessible personal assistant for Android users, enhancing
their productivity and overall user experience.

20
BIBLIOGRAPHY

● Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P.,
... & Amodei, D. (2020). Language models are few-shot learners. arXiv
preprint arXiv:2005.14165.
● Google. (2022). Android Developers. Retrieved from
https://developer.android.com/
● OpenAI. (2022). OpenAI GPT. Retrieved from https://openai.com/gpt
● SQLite. (2022). SQLite. Retrieved from
https://www.sqlite.org/index.html
● Jetpack Compose. (2022). Jetpack Compose. Retrieved from
https://developer.android.com/jetpack/compose
● Python Software Foundation. (2022). Python. Retrieved from
https://www.python.org/
● Android Studio. (2022). Android Studio. Retrieved from
https://developer.android.com/studio
● The Apache Software Foundation. (2022). Apache License, Version 2.0.
Retrieved from https://www.apache.org/licenses/LICENSE-2.0
● Kotlin. (2022). Kotlin. Retrieved from https://kotlinlang.org/
● Material Design. (2022). Material Design. Retrieved from
https://material.io/design
● GitHub. (2022). GitHub. Retrieved from https://github.com/

21
APPENDICES

A. DATA FLOW DIAGRAM

Level 0

22
Level 1

23
C. SAMPLE CODING

<?xml version="1.0" encoding="utf-8"?>


<!--
Designed and developed by 2022 skydoves (Jaewoong Eum)

Licensed under the Apache License, Version 2.0 (the "License");


you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software


distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".ChatGPTApp"
android:allowBackup="true"
android:allowClearUserData="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@drawable/openai"
android:label="@string/app_name"
android:roundIcon="@drawable/openai"
android:supportsRtl="true"
android:theme="@style/Theme.ChatGPTAndroid"
tools:targetApi="31">
<profileable
android:shell="true"
tools:targetApi="29" />

<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>

24
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>

<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.skydoves.chatgpt.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="com.skydoves.chatgpt.initializer.AppInitializer"
android:value="androidx.startup" />
</provider>
</application>

</manifest>
package com.skydoves.chatgpt

import android.app.Application
import com.skydoves.snitcher.Snitcher
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class ChatGPTApp : Application() {

override fun onCreate() {


super.onCreate()

// install Snitcher to trace global exceptions and restore the app.


// https://github.com/skydoves/snitcher
Snitcher.install(this)
}
}

package com.skydoves.chatgpt

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.CompositionLocalProvider
import com.skydoves.chatgpt.core.designsystem.composition.LocalOnFinishDispatcher
import com.skydoves.chatgpt.core.designsystem.theme.ChatGPTComposeTheme
import com.skydoves.chatgpt.core.navigation.AppComposeNavigator
import com.skydoves.chatgpt.ui.ChatGPTMain
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

25
D. SAMPLE SCREEN

My Gpt app Ai chatting screen

26

You might also like