You are on page 1of 84

MY PRIVACY MY DECISION: CONTROL OF

PHOTO SHARING ON ONLINE SOCIAL


NETWORKS
INTRODUCTION
1.INTRODUCTION

1.1SYNOPSIS
Photo sharing is the publishing or transfer of a user's digital photos
online. Photo-sharing websites offer services such as uploading, hosting,
managing and sharing of photos.This function is provided through both
websites and applications that facilitate the upload and display of images. The
term can also be loosely applied to the use of online photo galleries that are set
up and managed by individual users, including photo blogs. Sharing means that
other users can view but not necessarily download the photos, users being able
to select different copyright options for their photos. Unfortunately, it may leak
users privacy if they are allowed to post, comment, and tag a photo freely. To
address this problem, this project proposes an efficient facial recognition system
that can recognize everyone in the photo.Online photo sharing applications are
increasingly popular, offering users new and innovative ways to share photos
with a variety of people. Many social networking sites are also incorporating
photo sharing features, allowing users to very easily upload and post photos for
their friends and families.This systems are focusing on these privacy concerns
and needs, as well as exploring ideas for privacy protection mechanisms, for
users of social networking sites such as Facebook. In understanding users
current concerns and behaviors, we can design tools they desire, adopt, and
ones they will be motivated to use.
1.2ABOUT THE PROJECT
Social-networking users unknowingly reveal certain kinds of personal information
that malicious attackers could profit from to perpetrate significant privacy
breaches. The first decade of the 21st century saw the popularization of the Internet
and the growth of web services that facilitate participatory information sharing and
collaboration. Specifically, Social Network Sites (SNS), allow users
to interact with others in an unprecedented way. Recently, SNSs, more than just
web applications, have become part of human culture and how society interacts.
News agencies, big and small companies, governments, famous personalities
and the general population all use SNSs to interact with each other.

With over 600 million users and 30 billion pieces of content shared each
month, Facebook has stood out as the most popular SNS in the world 1 and the
website where people spend the most time. Users spend 700 million minutes /
month on Facebook. Sharing news, photos, personal taste and information with
friends and family has never been so easy. This luxury of technology and services
comes along with concern of user privacy. Privacy-related issues with Facebook
have been constantly appearing on international press either because of the
companys privacy policy or because of users unawareness of content sharing
consequences.

As shown by researchers, a simple exposure of date and place of birth of


a profile in Facebook can be used to predict the Social Security Number (SSN) of a
citizen in the U.S. Sometimes, by simply revealing their friends list, users might be
revealing much more. For example, through the use of prediction algorithms it is
possible to infer private information that was previously undisclosed. Photo albums
may also contain sensitive information about the user, like places she usually goes
to, whether or not she is on vacation and who are some of her closest friends
and family members.

Sometimes sensitive information even comes embedded in the photo as


metadata. They may also be accompanied by more information that could be
exploited, like captions, comments and photo tags; marked regions that identify
people on the photo. Even if the individuals in a photo are not explicitly identified
by photo tags, the combination of publicly available data and face recognition
software can be used to infer someones identity. This kind of problems are defined
as collateral damage: users unintentionally put their friends or even their own
privacy at risk when performing actions on SNSs such as Facebook.

Online Social Networks have become integral part of our daily life
with each other, fulfilling our social needs the needs for social interactions,
information sharing, appreciation and respect. It is also this very nature of social
media that makes people put more content, including photos, over OSNs without
too much thought on the content. However, once something, such as a photo, is
posted online, it becomes a permanent record, which may be used for purposes we
never expect. For example, a posted photo in a party may reveal a connection of a
celebrity to a mafia world. Because OSN users may be careless in posting content
while the effect is so far-reaching, privacy protection over OSNs becomes an
important issue.

Mobile phones, tablets, and ultra-portable laptops are no longer viewed as


the wimpy siblings of the personal computer; for many users they have become the
dominant computing device for a wide variety of applications. Ac-cording to a
recent Gartner report, within the next three years, mobile devices will surpass the
PC as the most common web access device worldwide. By 2013, over 40% of the
enhanced phone installed-base will be equipped with advanced browsers. Research
pertaining to mobile devices can be broadly split into applications and services,
device architecture, and operating systems. From a systems perspective, re-search
has tackled many important aspects: understanding and improving energy
management, network middleware, application execution models, security and
privacy, and usability. Prior research has also addressed several important issues
centered on mobile functionality, data management, and disconnected access.
However, one important component is conspicuously missing from the mobile
research landscape storage performance Storage has traditionally not been viewed
as a critical component of phones, tablets, and PDAs at least in terms of the
expected performance. Despite the impetus to provide faster mobile access to
content locally and through cloud services, performance of the underlying storage
subsystem on mobile devices is not well understood. Our work started with a
simple motivating question: does storage affect the performance of popular mobile
applications? Conventional wisdom suggests the answer to be no, as long as
storage performance exceeds that of the network subsystem. We find evidence to
the contrary even interactive applications like web browsing slow down with
slower storage. Storage performance on mobile devices is important for end-user
experience today, and its impact is expected to grow due to several reasons. First,
emerging wireless technologies such as 802.11n and 802.11ad offer the potential
for significantly higher net-work throughput to mobile devices. Figure presents the
trends for network performance over the last several decades; local-area networks
are not necessarily the de-facto bottleneck on modern mobile devices. Second,
while network throughput is increasing phenomenally, latency is not. As a result,
access to several cloud services benefits from a split of functionality between the
cloud and the device, placing a greater burden on local resources including storage.
Third, mobile de-vices are increasingly being used as the primary computing
device, running more performance intensive tasks than previously imagined.
Smartphone usage is on the rise; smartphones and tablet computers are becoming a
popular replacement for laptops. In developing economies, a mobile/enhanced
phone is often the only computing de-vice available to a user for a variety of needs.
In this paper, we present a detailed analysis of the I/O behavior of mobile
applications on Android-based smart-phones and flash storage drives. We
particularly focus on popular applications used by the majority of mobile users,
such as, web browsing, app install, Google Maps, Face-book, and email. Not only
are these activities available on almost all smartphones, but they are done
frequently enough that performance problems with them negatively impacts user
experience. Further, we provide pilot solutions to overcome existing limitations.

Prefetching is a fundamental technique for improving application performance. It


is employed in numerous domains, including computer architecture, databases, file
systems, and distributed systems. In essence, a prefetching system predicts what
data a higher system layer, such as an application, will request and speculatively
retrieves and caches that data in anticipation of future need. If the prediction is
correct, the cached data is pro-vided on request this improves performance by
eliminating the fetching of the data from the critical path of servicing the request.
However, if the prediction is incorrect, prefetching consumes re-sources that could
be used for other activities. Most prefetching systems use heuristics to balance
these concerns; such heuristics decide when and how much data to prefetch. In
many ways, mobile computing is an ideal domain for prefetching. Applications that
run on smart phones and tablets frequently fetch data from the cloud. Yet, mobile
devices must often rely on wireless networks, and such networks can exhibit low
band-width, high latency, and intermittent connectivity When more functions
such as photo sharing and tagging are added, the situation becomes more
complicated. For instance, nowadays we can share any photo as we like on OSNs,
regardless of whether this photo contains other people (is a co-photo) or not.
Currently there is no restriction with sharing of co-photos, on the contrary, social
network service providers like Facebook are encouraging users to post co-photos
and tag their friends in order to get more people involved.

Traditionally, privacy is regarded as a state of social withdrawal. According to


Altmans privacy regulation theory privacy is a dialectic and dynamic boundary
regulation process where privacy is not static but a selective control of access to
the self or to ones group. In this theory, dialectic refers to the openness and
closeness of self to others and dynamic means the desired privacy level changes
with time according to environment. During the process of privacy regulation, we
strive to match the achieved privacy level to the desired one. At the optimum
privacy level, we can experience the desired confidence when we want to hide or
enjoy the desired attention when we want to show. However, if the actual level of
privacy is greater than the desired one, we will feel lonely or isolated; on the other
hand, if the actual level of privacy is smaller than the desired one, we will feel
over-exposed and vulnerable.

In this paper, the system proposes a novel consensus based approach to


achieve efficiency and privacy at the same time. The idea is to let each user only
deal with his/her private photo set as the local train data and use it to learn out the
local training result. After this, local training results are exchanged among users to
form a global knowledge. In the next round, each user learns over his/hers local
data again by taking the global knowledge as a reference. Finally the information
will be spread over users and consensus could be reached.
SYSTEM ANALYSIS
EXSITING SYSTEM
2.1EXISTING SYSTEM

In existing system, Conditional random field (CRF) model is used.


The system combine face recognition scores with social context in
a conditional random field (CRF) model and apply this model to
label faces in photos from the popular online social network
Facebook,which is now the top photo-sharing site on the Web with
billions of photos in total. Existing metadata from online social
networks can dramatically improve automatic photo
annotation.The system have applied our technique to a portion of
the worlds largest database of hand-labeled faces, the tagged faces
in personal photographs posted on the popular social network
Facebook.
2.1.1.ISSUES IN PREVIOUS WORK

It will be impossible for the system to label some individuals in


newly posted photos. The system will not able to find out how
much of our volunteers actual social network as represented on
Facebook we have been allowed to access. Its computation cost is
very high.When user share images, there is a risk that something
inappropriate will get posted. An unflattering light is easy to post
and very hard to delete. The co-owners of a co-photo cannot be
determined automatically.When posting a photo, a user is not
required to ask for permissions of other users appearing in the
photo.
PROPOSED SYSTEM
2.2PROPOSED SYSTEM

In proposes system, the owners of shared photos can be


automatically identified with or without user-generated tags.First
user post the image the image has contains digital signature along
itself.After sharing that image if any user who will need to access
that particular image it will ask the permission to the owner.The
owner information's are appended with the digital signature it will
automatically redirected to the user.
2.2.1.ADVANTGAES

Computation cost is very low.It provides a tool to enable users to


restrict others from seeing their photos when posted as a
complementary strategy to protect privacy.Each user is able to
define his/her privacy policy and exposure policy.
SYSTEM ENVIRONMENT
3.1HARDWARE SPECIFICATION

RAM - 256MB

Internal Memory - 1 GB

Processor - Any Android Processor

OS - Min Android(3.0)
3.2SOFTWARESPECIFICATION

Operating System : Android

Developed : JAVA.ANDROID

Database : MySQL

Software : Eclipse Android Development Tool


SYSTEM DESIGN
FLOW DIAGRAM
SYSTEM FLOW DIAGRAM
Database Design:

Friends login:

Attribute Data type Value

Username VARCHAR 150

Password VARCHAR 30

Compose message:

Attribute Data type Value

Image_Name VARCHAR 150

User_name VARCHAR 150


Input design:

Physical design relates to the actual input and output processes of the system. It
focuses on how data is entered into a system, verified, processed, and displayed as
output. It produces the working system by defining the design specification that
specifies exactly what the candidate system does. It is concerned with user
interface design, process design, and data design.

It consists of the following steps:

Specifying the input/output media, designing the database, and specifying


backup procedures.

Planning system implementation.

Devising a test and implementation plan, and specifying any new hardware
and software. Updating costs, benefits, conversion dates, and system constraints. In
an information system, input is the raw data that is processed to produce output.
During the input design, the developers must consider the input devices such as
PC, MICR, OMR, etc. Therefore, the quality of system input determines the
quality of system output. Well-designed input forms and screens have following
properties:

It should serve specific purpose effectively such as storing, recording, and


retrieving the information.

It ensures proper completion with accuracy.


It should be easy to fill and straightforward.

It should focus on users attention, consistency, and simplicity.

All these objectives are obtained using the knowledge of basic design
principles regarding:

What are the inputs needed for the system?

How end users respond to different elements of forms and screens.

Objectives for Input Design

The objectives of input design are:

To design data entry and input procedures

To reduce input volume

To design source documents for data capture or devise other data capture
methods

To design input data records, data entry screens, user interface screens, etc.

To use validation checks and develop effective input controls.

Data Input Methods

It is important to design appropriate data input methods to prevent errors


while enteringdata. These methods depend on whether the data is entered by
customers in forms manually and later entered by data entry operators, or data is
directly entered by users on the PCs. A system should prevent user from making
mistakes by: Clear form design by leaving enough space for writing legibly.
Output Design:

The design of output is the most important task of any system. During output
design, developers identify the type of outputs needed, and consider the necessary
output controls and prototype report layouts.

Objectives of Output Design

The objectives of input design are:

To develop output design that serves the intended purpose and


eliminates the production of unwanted output.

To develop the output design that meets the end users requirements.

To deliver the appropriate quantity of output.

To form the output in appropriate format and direct it to the right person.

To make the output available on time for making good decisions.

Let us now go through various types of outputs:


SYSTEM DESCRIPTION
MODULES:

Friend request

Picking close friends

Sharing photo

Piggybacking

Data Parsing

Steganography

Authenticating
MODULE DESCRIPTION

Friend request:

A log in/out button could be used for log in/outwith the social website. After
logging in, a greeting message andthe profile picture will be shown.

Friend Request is sending the request for another user who wants add to his
friend.

If the Receiver of the user accepts the friend then he only be added to his friend
list.

The Sender can only choose the user who is only added in the friend list.

Then the users are shared datas to other users with in the Friend lists only
requested
Picking close friends:

A user needs to manually specify the set of close friends among


their social website friends with the button Pick friends as their
neighborhood. In this application, each user picks up to 30 close friends.

All the selected friends are required to install our application to carry out
thecollaborative training.

The setup mode could be activated by pressing the buttonStart. Key


operations and the data flow in this mode are enclosed by a yellow dashed box
on the system architecture.
Sharing photo:

User can share a photo only to friends on list. According to the proposed
scheme, this friend list should be intersection of owners privacy policy and co-
owners exposure policies.

However, in Facebook API, friend lists are read-only items, they cannot be
created or updated through the current API.

That means we cannot customize a friend list to share a co-photo. Currently,


when the button Post Photo is pressed, co-owners of x are identified,
thennotifications along with x are send to the co-owners to request permissions.

If they all agree to post x, x will be shared on the owners page like a normal
photo.
Image Steganography:

Image steganography is the method of hiding secure information's behind


the digital media like images. In the field of information secrecy it was the high
authentic method.

The advantage of steganography over cryptography alone is that the


intended secret message does not attract attention to itself as an object of
scrutiny in digital steganography, electronic communications may include
steganography coding inside of a transport layer, such as a document file, image
file, program or protocol. Media files are ideal for steganography transmission
because of their large size.

Here we use the steganography for steganography the owner information


behind the image which wants to be share.

The User owner information I, owner user id is stored behind its image data

After ending these details to the particular user .then it will be monitored by that
particular user. Which user will be predicted as and informations are set as
privacy policy.

The following formula provides a very generic description of the pieces of the
steganography process:

cover_medium + hidden_data + stego_key = stego_medium


In this context, the cover_medium is the file in which we will hide the
hidden_data, which may also be encrypted using the stego_key. The resultant file
is the stego_medium (which will, of course.

be the same type of file as the cover_medium). The cover_medium (and, thus, the
stego_medium) are typically image or audio files. In this article, I will focus on
image files and will, therefore, refer to the cover_image and stego_image.

Images typically use either 8-bit or 24-bit color. When using 8-bit color, there is a
definition of up to 256 colors forming a palette for this image, each color denoted
by an 8-bit value. A 24-bit color scheme, as the term suggests,

Uses 24 bits per pixel and provides a much better set of colors. In this case, each
pixel is represented by three bytes, each byte representing the intensity of the three
primary colors red, green, and blue (RGB).
Authenticating:

In The Module of Authenticating is used when the data will be shared by one user
than the steganography informations are predicted the user information datas are
get from that particular user and also.

User Acknowledgment will be send to the particular persons if the person has
accept the posting policy then it will be stored on to the consider persons.

The Privacy policy will be decrypted from the image steganography after the
owner informations are get from the particular user.

The Acknowledgement for the privacy policy will be send to the particular image.

After accepting the privacy policy by owner then only the photo is uploaded on the
wall.
IMPLEMENTATION
IMPLEMENTATION:

To develop good quality of system software, it is necessary to develop a


good design. Therefore, the main focus on while developing the design of the
system is the quality of the software design. A good quality software design is
the one, which minimizes the complexity and cost expenditure in software
development. The two important concepts related to the system development that
help in determining the complexity of a system are coupling and cohesion.
Coupling: Coupling is the measure of the independence of components. It
defines the degree of dependency of each module of system development on the
other. In practice, this means the stronger the coupling between the modules in
a system, the more difficult it is to implement and maintain the system. Each
module should have simple, clean interface with other modules, and that the
minimum number of data elements should be shared between modules. High
Coupling These type of systems have interconnections with program units
dependent on each other. Changes to one subsystem leads to high impact on the
other subsystem.Low Coupling These type of systems are made up of
components which are independent or almost independent. A change in one
subsystem does not affect any other subsystem.
TESTING
7. TESTING
7.1UNIT TESTING:

Unit testing is the testing of each module and the integration of the overall
system is done. Unit testing becomes verification efforts on the smallest unit of
software design in the module. This is also known as module testing. The
modules of the system are tested separately. This testing is carried out during the
programming itself. In this testing step, each model is found to be working
satisfactorily as regard to the expected output from the module. There are some
validation checks for the fields. For example, the validation check is done for
verifying the data given by the user where both format and validity of the data
entered is included. It is very easy to find error and debug the system.
7.2 SYSTEM TESTING

System testing is the stage of implementation, which aimed at


ensuring that system works accurately and efficiently before the live operation
commence. Testing is the process of executing a program with the intent of finding
an error. A good test case is one that has a high probability of finding an error. A
successful test is one that answers a yet undiscovered error.

Testing is vital to the success of the system. System testing makes a


logical assumption that if all parts of the system are correct, the goal will be
successfully achieved. The candidate system is subject to variety of tests-on-line
response, Volume Street, recovery and security and usability test. A series of tests
are performed before the system is ready for the user acceptance testing. Any
engineered product can be tested in one of the following ways. Knowing the
specified function that a product has been designed to from, test can be conducted
to demonstrate each function is fully operational. Knowing the internal working of
a product, tests can be conducted to ensure that al gears mesh, that is the internal
operation of the product performs according to the specification and all internal
components have been adequately exercised.
7.3 INTEGRATION TESTING:

Data can be lost across an interface, one module can have an adverse
effect on the other sub function, when combined, may not produce the desired
major function. Integrated testing is systematic testing that can be done with
sample data. The need for the integrated test is to find the overall system
performance. There are two types of integration testing. They are:

i Top-down integration testing.

ii Bottom-up integration testing.


BACKUP AND MAINTENANCE
BACKUP AND MAINTANENCE:

SQL Server requires regular maintenance. Maintenance includes re-indexing and


backing up the databases. This document is designed as a guide for setting up a
regular database maintenance schedule. Backups should be done on a regular basis.
The policies for backing up will vary from one organization to the next. Consult
your Systems Administrator for best methods. These maintenance schedules should
be performed on the server machine.

The Help in Enterprise Manager details maintenance tasks more fully. Please take
the time to read the SQL Server Book Online manual.

Remember that this document is a guide only. You will have to make the choices
that best suit your needs.

Full Backup

A full database backup backs up the whole database. These backups create a
complete backup of your database as well as part of the transaction log, so the
database can be recovered. This allows for the simplest form of database
restoration, since all of the contents are contained in one backup.
Recommendation: This is recommended if the Evolution database size is minimal.

Differential Backup

A differential backup is a backup of any extent that has changed since the
last FULL backup was created. A differential backup captures only the data that
has changed since that full backup.

Recommendation: This is recommended if the Evolution database size is huge.

Transactional Backup

A transaction log backup allows you to back-up the active part of the
transactionlog. So after you issue a "Full" or "Differential" backup the transaction
log backup will have any transactions that were created after those other backups
are completed.

Recommendation: This is recommended only if there are numerous transactions in


the Evolution database.
CONCLUSION
10.CONCLUSION

In this project, the system has proposed aby combining digital signature
along with the shared image we can provide the data security for the image.The
User can share the image combined with the steganography digital signature. If any
other user who wants to share that particular image the permission request is
automatically redirect to the user if the owner is giving privilege to share the data
then it will be posted.The system presented the detailed description of our system.
Generally speaking, the consensus result could be achieved by iteratively refining
the local training result: Photo sharing is the publishing or transfer of a user's
digital photos online. Photo-sharing websites offer services such as uploading,
hosting, managing and sharing of photos (publicly or privately). This function is
provided through both websites and applications that facilitate the upload and
display of images. The term can also be loosely applied to the use of online photo
galleries that are set up and managed by individual users, including photo blogs.
Sharing means that other users can view but not necessarily download the photos,
users being able to select different copyright options for their photos. Firstly, each
user performs local supervised learning only with its own training set, and then the
local results are exchanged among collaborators to form a global knowledge. Then
the global knowledge is used to regularize the local training until convergence. The
system used a toy system with two users to demonstrate the principle of our design.
Then, the system has proven that how to build a general personal FR with more
than two users. It is very efficient than existing system. The system can curb the
privacy leakage by using this design.The proposed system is featured with low
computation cost and confidentiality of the training set.
REFERENCES

[1] I. Altman. Privacy regulation: Culturally universal or culturally specific?


Journal of Social Issues, 33(3):6684, 1977.

[2] A. Besmer and H. Richter Lipford. Moving beyond untagging: photo


privacy in a tagged world. In Proceedings of the SIGCHI Conference on Human
Factors in Computing Systems, CHI 10, pages15631572, New York, NY,
USA, 2010. ACM.

[3] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed


optimization and statistical learning via the alternating direction method of
multipliers. Found. Trends Mach. Learn., 3(1):1122, Jan.2011.

[4] B. Carminati, E. Ferrari, and A. Perego. Rule-based access control for social
networks. In R. Meersman, Z. Tari, and P. Herrero, editors, On the Move to
Meaningful Internet Systems 2006: OTM 2006 Workshops, volume 4278 of
Lecture Notes in Computer Science,pages 17341744. Springer Berlin
Heidelberg, 2006.

[5] J. Y. Choi, W. De Neve, K. Plataniotis, and Y.-M. Ro. Collaborative face


recognition for improved face annotation in personal photo collections shared
on online social networks. Multimedia, IEEE Transactions on, 13(1):1428,
2011.
[6] K. Choi, H. Byun, and K.-A. Toh. A collaborative face recognition
framework on a social network platform. In Automatic Face Gesture
Recognition, 2008. FG 08. 8th IEEE International Conference on, pages 16,
2008.

[7] K.-B. Duan and S. S. Keerthi. Which is the best multiclass svm method? an
empirical study. In Proceedings of the 6th international conference on Multiple
Classifier Systems, MCS05, pages 278285, Berlin, Heidelberg, 2005.
Springer-Verlag.

[8] P. A. Forero, A. Cano, and G. B. Giannakis. Consensus-based distributed


support vector machines. J. Mach. Learn. Res., 99:1663 1707, August 2010.

[9] B. Goethals, S. Laur, H. Lipmaa, and T. Mielik?inen. On private scalar


product computation for privacy-preserving data mining. In In Proceedings of
the 7th Annual International Conference in Information Security and
Cryptology, pages 104120. Springer-Verlag, 2004.

[10] L. Kissner and D. Song. Privacy-preserving set operations. In IN


ADVANCES IN CRYPTOLOGY - CRYPTO 2005, LNCS, pages 241257.
Springer, 2005.

[11] L. Kissner and D. X. Song. Privacy-preserving set operations. In V. Shoup,


editor, CRYPTO, volume 3621 of Lecture Notes in Computer Science, pages
241257. Springer, 2005.

[12] N. Mavridis, W. Kazmi, and P. Toulis. Friends with faces: How social
networks can enhance face recognition and vice versa. In Computational Social
Network Analysis, Computer Communicationsand Networks, pages 453482.
Springer London, 2010.
[13] R. J. Michael Hart and A. Stent. More content - less control: Access control
in the web 2.0. In Proceedings of the Workshop on Web 2.0 Security and
Privacy at the IEEE Symposium on Security and Privacy, 2007.

[14] M. E. Newman. The structure and function of complex networks. SIAM


review, 45(2):167256, 2003.

[15] L. Palen. Unpacking privacy for a networked world. pages 129 136.
Press, 2003.
OBJECTIVE

Photo sharing is an attractive feature which popularizes Online Social Networks


(OSNs).

Unfortunately, it may leak users' privacy if they are allowed to post, comment, and
tag a photo freely. In this paper, we attempt to address this issue and study the
scenario when a user shares a photo containing individuals other than him.

To prevent possible leakage of a photo privacy, we design a mechanism to enable


each individual in a photo be aware of the posting activity and participate in the
decision making on the photo posting.

For this purpose, we propose a system by combining digital signature along with
the shared image we can provide the data security for the image.

The User can share the image combined with the steganography digital signature.

If any other user who wants to share that particular image the permission request
is automatically redirect to the user if the owner is giving privilege to share the
data then it will be posted.

We show that our system is superior to other possible approaches in terms of


recognition ratio and efficiency.

Our mechanism is implemented as an Android application platform.


External Outputs

Manufacturers create and design external outputs for printers. External outputs
enable the system to leave the trigger actions on the part of their recipients or
confirm actions to their recipients.

Some of the external outputs are designed as turnaround outputs, which are
implemented as a form and re-enter the system as an input.

Internal outputs

Internal outputs are present inside the system, and used by end-users and
managers. They support the management in decision making and reporting.

There are three types of reports produced by management information:

Detailed Reports: They contain present information which has almost no


filtering or restriction generated to assist management planning and control.

Summary Reports: They contain trends and potential problems which


arecategorized and summarized that are generated for managers who do not
want details.

Exception Reports: They contain exceptions, filtered data to some condition or


standard before presenting it to the manager, as information.
Sample Coding:

//Register.java

package com.example.myprivacymydecission;

import java.io.ByteArrayOutputStream;

import android.app.Activity;

import android.app.Dialog;

import android.content.Intent;

import android.graphics.Bitmap;

import android.graphics.drawable.BitmapDrawable;

import android.net.Uri;

import android.os.Bundle;

import android.util.Base64;

import android.view.Menu;
import android.view.View;

import android.widget.EditText;

import android.widget.ImageView;

import android.widget.RadioButton;

import android.widget.RadioGroup;

public class Register extends Activity {

EditText etname, etusername, etpassword;

String name, username, password;

Bitmap bmpImageView;

Dialog dialog;

RadioButton rbFromCamera, rbFromGallery;

RadioGroup rgUploadChoice;

private static final int cameraData=1;

private static final int galleryData=2;

ImageView ProfilePic;

String encodedImage ;
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_register);

etname = (EditText) findViewById(R.id.EditText01);

etusername = (EditText) findViewById(R.id.editText1);

etpassword = (EditText) findViewById(R.id.editText2);

ProfilePic=(ImageView)findViewById(R.id.imageView1);

@Override

public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.

getMenuInflater().inflate(R.menu.register, menu);

return true;

public void signup_prc(View view) {


name = etname.getText().toString();

username = etusername.getText().toString();

password = etpassword.getText().toString();

//encoded image

Bitmap bitmapProfilePic = ((BitmapDrawable)


ProfilePic.getDrawable()).getBitmap();

//encodedImage=getStringImage(bitmapProfilePic);

//ByteArrayOutputStream bytearrayoutputstream = new


ByteArrayOutputStream();

//bitmapProfilePic.compress(Bitmap.CompressFormat.JPEG, 100,
bytearrayoutputstream);

//encodedImage = Base64.encodeToString(bytearrayoutputstream
.toByteArray(), Base64.DEFAULT);

encodedImage=encodeTobase64(bitmapProfilePic);

String sMethod = "register";


BackgroundTask backgroundtask = new BackgroundTask(this);

backgroundtask.execute(sMethod,name,username,password,encodedImage);

public static String encodeTobase64(Bitmap image)

Bitmap immagex=image;

ByteArrayOutputStream baos = new ByteArrayOutputStream();

immagex.compress(Bitmap.CompressFormat.JPEG, 100, baos);

byte[] b = baos.toByteArray();

String imageEncoded = Base64.encodeToString(b,Base64.DEFAULT);

return imageEncoded;

public void uploadimage_prcs(View view)

dialog = new Dialog(this);

dialog.setContentView(R.layout.uploadchoice);
dialog.setTitle("Upload Ur Picture");

dialog.setCancelable(true);

dialog.show();

rbFromCamera = (RadioButton)
dialog.findViewById(R.id.rbFromCamera);

rbFromGallery = (RadioButton)
dialog.findViewById(R.id.rbFromGallery);

rgUploadChoice =(RadioGroup)
dialog.findViewById(R.id.rgUploadChoice);

rgUploadChoice.setOnCheckedChangeListener(new
RadioGroup.OnCheckedChangeListener() {

@Override

public void onCheckedChanged(RadioGroup group, int


selectedID) {

switch(selectedID)

case R.id.rbFromCamera:
Intent cameraIntent = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(cameraIntent,cameraData);

break;

case R.id.rbFromGallery:

Intent galleryIntent = new


Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

startActivityForResult(galleryIntent, galleryData);

break;

});

@Override

protected void onActivityResult(int requestCode, int resultCode, Intent data)


{
super.onActivityResult(requestCode, resultCode, data);

if (resultCode==RESULT_OK)

switch (requestCode)

case 1:

Bundle extras = data.getExtras();

bmpImageView = (Bitmap) extras.get("data");

ProfilePic.setImageBitmap(bmpImageView);

break;

case 2:

Uri uri= data.getData();

ProfilePic.setImageURI(uri);

break;

}
public String getStringImage(Bitmap bmp){

ByteArrayOutputStream baos = new ByteArrayOutputStream();

bmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);

byte[] imageBytes = baos.toByteArray();

String encodedImage = Base64.encodeToString(imageBytes,


Base64.DEFAULT);

return encodedImage;

}
//ViewAllFriends.java

package com.example.myprivacymydecission;

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.util.ArrayList;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import org.apache.http.HttpResponse;

import org.apache.http.client.ClientProtocolException;

import org.apache.http.client.HttpClient;

import org.apache.http.client.methods.HttpPost;

import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;

import org.json.JSONException;

import org.json.JSONObject;

import android.app.Activity;

import android.os.AsyncTask;

import android.os.Bundle;

import android.view.Menu;

import android.widget.ListView;

import android.widget.SimpleAdapter;

import android.widget.TextView;

import android.widget.Toast;

public class ViewAllfriends extends Activity {

private String jsonResult;

String url;

private ListView listView;

private TextView textv1;

private String[] geofenceid;


String Uname;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_view_allfriends);

listView = (ListView) findViewById(R.id.listView1);

textv1 = (TextView) findViewById(R.id.textView1);

Bundle bundleGetResult = getIntent().getExtras();

Uname = bundleGetResult.getString("StringName");

url = "http://10.0.2.2/MyprivacyMydecission/viewfriends.php?
Username="

+ Uname;

accessWebService();

@Override
public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.

getMenuInflater().inflate(R.menu.view_allfriends, menu);

return true;

private class JsonReadTask extends AsyncTask<String, Void, String> {

@Override

protected String doInBackground(String... params) {

HttpClient httpclient = new DefaultHttpClient();

HttpPost httppost = new HttpPost(params[0]);

try {

HttpResponse response = httpclient.execute(httppost);

jsonResult = inputStreamToString(

response.getEntity().getContent()).toString();

catch (ClientProtocolException e) {
e.printStackTrace();

} catch (IOException e) {

e.printStackTrace();

return null;

private StringBuilder inputStreamToString(InputStream is) {

String rLine = "";

StringBuilder answer = new StringBuilder();

BufferedReader rd = new BufferedReader(new


InputStreamReader(is));

try {

while ((rLine = rd.readLine()) != null) {

answer.append(rLine);

}
catch (IOException e) {

// e.printStackTrace();

Toast.makeText(getApplicationContext(),

"Error..." + e.toString(),
Toast.LENGTH_LONG).show();

return answer;

@Override

protected void onPostExecute(String result) {

ListDrwaer();

}// end async task

public void accessWebService() {

JsonReadTask task = new JsonReadTask();

// passes values for the urls string array

task.execute(new String[] { url });


}

// build hash set for list view

public void ListDrwaer()

List<Map<String, String>> employeeList = new


ArrayList<Map<String, String>>();

Try

JSONObject jsonResponse = new JSONObject(jsonResult);

JSONArray jsonMainNode =
jsonResponse.optJSONArray("friends");

for (int i = 0; i < jsonMainNode.length(); i++)

JSONObject jsonChildNode =
jsonMainNode.getJSONObject(i);

String Fname = jsonChildNode.getString("friendname");


String outPut = Fname;

employeeList.add(createEmployee("friends", outPut));

} catch (JSONException e)

Toast.makeText(getApplicationContext(), "Error" +
e.toString(),

Toast.LENGTH_SHORT).show();

SimpleAdapter simpleAdapter = new SimpleAdapter(this,


employeeList,

android.R.layout.simple_list_item_1,

new String[] { "friends" }, new int[]


{ android.R.id.text1 });

listView.setAdapter(simpleAdapter);

}
private HashMap<String, String> createEmployee(String name, String
number)

HashMap<String, String> employeeNameNo = new HashMap<String,


String>();

employeeNameNo.put(name, number);

return employeeNameNo;

}
//Compose new message.java:

package com.example.myprivacymydecission;

import java.io.BufferedReader;

import java.io.ByteArrayOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.util.ArrayList;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import org.apache.http.HttpResponse;

import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;

import org.apache.http.client.methods.HttpPost;

import org.apache.http.impl.client.DefaultHttpClient;

import org.json.JSONArray;

import org.json.JSONException;

import org.json.JSONObject;

import android.app.Activity;

import android.app.Dialog;

import android.content.Intent;

import android.graphics.Bitmap;

import android.graphics.drawable.BitmapDrawable;

import android.net.Uri;

import android.os.AsyncTask;

import android.os.Bundle;

import android.util.Base64;

import android.view.Menu;

import android.view.View;

import android.widget.ArrayAdapter;
import android.widget.EditText;

import android.widget.ImageView;

import android.widget.RadioButton;

import android.widget.RadioGroup;

import android.widget.SimpleAdapter;

import android.widget.Spinner;

import android.widget.Toast;

public class Newmeessage extends Activity {

Bitmap bmpImageView;

Dialog dialog;

RadioButton rbFromCamera, rbFromGallery;

RadioGroup rgUploadChoice;

private static final int cameraData = 1;

private static final int galleryData = 2;

ImageView ProfilePic;

String encodedImage;

String url;

Spinner users;
public static String sender, reciever, owner, encimage, imagename, ack;

Uri uri;

String currentuser;

List<String> userslist = new ArrayList<String>();

private String jsonResult;

EditText imgname;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_newmeessage);

ProfilePic = (ImageView) findViewById(R.id.imageView1);

Bundle bundleGetResult = getIntent().getExtras();

currentuser = bundleGetResult.getString("StringName");

imgname = (EditText) findViewById(R.id.editText1);


users = (Spinner) findViewById(R.id.spinner1);

url = "http://10.0.2.2/MyprivacyMydecission/viewallusers.php";

accessWebService();

@Override

public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.

getMenuInflater().inflate(R.menu.newmeessage, menu);

return true;

private class JsonReadTask extends AsyncTask<String, Void, String> {

@Override

protected String doInBackground(String... params) {

HttpClient httpclient = new DefaultHttpClient();

HttpPost httppost = new HttpPost(params[0]);


try {

HttpResponse response = httpclient.execute(httppost);

jsonResult = inputStreamToString(

response.getEntity().getContent()).toString();

catch (ClientProtocolException e) {

e.printStackTrace();

} catch (IOException e) {

e.printStackTrace();

return null;

private StringBuilder inputStreamToString(InputStream is) {

String rLine = "";

StringBuilder answer = new StringBuilder();

BufferedReader rd = new BufferedReader(new


InputStreamReader(is));
try {

while ((rLine = rd.readLine()) != null) {

answer.append(rLine);

catch (IOException e) {

// e.printStackTrace();

Toast.makeText(getApplicationContext(),

"Error..." + e.toString(),
Toast.LENGTH_LONG).show();

return answer;

@Override

protected void onPostExecute(String result) {

ListDrwaer();
}

}// end async task

public void accessWebService() {

JsonReadTask task = new JsonReadTask();

// passes values for the urls string array

task.execute(new String[] { url });

// build hash set for list view

public void ListDrwaer() {

List<Map<String, String>> employeeList = new


ArrayList<Map<String, String>>();

try {

JSONObject jsonResponse = new JSONObject(jsonResult);

JSONArray jsonMainNode =
jsonResponse.optJSONArray("friends");

for (int i = 0; i < jsonMainNode.length(); i++) {


JSONObject jsonChildNode =
jsonMainNode.getJSONObject(i);

String user = jsonChildNode.getString("name");

if (currentuser.equals(user)) {

} else {

userslist.add(user);

ArrayAdapter<String> dataAdapter = new


ArrayAdapter<String>(this,

android.R.layout.simple_spinner_item, userslist);

// Drop down layout style - list view with radio button

dataAdapter

.setDropDownViewResource(android.R.layout.sim
ple_spinner_dropdown_item);
// attaching data adapter to spinner

users.setAdapter(dataAdapter);

} catch (JSONException e) {

Toast.makeText(getApplicationContext(), "Error" +
e.toString(),

Toast.LENGTH_SHORT).show();

SimpleAdapter simpleAdapter = new SimpleAdapter(this,


employeeList,

android.R.layout.simple_list_item_1,

new String[] { "friends" }, new int[]


{ android.R.id.text1 });

public void send_prcs(View view) {

sender = currentuser;
reciever = users.getSelectedItem().toString();

owner = currentuser;

Bitmap bitmapProfilePic = ((BitmapDrawable)


ProfilePic.getDrawable())

.getBitmap();

// encodedImage=getStringImage(bitmapProfilePic);

// ByteArrayOutputStream bytearrayoutputstream = new

// ByteArrayOutputStream();

// bitmapProfilePic.compress(Bitmap.CompressFormat.JPEG, 100,

// bytearrayoutputstream);

// encodedImage = Base64.encodeToString(bytearrayoutputstream

// .toByteArray(), Base64.DEFAULT);

imagename=imgname.getText().toString();

encodedImage = encodeTobase64(bitmapProfilePic);

encimage = encodedImage;

ack = "accepted";
Intent myint = new Intent(Newmeessage.this, Proceedtosend.class);

startActivity(myint);

private HashMap<String, String> createEmployee(String name, String


number) {

HashMap<String, String> employeeNameNo = new HashMap<String,


String>();

employeeNameNo.put(name, number);

return employeeNameNo;

public void uploadimage_prcs(View view) {

dialog = new Dialog(this);

dialog.setContentView(R.layout.uploadchoice);

dialog.setTitle("Upload Ur Picture");

dialog.setCancelable(true);

dialog.show();
rbFromCamera = (RadioButton)
dialog.findViewById(R.id.rbFromCamera);

rbFromGallery = (RadioButton)
dialog.findViewById(R.id.rbFromGallery);

rgUploadChoice = (RadioGroup)
dialog.findViewById(R.id.rgUploadChoice);

rgUploadChoice

.setOnCheckedChangeListener(new
RadioGroup.OnCheckedChangeListener() {

@Override

public void onCheckedChanged(RadioGroup


group,

int selectedID) {

switch (selectedID) {

case R.id.rbFromCamera:

Intent cameraIntent = new Intent(

android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent,
cameraData);

break;

case R.id.rbFromGallery:

Intent galleryIntent = new Intent(

Intent.ACTION_PICK,

android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

startActivityForResult(galleryIntent,
galleryData);

break;

});

@Override

protected void onActivityResult(int requestCode, int resultCode, Intent data)


{

super.onActivityResult(requestCode, resultCode, data);


if (resultCode == RESULT_OK) {

switch (requestCode) {

case 1:

Bundle extras = data.getExtras();

bmpImageView = (Bitmap) extras.get("data");

ProfilePic.setImageBitmap(bmpImageView);

break;

case 2:

uri = data.getData();

ProfilePic.setImageURI(uri);

break;

public String getStringImage(Bitmap bmp) {

ByteArrayOutputStream baos = new ByteArrayOutputStream();


bmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);

byte[] imageBytes = baos.toByteArray();

String encodedImage = Base64.encodeToString(imageBytes,


Base64.DEFAULT);

return encodedImage;

public static String encodeTobase64(Bitmap image) {

Bitmap immagex = image;

ByteArrayOutputStream baos = new ByteArrayOutputStream();

immagex.compress(Bitmap.CompressFormat.JPEG, 100, baos);

byte[] b = baos.toByteArray();

String imageEncoded = Base64.encodeToString(b,


Base64.DEFAULT);

return imageEncoded;

You might also like