You are on page 1of 21

CLIP’S HOLDER MOBILE 1

APPLICATION

CONTENTS
SL.NO PARTICULARS PAGE.NO
1 Abstract 2
2 Introduction 3
3 Types of Mobile Apps 4
4 The Development Process 5
5 Requirement Specifications 6
6 Technology used 7
7 The App – Clips Holder 9
8 Source Code 11
9 Project Screenshot 15
10 Conclusion 18
11 References 19

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 2
APPLICATION

1. ABSTRACT

The given mini project explores about the core basics of mobile application development
with a successful demonstration of clipboard activity application incorporating copy text and
paste text functionalities.Every day the new devices are incoming to the market with
innovative options because of the growing technology. The evolution of mobile application
development technology with new devices made our lives much easier. In the smartphone
world, simply having a running web site is not enough. Regarding a recent study, it has
shown that about 45% and more of Google search happens using smartphones. The
smartphone is set to become ever more central in the everyday life of the consumer. Mobile
commerce is growing quickly, taking a significant share of overall retail sales and we will
soon see mobile overtake the laptop as the preferred device for browsing and shopping
online. The smartphone is set to become ever more central in the everyday life of the
consumer. Thus, there is the huge demand of mobile programmers and professional in future.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 3
APPLICATION

2. INTRODUCTION

Mobile app development is rapidly growing. From retail, telecommunications and e-


commerce to insurance, healthcare and government, organizations across industries must
meet user expectations for real-time, convenient ways to conduct transactions and access
information. Today, mobile devices are the most popular way for people to connect to the
internet. To stay relevant, responsive and successful, organizations need mobile apps. Mobile
apps that are continuously developed must stay true to its relevance and use in order for the
applications to have scope in today’s technological world. One critical difference between
mobile apps development and software development is that mobile apps are often written
specifically to take advantage of the unique features of a particular mobile device. Few
mobile apps that we use on a daily basis are whatsapp, Instagram, facebook, Zomato etc.

Mobile Programming is the process of 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,
Kotlin, Swift, C# and HTML5, CSS and JavaScript etc.

By the end of 2023, perception of smartphones among adults in developed countries will
surpass 90 per cent according to survey Smartphone sales will reach 1.85 billion per year in
2023, a 19 per cent increase over 2018 and equivalent to over five million units sold per day.
In the next five years we will see more innovative technology being built into our
smartphones such as facial recognition, artificial intelligence and enhanced connectivity,
software and memory. In the next ten years, we will see a growing industry around end-to-
end services that consolidate and manage different, but connected elements of a consumer
experience.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 4
APPLICATION

3. TYPES OF MOBILE APPS

Before developing an app, you need to determine which type you'll be creating. Here's a
breakdown of several types of mobile app development technologies with information about
each.

Figure 1: Types of Mobile Apps by Technology


Based upon the platform they serve (Technology) such as single operating system or multiple
operating system; mobile applications are classified into four types:
1. Native mobile applications
2. Hybrid mobile applications
3. Web applications

Based on purpose and its use mobile apps can be divided into many types such as:
1. Mobile gaming applications
2. Educational mobile applications.
3. Business or productivity applications
4. M-commerce applications
5. Lifestyle applications
6. Entertainment applications
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 5
APPLICATION

7. Travel applications
8. Utility applications

4. THE DEVELOPMENT PROCESS

Fig 2: Development Process

The above figure shows about the different stages in the mobile application development
process
1. Strategy building
2. Planning
3. Design
4. App development
5. Testing
6. Deployment

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 6
APPLICATION

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 7
APPLICATION

5. REQUIREMENT SPECIFICATIONS

 SOFTWARE REQUIREMENTS:

 Android Studio.

 OPERATING SYSTEM:

 Windows 10 & 11.

 PLATFORM REQUIREMENTS:

 Java JDK..
 Java Components.

 HARDWARE REQUIREMENTS:

 Processor – Intel core i5 10th gen , Intel core i4.


 RAM – 8 GB
 ROM – 1TB hard-disk
 NVIDIA Graphics Card 2GB.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 8
APPLICATION

6. TECHNOLOGY USED

 JAVA

Java is a high-level, class-based, object-oriented programming language that is


designed to have as few implementation dependencies as possible. It is a general-
purpose programming language intended tolet programmers write once, run
anywhere. The Java runtime provides dynamic capabilities (such as reflection and
runtime code modification) that are typically not available in traditional compiled
languages

 SQLite Database

SQLite is a database engine written in the C language. It is not a standalone app; rather, it


is a library that software developers embed in their apps. As such, it belongs to the
family of embedded databases. It is the most widely deployed database engine, as it is
used by several of the top web browsers, operating systems, mobile phones, and
other embedded systems. The SQLite file format is stable, cross-platform, and
backwards compatible and the developers pledge to keep it that way through the year
2050. SQLite database files are commonly used as containers to transfer rich content
between systems and as a long-term archival format for data. There are over 1 trillion
SQLite databases in active use.SQLite source code is in the public-domain and is free
to everyone to use for any purpose.

 Android Studio

AndroidStudio is the official Integrated Development Environment (IDE) for android


application development. Android Studio provides more features that enhance our
productivity while building Android apps.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 9
APPLICATION

Features of Android Studio:

o It has a flexible Gradle-based build system.


o It has a fast and feature-rich emulator for app testing.
o Android Studio has a consolidated environment where we can develop for all Android
devices.
o Apply changes to the resource code of our running app without restarting the app.
o Android Studio provides extensive testing tools and frameworks.
o It supports C++ and NDK.
o It provides build-in supports for Google Cloud Platform. It makes it easy to integrate
Google Cloud Messaging and App Engine.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 10
APPLICATION

7. THE APP – “CLIP’S HOLDER”


Android provides the clipboard framework for copying and pasting different types of data.
The data could be text, images, binary stream data or other complex data types.

Android provides the library of ClipboardManager and ClipData and ClipData.item to use the
copying and pasting framework.In order to use clipboard framework, data needs to be put
into clip object, and then put that object into system wide clipboard. The clip object can take
one of three forms:

1. Text

A text strings. You put the string directly into the clip object, which you then put onto the
clipboard. To paste the string, you get the clip object from the clipboard and copy the
string to into your application's storage.

2. URI

A Uri object representing any form of URI. This is primarily for copying complex data
from a content provider. To copy data, you put a Uri object into a clip object and put
the clip object onto the clipboard. To paste the data, you get the clip object, get
the Uri object, resolve it to a data source such as a content provider, and copy the data
from the source into your application's storage.

3. Intent

An Intent. This supports copying application shortcuts. To copy data, you create an
Intent, put it into a clip object, and put the clip object onto the clipboard. To paste the
data, you get the clip object and then copy the Intent object into your application's
memory area.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 11
APPLICATION

In order to use clip holder, object of ClipboardManager has to be instantiated by calling


the getSystemService() method.

Copying data

The next thing to be done is to instantiate the ClipData object by calling the respective type
of data method of the ClipData class. In case of text data , the newPlainText method will be
called. After that you have to set that data as the clip of the Clipboard Manager object.

Pasting Data

In order to paste the data, we will first get the clip by calling the getPrimaryClip() method.
And from that click we will get the item in ClipData.Item object. And from the object we will
get the data.

Key points in clipboard activity are listed below:

 The clipboard holds only one clip object at a time. When an application puts a clip
object on the clipboard, the previous clip object disappears.

 If You want to allow paste data in your app, then you don’t need to handle all types of
data. You can example the clipboard data, before giving an option to app users.

 Clip object also contains Metadata, which has what MIME type or types are available.
This Metadata helps you handle data.

 If you have an application that primarily handles text, you may want to ignore clip
objects that contain a URI or Intent.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 12
APPLICATION

8. SOURCE CODE:

XML FILE:

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


<androidx.constraintlayout.widget.ConstraintLayoutxmlns: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"
tools:context=".MainActivity">

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="104dp"
android:layout_marginTop="52dp"
android:text="ClipBoard Activity"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<EditText
android:id="@+id/TxtCopy"

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 13
APPLICATION

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="40dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toBottomOf="@+id/textView" />

<EditText
android:id="@+id/TxtPaste"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="28dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/TxtCopy" />

<Button
android:id="@+id/BtnCopy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="60dp"
android:text="Copy"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/TxtPaste" />

<Button
android:id="@+id/BtnPaste"
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 14
APPLICATION

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="76dp"
android:layout_marginTop="64dp"
android:text="Paste"
app:layout_constraintStart_toEndOf="@+id/BtnCopy"
app:layout_constraintTop_toBottomOf="@+id/TxtPaste" />
</androidx.constraintlayout.widget.ConstraintLayout>

JAVA CODE:
package com.example.program7b;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements


View.OnClickListener{
Button b1,b2;
EditText t1,t2;
ClipboardManagermyClipboard;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
t1=findViewById(R.id.TxtCopy);

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 15
APPLICATION

t2=findViewById(R.id.TxtPaste);
b1=findViewById(R.id.BtnCopy);
b1.setOnClickListener(this);
b2=findViewById(R.id.BtnPaste);
b2.setOnClickListener(this);
myClipboard= (ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
}
public void onClick(View v)
{
if(v.equals(b1))
{
ClipDatamyClip;
String data = t1.getText().toString();
myClip = ClipData.newPlainText("text", data);
myClipboard.setPrimaryClip(myClip);
Toast.makeText(getBaseContext(),"Copied..",Toast.LENGTH_LONG).show();
}

else if(v.equals(b2))
{
ClipDataabc = myClipboard.getPrimaryClip();
ClipData.Item item = abc.getItemAt(0);
t2.setText(item.getText().toString());
}
}
}

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 16
APPLICATION

9. PROJECT SCREENSHOT

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 17
APPLICATION

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 18
APPLICATION

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 19
APPLICATION

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 20
APPLICATION

10. CONCLUSION

The clips holder holds its information until you cut or copy something else or log out of the
computer. For example, a user may copy information from a word processor and paste it into
an e-mail message. If the user pastes from the clips holder multiple times, the same
information is pasted repeatedly.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI
CLIP’S HOLDER MOBILE 21
APPLICATION

11. REFERENCES

1. Google Developer Training, "Android Developer Fundamentals Course –


Concept Reference”, Google Developer Training Team, 2017.
https://www.gitbook.com/book/google-developer-training/android-
developer-fundamentals-course-concepts/details
(Download pdf file from the above link)

Reference Books:

1. Erik Hellman, “Android Programming – Pushing the Limits”, 1st Edition,


Wiley India Pvt Ltd, 2014. ISBN-13: 978-8126547197
2. Dawn Griffiths and David Griffiths, “Head First Android Development”,
1st Edition, O‟Reilly SPD Publishers, 2015. ISBN-13: 978-9352131341
3. 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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


K.C.T COLLEGE OF ENGINEERING KALABURAGI

You might also like