Mad Final Report
Mad Final Report
Mad Final Report
Nagaraj S Lohit K
USN: 1VK19CS026 USN: 1VK19CS021
Submitted in the partial fulfillment of the requirements for the sixth Semester Mobile
Application Development Lab (18CSMP68)
BACHELOR OF ENGINEERING IN
Mr. Dinesh S D
2021-2022
Janatha Education Society®
VIVEKANANDA INSTITUTE OF TECHNOLOGY
Gudimavu, Kumbalagodu Post, Kengeri Hobli, Bengaluru – 560 074
External Viva-Voce
Name of the Examiners Signature with date
1.
2.
ABSTRACT
Mobile application has become a part of day to day life. Many applications are available in
the market to edit images, but not many applications are reliable, secure and are able fulfil the
user requirements. In this project we have designed a mobile application which corrupts
images byte array so that they appear "glitched". The byte array can be obtained from Bitmap
of an image. And can save the glitched image in the internal storage. We have also included
share feature in our app. Quality of the image can also be improved.
ACKNOWLEDGEMENT
We are very thankful to our Principal, Dr. Padmanabha S, VKIT, Bengaluru, for
being kind enough to provide us an opportunity to work on a project in this
institution.
We would like to convey our heartfelt thanks to our beloved HOD, Dr. Vidya A,
Department of Computer Science and Engineering, VKIT, Bengaluru for giving us
the opportunity to embark up to this topic.
We would like to sincerely thank our project guide Mr. Dinesh S D, Asst. Professor,
Dept. of Computer Science and Engineering for their valuable guidance, constant
assistance, support and constructive suggestions for the betterment of the project,
without which this project would have not been possible.
Finally, it is a pleasure and happiness to the friendly co-operation showed by all the
staffs of Computer Science and Engineering Department, VKIT.
Nagaraj S (1VK19CS026)
Lohit K (1VK19CS021)
ii
i
TABLE OF CONTENTS
ABSTRACT i
ACKNOWLEDGEMT ii
TABLE OF CONTENTS iii
LIST OF FIGURES v
LIST OF TABLES v
Chapter Name Pg No.
1. INTRODUCTION 1-13
1.1 Introduction to Mobile Application Developments 1
1.1.1 What is Mobile App? 1
1.1.2 What is Mobile OS? 2
1.1.3 Types of Mobile Apps 2
1.1.4 Different Categories of Mobile Apps 2
1.1.5 What is Mobile Application Development? 3
1.1.6 Mobile Application Development Challenges 4
1.17 How to develop Mobile Apps 4
1.2 Introduction to Android Studio 6
1.2.1 What is Android? 6
1.2.2 Different Versions of Android OS 6
1.2.3 Android Development Architecture 7
1.2.4 Installing Android Studio 8
1.2.5 Android Studio window panes 10
1.2.6 Viewing the Android Manifest 11
1.2.7 Viewing and editing Java code 11
1.2.8 Viewing and editing layouts 12
1.3 Introduction to Project 13
1.3.1 Problem Statement 13
1.3.2 Project Applications 13
2. SYSTEM REQUIREMENTS 14-15
2.1 Hardware Requirements 14
2.2 Software Requirements 14
iii
2.3 Functional Requirements 15
2.4 Non-Functional Requirements 15
3. SYSTEM DESIGN 16-17
3.1 User Interface Design 16
3.2 Data Flow Diagram 17
4. IMPLEMENTATION 18-21
4.1 Source Code 18
4.1.1 Activity_Main.xml 18
4.1.2 Activity_Splash.xml 21
5. RESULTS 22-26
5.1 Splash Page 22
5.2 Image Capture Page 23
5.3 Image Approval Page 24
5.4 Parameters Page 25
5.5 About Page 26
6. CONCLUSION 27
BIBLIOGRAPHY 28
v
LIST OF FIGURES
Fig 1.1: Android development architecture. 7
Fig 1.2: Android studio window panes. 10
Fig 1.3: Android manifest file. 11
Fig 1.4: MainActivity.java file. 12
Fig 1.5: Design view of layout. 12
Fig 3.1: User Interface. 16
Fig 3.2: Data Flow Diagram 17
Fig 5.1: Splash Page 22
Fig 5.2:Image Capture Page 23
Fig 5.3:Image Approval Page 24
Fig 5.4:Parameters Page 25
Fig 5.5:About Page 26
LIST OF TABLES
Table 1.1 Different versions of Android OS 6
v
SLIDE TO GLITCH APPLICATION
CHAPTER 1
INTRODUCTION
1.1Introduction to Mobile Application Development
Mobile application development is the process to making software for smartphones
and digital assistants, most commonly for Android and iOS. The software can be preinstalled
on the device, downloaded from a mobile app store or accessed through a mobile web
browser. The programming and markup languages used for this kind of software
development include Java, Swift, C# and HTML5.
Today, mobile devices—and the mobile applications that unlock their value—are the most
popular way for people and businesses to connect to the internet. To stay relevant, responsive
and successful, organizations need to develop the mobile applications that their customers,
partners and employee’s demand.
Apps are generally downloaded from application distribution platforms which are operated
by the owner of the mobile operating system, such as the App Store (iOS) or Google Play
Store. Some apps are free, and others have a price, with the profit being split between the
application's creator and the distribution platform. Mobile applications often stand in contrast
to desktop applications which are designed to run on desktop computers, and web
applications which run in mobile web browsers rather than directly on the mobile device.
A mobile operating system (OS) is software that allows smartphones, tablet PCs
(personal computers) and other devices to run applications and programs. A mobile OS
typically starts up when a device powers on, presenting a screen with icons or tiles that
present information and provide application access. Mobile operating systems also manage
cellular and wireless network connectivity, as well as phone access.
Native Apps: Such apps are developed for a single mobile operating system exclusively,
therefore they are “native” for a particular platform or device. App built for systems like iOS,
Android, Windows phone, Symbian, Blackberry can’t be used on a platform other than their
own.
Hybrid Apps: They are built using multi-platform web technologies (for example HTML5,
CSS and JavaScript). So-called hybrid apps are mainly website applications disguised in a
native wrapper. Apps possess usual pros and cons of both native and web mobile
applications.
Web Apps: These are software applications that behave in a fashion similar to native
applications. Web apps use a browser to run and are usually written in HTML5, JavaScript or
CSS. These apps redirect a user to URL and offer “install” option by simply creating a
bookmark to their page.
Educational Apps: Educational and informative apps do just that–educate and inform. While
the purpose of this type of app is fairly straightforward, there is a lot of diversity when it
comes to educational apps, like news and language apps. If you’re looking to break into this
crowded space, you’ll need to serve up news or other information in a fun and unique format
for learners of all ages, interests, and levels.
Lifestyle Apps: This app category covers a lot of ground, literally. Where you’re going, how
you’re getting there, what you’re going to order off the menu–it all falls under lifestyle apps.
Think of apps you use for convenience, like fitness, dating, food, and travel. Lifestyle and
leisure apps are increasingly popular, especially for tasks that require an extra step aside from
the search itself (e.g., the scary action of actually picking up the phone to make a call).
Social Media Apps: Social media apps give users the opportunity to connect with people
inside or outside their social circles. For the most part, social media apps are universal and
have a very diverse user base. These apps are used to share live video, post images, facilitate
conversations, and more. Social media apps have quickly become part of our everyday lives.
Productivity Apps: Also known as business apps, productivity apps typically organize and
complete complex tasks for you, anything from sending an email to figuring out the tip on
your dinner bill. Most productivity apps serve a single purpose and are built with a very
intuitive interface and design to increase efficiency and improve user experience.
Entertainment Apps: This category of apps has one sole focus–keeping you busy.
Entertainment apps are often used to fill your time, whether you are jet-setting across the
country, lounging at home, or really anywhere in-between. Along with their websites, a lot of
popular streaming services have mobile applications so users can access their library
wherever they are. Entertainment apps can include video, text, or audio content.
Game Apps: This app category is pretty self-explanatory and represents the biggest portion
of app downloads by far. With such a crowded category, it makes sense that there are so
many types of game apps for different target audiences, such as arcade games, brain training
puzzles, or just plain silly games, like launching tiny birds at pigs. Some mobile app games
are played solo, others online, and occasionally in-person with a group of friends.
Mobile app development is the act or process by which a mobile app is developed for
mobile devices, such as personal digital assistants, enterprise digital assistants or mobile
phones. These applications can be pre-installed on phones during manufacturing platforms, or
delivered as web applications using server-side or client-side processing (e.g., JavaScript) to
provide an "application-like" experience within a Web browser.
To develop apps using the SDK, use the Java programming language for developing the app
and Extensible Markup Language (XML) files for describing data resources. By writing the
code in Java and creating a single app binary, you will have an app that can run on both
phone and tablet.To help you develop your apps efficiently, Google offers a full Java
Integrated Development Environment (IDE) called Android Studio, with advanced features
for developing, debugging, and packaging Android apps. Using Android Studio, you can
develop apps on any available Android device, or create virtual devices that emulate any
hardware configuration.
While the Android platform provide rich functionality for app development, there are
still a number of challenges you need to address, such as:
Step away from any form of technology and get out a pen and paper and define what it is you
want to accomplish. The starting line in the app development word is a pen and paper, not
complex coding and designing.
You need to use the pen and paper that has the answers to the questions about your apps
purpose to develop a sketch of what it will look like. Here you move your clearly worded
ideas into visual representations of your thoughts. Decide if you are going to give your app
away and offer ads to generate money, or are you going to offer it as a paid download. You
can also choose the option to offer in app purchases.
Step 3: Research
You have to dig deep and research the competition of your app idea. I know you think you
have one of a kind idea, but the numbers are not in your favor—odds are someone has
already tried it. You can look at this in two different ways. One you can become deflated
and give up, or two, you can examine the competition and make your app better.
Step 4: Wireframe
In the technology world, a wireframe is a glorified story board. Here is where you take your
sketch and your design idea, and you give your idea a little more clarity and functionality.
This will become the foundation for your app’s development, so it really is a crucial step.
We left off with your wireframe, so at this point in your app development, you have a
storyboard of how you want your app to function. Now it’s time to use that storyboard to
start examine functionality.
Here’s where you need to call in the troops. Show your demo to friends, family, and anyone
else who is willing to give you constructive criticism. Don’t waste your time with people
who will tell you, “Wow, that’s neat.” Seek out those cynics and critics. Brutal honesty is
crucial at this phase.
With the foundation in place, you can start to put the puzzle together to building your app.
First, your developer will set up your servers, databases, and APIs.
Now it’s time to employ the designers to create your UI, user interface. The user interface is a
very important part of your app because people are attracted to how things look and how easy
they are to navigate.
A second round of testing is imperative. In this round, you will have both a functioning app
as well as a user interface to test. All the screens of your app should properly work at this
point, and your app should be visually appealing as well.
You’ve taken your prototype for a spin, and you’ve learned that there are still a few tweaks
you need to make. Now that you’ve seen your app in it’s fully functioning form, you need to
call the troops back and ask they to do the same.
You’ve looked at your app through several different lenses, and you think you’ve managed to
develop a smoothly functioning, aesthetically pleasing, problem solving app. Now, you need
to examine how your app is going to function in a live environment.
You’ve made it to the finish line. You’ve brought your idea to fruition, and the last step is to
share it with the world. Hopefully, you’ve gone on to solve a major problem. If not, with
any luck your app has some features that can simplify or bring enjoyment to someone’s life.
Regardless, you’ve accomplished something big. Now it’s time to distribute it.
Android is one of the most popular mobile device platforms. The Android platform allows
developers to write managed code using Java to manage and control the Android device.
Android Studio is a popular IDE developed by Google for developing applications that are
targeted at the Android platform. Android Studio has replaced Eclipse as the IDE of choice
for developing Android applications.
Android is a software package and Linux based operating system for mobile devices such as
tablet computers and smartphones. It is developed by Google and later the OHA (Open
Handset Alliance). Java language is mainly used to write the android code even though other
languages can be used.
The above table 1.1 contains the list of all different versions of Android OS.
Apps: In the above figure 1.1 apps live at this level, along with core system apps for email,
SMS messaging, calendars, Internet browsing, or contacts.
Java API Framework: All features of Android are available to developers through
application programming interfaces (APIs) written in the Java language. You don't need to
know the details of all of the APIs to learn how to develop Android apps, but you can learn
more about the following APIs, which are useful for creating apps:
View System used to build an app's UI, including lists, buttons, and menus.
Content Providers that enable apps to access data from other apps.
Libraries and Android Runtime: Each app runs in its own process and with its own
instance of the Android Runtime, which enables multiple virtual machines on low-memory
devices. Android also includes a set of core runtime libraries that provide most of the
functionality of the Java programming language, including some Java 8 language features
that the Java API framework uses. Many core Android system components and services are
built from native code that require native libraries written in C and C++. These native
libraries are available to apps through the Java API framework.
Hardware Abstraction Layer (HAL): This layer provides standard interfaces that expose
device hardware capabilities to the higher-level Java API framework.
Linux Kernel: The foundation of the Android platform is the Linux kernel. The above layers
rely on the Linux kernel for underlying functionalities such as threading and low-level
memory management.
System Requirements:
Windows
Follow the setup wizard in Android Studio and install any SDK packages that it
recommends.
Mac
Drag and drop Android Studio into the Applications folder, then launch Android
Studio.
Select whether you want to import previous Android Studio settings, then click OK.
The Android Studio Setup Wizard guides you through the rest of the setup, which
includes downloading Android SDK components that are required for development.
Linux
Unpack the .zip file you downloaded to an appropriate location for your applications,
such as within /usr/local/ for your user profile, or /opt/ for shared users.
If you're using a 64-bit version of Linux, make sure you first install the required
libraries for 64-bit machines.
Select whether you want to import previous Android Studio settings or not, then click
OK.
The Android Studio Setup Wizard guides you through the rest of the setup, which
includes downloading Android SDK components that are required for development.
The Toolbar. In the above figure 1.2 the toolbar carries out a wide range of actions,
including running the Android app and launching Android tools.
The Navigation Bar. The navigation bar allows navigation through the project and
open files for editing. It provides a more compact view of the project structure.
The Editor Pane. This pane shows the contents of a selected file in the project. For
example, after selecting a layout (as shown in the figure), this pane shows the layout
editor with tools to edit the layout. After selecting a Java code file, this pane shows
the code with tools for editing the code.
The Status Bar. The status bar displays the status of the project and Android Studio
itself, as well as any warnings or messages. You can watch the build progress in the
status bar.
The Project Pane. The project pane shows the project files and project hierarchy.
The Monitor Pane. The monitor pane offers access to the TODO list for managing
tasks, the Android Monitor for monitoring app execution (shown in the figure), the
logcat for viewing log messages, and the Terminal application for performing
Terminal activities.
Before the Android system can start an app component, the system must know that the
component exists by reading the app's AndroidManifest.xml file. The app must declare all its
components in this file, which must be at the root of the app project directory. To view this
file, expand the manifests folder in the Project: Android view, and double-click the file
(AndroidManifest.xml). Its contents appear in the editing pane as shown in the below figure
1.3 .
Components are written in Java and listed within module folders in the java folder in the
Project: Android view. Each module name begins with the domain name (such as
com.example.android) and includes the app name.
Click the module folder to expand it and show the MainActivity file for the activity
written in Java (the MainActivity class).
Double-click MainActivity to see the source file in the editing pane, as shown in the
below figure 1.4.
Layout resources are written in XML and listed within the layout folder in the res folder in
the Project: Android view. Click res > layout and then double-click activity_main.xml to see
the layout file in the editing pane. Android Studio shows the Design view of the layout, as
shown in the figure 1.5 below. This view provides a Palette pane of user interface elements,
and a grid showing the screen layout.
Our software project is Slide-to-Glitch. It is an app where users can Glitch the real time
image or the image for the gallery by the parameters in the control panel.
This app corrupts some bytes in an image. Because of the way JPEG encoding works, the
corrupted file still shows a corrupted image..
Design Glitch app such that a user can change the byte array and Glitch the imported
image. Use the parameters like Seed and Amount of Glitch. And increase the Image
resolution.
CHAPTER 2
SYSTEM REQUIREMENTS
The android emulator has additional requirements beyond the basic requirements for Android
Studio, which are described below:
Functional requirements specify a function that system or a system component must be able
to perform. It can be documented in various ways.
CHAPTER 3
SYSTEM DESIGN
3.1 User Interface Design
The Fig 3.1 shows the user interface design of the Slide to Glitch. Here the user can Either
Capture image from the camera or can Select an Image from the Gallery. If User likes the
image he can approve.
CHAPTER 4
IMPLEMENTATION
4.1 Source Code
4.1.1 Activity_Main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
tools:context=".HomeActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" >
<ImageView
android:id="@+id/home_background"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_centerInParent="true"
android:contentDescription="aries_content_desc"
android:scaleType="centerCrop"
app:srcCompat="@drawable/aries_background"/>
<LinearLayout
android:id="@+id/title_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:gravity="center"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/home_logo"
android:layout_width="@dimen/logo_width"
android:layout_height="@dimen/logo_height"
android:contentDescription="@string/app_logo_content_desc"
app:srcCompat="@drawable/logo"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="@color/colorPrimaryWhite"
android:textSize="25sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="@id/title_home"
android:layout_centerHorizontal="true"
android:layout_marginBottom="25dp"
android:gravity="bottom">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="65dp">
<ImageView
android:id="@+id/camera_button_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:contentDescription="@string/camera_button_content_desc"
android:onClick="openCamera"
android:src="@drawable/ic_camera_alt_white"/>
<TextView
android:id="@+id/camera_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/camera_button_image"
android:layout_marginTop="7dp"
android:onClick="openCamera"
android:text="@string/camera_button_text"
android:textColor="@color/colorPrimaryWhite"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/gallery_button_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:contentDescription="@string/gallery_button_content_desc"
android:onClick="openGallery"
android:src="@drawable/ic_phone_android_white"/>
<TextView
android:id="@+id/gallery_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/gallery_button_image"
android:layout_marginTop="7dp"
android:onClick="openGallery"
android:text="@string/gallery_button_text"
android:textColor="@color/colorPrimaryWhite"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
4.1.2 Activity_Splash.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryWhite"
tools:context=".SplashActivity">
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_centerInParent="true"
android:contentDescription="@string/app_logo_content_desc"
app:srcCompat="@drawable/app_icon"/>
</RelativeLayout>
CHAPTER 5
RESULTS
5.1 Splash Page
The above Fig 5.1 shows the Splash page which is the first process to be done by the user.
The user has to Select the options of Camera or Gallery.
The above Fig 5.2 shows the Image Capture page where Users can capture the realtime
image.
The above Fig 5.3 shows the Image Approval page where Users can approve the captured
image or can retake. And also can go back to the home splash page.
The above Fig 5.4 shows the parameters page where the user can use the given controls in the
control panel to Glitch the selected image.
The above Fig 5.5 shows the about page which contains information about our app and also
the parameters used and its description.
CHAPTER 6
CONCLUSION
It's a Creative app where users can glitch the captured images or import an image. User can
use the sliders in the control panel to alter the glitched parameters. The image updates in real
time. This app corrupts some bytes in an image. Because of the way JPEG encoding works,
the corrupted file still shows a corrupted image. Glitch art is the practice of digitally altering
photos and videos to create waves, shifts, lines, jumpy movements, and other visual errors.
While many artists create video and photo glitch art by removing lines of code from the
media, you can easily achieve a similar effect using video or photo editing programs. Data
manipulation (aka Databending) changes the information inside the digital file to create
glitches. Databending involves editing and changing the file data. Datamoshing involves the
removal of an encoded video’s I-frames (intra-coded picture, also known as key frames—a
frame that does not require any information regarding another frame to be decoded), leaving
only the P- (predicted picture) or B- (bi-predictive picture) frames. P-frames contain
information predicting the changes in the image between the current frame and the previous
one, and B-frames contain information predicting the image differences between the
previous, current and subsequent frames. Because P- and B-frames use data from previous
and forward frames, they are more compressed than I-Frames. Since the user interface is
simple users creatively Glitch the image and use it .
BIBLIOGRAPHY
Book References
[1] Google Developer Training, "Android Developer Fundamentals Course – Concept
Reference”, Google Developer Training Team, 2017.
[2] Erik Hellman, “Android Programming – Pushing the Limits”, 1st Edition, Wiley India
Pvt Ltd, 2014. ISBN-13: 978-8126547197.
[3] Dawn Griffiths and David Griffiths, “Head First Android Development”, 1st Edition,
O’Reilly
[4] SPD Publishers, 2015. ISBN-13: 978-9352131341.
[5] Bill Phillips, Chris Stewart and Kristin Marsicano, “Android Programming: The Big Nerd
Ranch Guide”, 3rd Edition, Big Nerd Ranch Guides, 2017. ISBN-13: 978-0134706054.
Web References
[1] Android Developers https://developer.android.com/
[2] Android Tutorial https://www.tutorialspoint.com/android/index.htm
[3] Android Tutorial https://www.w3schools.in/category/android-tutorial/
[4] Java Tutorial https://www.javatpoint.com/java-tutorial
[5] Java Tutorial https://www.w3schools.com/java/