118
Android Social Media Geolocation and Maps Integration SID: 1112566 MOD002691 Final Project Final Project Report BSc (Hons) Computer Science Submitted: May 2015

1112566_Dissertation

Embed Size (px)

Citation preview

Page 1: 1112566_Dissertation

Android Social Media Geolocation and

Maps Integration

SID: 1112566

MOD002691 Final Project

Final Project Report

BSc (Hons) Computer Science

Submitted: May 2015

Page 2: 1112566_Dissertation

ii

Abstract The aim of this thesis is to design and develop a geo-location application in to an

Android environment. The project examine the design and implementation process of

building a piece of software. The project will discuss the potential threats a geo-location

application would present to a user on social networking site and how moral implication

of using such an application. The project will compare and contrast existing geo-

location application as part of the design and implementation process.

Page 3: 1112566_Dissertation

iii

Acknowledgements With thanks to my family and my Girlfriend who helped my get to this final pay in my degree

and kept me going. With thanks to the lecturers at Anglia Ruskin University, for helping with

my many issues and been great people to know. Finally a special thanks to Razvan, my

supervisor, who helped me throughout my degree and I can’t thank him enough, and I hope to

repay the debt to him someday soon.

Page 4: 1112566_Dissertation

iv

Table of Contents

Abstract ......................................................................................................................... ii

Acknowledgements ..................................................................................................... iii

Table of Contents ......................................................................................................... iv

List of Figures ............................................................................................................. vii

List of Tables ................................................................................................................ ix

1.0 Introduction ........................................................................................................... 10

1.1 Research Question ............................................................................................. 11

1.2 Aims and Objectives .......................................................................................... 12

1.2.1 Aims ............................................................................................................... 12

1.2.2 Objectives ....................................................................................................... 12

2.0 Literature Review .................................................................................................. 13

2.1 Social Networking Sites and User Demographic .............................................. 13

2.2 Adult User Demographic on Social Networking Sites ...................................... 14

2.3 Mobile Social Networking Usage ..................................................................... 16

2.4 A Comparison of Existing Geo-Location Applications .................................... 16

2.5 Brief Overview of Design and Functionality in Existing Geo-Location

Applications ............................................................................................................. 17

3.0 Methodology ......................................................................................................... 20

3.1 Software Development Life Cycle .................................................................... 20

3.2 Software Methodologies .................................................................................... 23

Page 5: 1112566_Dissertation

v

3.3 Application Overview ....................................................................................... 29

3.3.1 Map API integration, Pin Clustering and Geo-Fencing ................................. 30

3.3.2 Social Network Integration ............................................................................. 30

3.3.3 Database Integration ....................................................................................... 30

3.3.4 Hardware and Software Required to Build the Application ........................... 30

4.0 Implementation and Results .................................................................................. 31

4.1 Android Platform and Android Applications .................................................... 31

4.2 Implementation Overview ................................................................................. 34

4.3 Map Integration ................................................................................................. 34

4.4 Pin Clustering .................................................................................................... 36

4.5 Custom Information Window ............................................................................ 37

4.6 Geo-Fencing ...................................................................................................... 39

4.7 Social Network Integration ................................................................................ 40

4.8.1 Twitter Integration .......................................................................................... 40

4.8.2 Instagram Integration ...................................................................................... 45

4.9 User Interface Design and XML ....................................................................... 47

4.10 Database and SQL integration ......................................................................... 48

4.11 Coding Principles and Field Validation .......................................................... 49

4.12 Testing ............................................................................................................. 52

5.0 Discussion ............................................................................................................. 64

5.1 Overview of Social Networking Sites ............................................................... 64

Page 6: 1112566_Dissertation

vi

5.2 Social Media Monitoring ................................................................................... 64

5.3 Big Data and Data Mining ................................................................................. 65

5.4 Ethical Issue and Moral Issues of Geo-Location Applications ......................... 67

6.0 Conclusion............................................................................................................. 68

7.0 References ............................................................................................................. 69

7.1 Code ................................................................................................................... 69

7.2 Final Project Research ....................................................................................... 77

Appendix I ................................................................................................................... 81

Application Code and User Interface Design .......................................................... 81

Appendix II ............................................................................................................... 117

Poster: .................................................................................................................... 117

Page 7: 1112566_Dissertation

vii

List of Figures

Figure 1: (PewResearchCenter, 2015), Adult User Demographic on Social Networking

........................................................................................................................................ 14

Figure 2: (PewResearchCenter, 2015), Social networking site use by ages group, 2005 -

2013 ................................................................................................................................ 15

Figure 3: (Hootsuite.com, 2015), Hootsuite UI .............................................................. 18

Figure 4: (Portal.opheme.com, 2015), oPheme UI ......................................................... 19

Figure 5: (Aranya, 2015), Software Life Cycle .............................................................. 20

Figure 6: WaterFall ......................................................................................................... 24

Figure 7: Incremental Life Cycle .................................................................................... 26

Figure 8: (Istqbexamcertification.com, 2015), Scrum Lifecycle .................................... 28

Figure 9: (John, 2015), Android OS Model .................................................................... 32

Figure 10: Google Map ................................................................................................... 35

Figure 11: Pin Clustering Example ................................................................................. 36

Figure 12: Tweets displayed on a map ........................................................................... 38

Figure 13: Dynamic pins on a map ................................................................................. 39

Figure 14: (Dev.twitter.com, 2015), Twitter, Rest API .................................................. 42

Figure 15: Tweets displayed on a map ........................................................................... 43

Figure 16: Twitter Login ................................................................................................. 44

Figure 17: Twitter , key and secret ................................................................................. 44

Figure 18: (Instagram.com, 2015), Json example from Instagram ................................. 46

Figure 19: Instagram Authenication ............................................................................... 46

Figure 20: Instagram key ................................................................................................ 47

Figure 21: UI example from application ......................................................................... 48

Page 8: 1112566_Dissertation

viii

Page 9: 1112566_Dissertation

ix

List of Tables

Table1: Testing core feature ……………………………………………………….50

Page 10: 1112566_Dissertation

10

1.0 Introduction

A social networking site is an (Janssen, 2015) online platform that allows users of the

site to create online profiles of themselves and socially interact with other users on the

platform. Users can add existing friends to their connections group or establish new

connections with other users on the site. Social networking sites allow users to (Rouse,

2006) join communities, group and play games with other users on the site.

As the number of users increase on social networking sites, so does the amount of

information users share on the respective sites, therefore social networking sites, such

as Twitter and Instagram, store more and more of a user’s personal shared content each

day. Twitter currently has more than 288 million monthly active users1 and more than

500 million Tweets are sent per day1. Instagram has currently more than 300 million

Instagram users2 which send more than 70 million photos and videos each day2.

As the user population on social networking sites increase, and the amount of

information user’s shares on social networking sites increases, therefore so does the risk

of personal information been utilised by external sources, such as a mobile application.

The information captured by the application could produce a threat to individual users

on social networking sites, such as harassment or stalking. An application with access

to social networking sites information could raise ethical issues for the user using the

application.

1 About.twitter.com, (2015). About Twitter, Inc. | About. [online] Available at:

https://about.twitter.com/company [Accessed 29 Apr. 2015].

2 300 Million: Sharing Real Moments. (2015). [online] Available at: http://blog.instagram.com/post/104847837897/141210-300million [Accessed 29 Apr. 2015].

Page 11: 1112566_Dissertation

11

This project will examine whether personal information, or more precisely, geo-location

and shared post information, can be accessed and integrated into an Android mobile

application. The project will explore if data such as geo-location and shared post

information can be accessed via a mobile application and how the data can be used and

displayed in a mobile application. The report will discuss the threat of the application

been used for data mining and social media monitoring and how a user’s personal

information could be used.

This project is necessary as it explores how a geo-location application would work and

be designed, and if such an application could exist or exists in the market today, the

project will examine what potential threats this sort of application would have on a user

and the ethical and moral issues it would raise and the project will discuss the software

development life cycle and demonstrate the process designing and implementing a

mobile Android application.

The project will hope to demonstrate the process of creating a geo-location mobile

application and will demonstrate whether social networking sites can be successfully

integrated in an Android application and demonstrate the ramifications of such an

application existing and how the application could be used again users on social

networking sites. Based on what the project hopes to achieve a research question can be

defined.

1.1 Research Question

Can Social Media Geolocation and Spatial Representation be effectively combined

through the Design of a Mobile Application?

Page 12: 1112566_Dissertation

12

1.2 Aims and Objectives

The project will examine and discuss three different topics, firstly a comparison of

existing Go-location applications, secondly, how such an application would be

implemented as an Android application, thirdly, what sort of ethical and potentials

threats such an application could raise. See section 1.2.1 Aims.

The objectives, stated in section 1.2.2 Objectives, are derived from the aims. The

objectives 1.1, 1.2, 1.3, examine how existing Geo-location application are designed

and implemented, these objectives are derived from Aim 1. The objectives, 2.1, 2.2, 2.3,

are used as part of the design and implementation of the Android application; these

objectives are derived from Aim 2. The objectives, 3.1, 3.2, 3.3, discuss the ethical

issues and potential threats such an application could have on a user, and how a user

could protect them self on social networking sites, these objectives are derived from

Aim 3.

1.2.1 Aims

1. To compare and contrast existing Geo-location application designs.

2. To design and develop an Android application capable of placing Social Media

on Google Maps.

3. To assess the potential threat to users and ethical issues such an Application

might raise.

1.2.2 Objectives

1.1 A comparison between existing Geo-location applications.

1.2 Examine how different Geo-location applications are designed.

1.3 To research and examine features of Geo-location applications.

Page 13: 1112566_Dissertation

13

2.1 To design and develop how a Geo-location Android application would be

implemented.

2.2 To integrate and implement social Networking sites into an Android application.

2.3 To integrate and implement Google Maps API into an Android application.

3.1 To discuss ethical issues such an application could create on a user.

3.2 To discuss potential threats an application may raise to a user of social

networking sites.

3.3 To discuss how a user could protect themselves from such an application.

2.0 Literature Review

2.1 Social Networking Sites and User Demographic

Social Networking sites accounted in (Wong, 2015) 2014 for 31.24% of internet traffic

to sites compared to last year’s (Wong, 2015) 22.71% of internet traffic. Social

networking sites, such as (Wong, 2015) Facebook accounting for on average 25% of

internet traffic last year and (Wong, 2015) Twitter accounting for 0.9% of internet

traffic last year. Facebook has 1.35 billion registered users and 1.1 billion people use

Facebook on a mobile device on a monthly basis5. Facebook has (Smith, 2014) 890

million active users per day. Twitter currently has more than 288 million monthly active

users3 and more than 500 million Tweets are sent per day3. Instagram has currently

3 About.twitter.com, (2015). About Twitter, Inc. | About. [online] Available at:

https://about.twitter.com/company [Accessed 29 Apr. 2015].

Page 14: 1112566_Dissertation

14

more than 300 million Instagram users4 which send more than 70 million photos and

videos each day4.

2.2 Adult User Demographic on Social Networking Sites

Figure 1: (PewResearchCenter, 2015), Adult User Demographic on Social

Networking

The user demographic of social networking sites has increased on average year by year.

In Figure 1, a study conducted by (Duggan et al., 2015) Pew Research Centre in

September 2014 among American adults found social networking sites such as

Facebook, have slowed in growth, but other social networking platforms, such as

(Duggan et al., 2015) Twitter and Instagram, saw significant increases over the past

year in the proportion of adults online using social these social networking sites. The

4 300 Million: Sharing Real Moments. (2015). [online] Available at:

http://blog.instagram.com/post/104847837897/141210-300million [Accessed 29 Apr. 2015].

5 CNBC, (2015). CNBC International. [online] Available at:

http://www.cnbc.com/id/100746255?region=world [Accessed 29 Apr. 2015].

Page 15: 1112566_Dissertation

15

study found that (Duggan et al., 2015) 53% of young American adults aged 18-29 use

Instagram, and (Duggan et al., 2015) 49% of Instagram users, use the site daily. The

study found that (Duggan et al., 2015) 36% of adult American Twitter users visit the

site daily, which is a decrease by 10% compared to (Duggan et al., 2015) 2013 where

46% of American adults used the site daily.

Figure 2: (PewResearchCenter, 2015), Social networking site use by ages group,

2005 - 2013

The study found that among all (PewResearchCenter, 2015) American adults in 2014,

who use social networking sites, 26% use Instagram and 23% use Twitter. The study

shows that in (PewResearchCenter, 2015) May 2013, 74% of women were users of

social networking sites, compared with 62% of men. Figure 2 shows an increase in

users on social networking sites between 2005 and 2013. Figure 2 shows that in

September 2013, 90% of internet users between age 18-29 use social networking sites,

Page 16: 1112566_Dissertation

16

compared to 45% of internet users aged 65+, meaning there are 45% more younger

users on social networking sites.

2.3 Mobile Social Networking Usage

The study conducted by (Duggan et al., 2015) Pew Research Centre in September 2014

among American adults found that out of 1954 mobile phone users,

(PewResearchCenter, 2015) 39% of the users are Male and 41% of the users are

Female. It was found that (PewResearchCenter, 2015) 67% of mobile phone users, who

user their phone on social networking sites, are aged between 18-29 compared with

users ages (PewResearchCenter, 2015) 65+, as only 5% of users who use their mobile

phone online. A statistic from August 2014, by a company called We Are Social, stated

that there are (Kemp, 2014) 7.18 billion people on the planet, of the global population

(Kemp, 2014) 2.03 billion or 28% of people are active social media users and of people

using social media networking sites, (Kemp, 2014) 1.56 billion or 22% of the global

population, access social media sites from their mobile phone. The study states of

(Kemp, 2014) 2.03 billion active social networking users, in the last 30 Days from

(Kemp, 2014) August 2014, 271 million users access Twitter and (Kemp, 2014) 1,320

million users accessed Facebook.

2.4 A Comparison of Existing Geo-Location Applications

This study will focus on two existing Geo-location applications which integrate social

networking sites. The first Geo-location application is called oPheme and the second

Geo-location application is called Hootsuite.

oPheme is a social networking monitoring application6, whereas Hootsuite is a social

networking management7 application. oPheme use Geo-location of social networking

sites posts to produce geographical display on a map6 of social networking posts in a

Page 17: 1112566_Dissertation

17

given area. Hootsuite integrate social networking sites7, such as Twitter and Instagram

and integrate them a management application which is used to post to users of social

networking sites and advertise on social networking sites.

oPheme offer two different features, the first been oPheme Discover6, which is used to

discover and monitor social networking posts in a geographical area. oPheme allows for

hashtag searching on Tweets and allows user to share or post Tweets to any user around

the world. oPheme Campaign6 is used to automatically message social networking users

nearby and can monitor when a particular user posts in a given area.

Hootsuite offer an array of different features, the first been it allows users of the

Hootsuite application to engage with users on social networking sites7. Hootsuite

integrates over 35 different social networking sites7 in to its one application. Hootsuite

provides analytics7 of social networking activity, for example, seeing the latest trending

hashtag on Twitter. Hootsuite allows for social media advertising on social networking

sites and can automatically schedule social networking posts7.

2.5 Brief Overview of Design and Functionality in Existing Geo-Location

Applications

Hootsuite

6 Opheme.com, (2015). oPheme | All About oPheme. [online] Available at:

http://www.opheme.com/index [Accessed 29 Apr. 2015].

7 Inc., H. (2015). Home. [online] Hootsuite.com. Available at: https://hootsuite.com [Accessed 29

Apr. 2015].

Page 18: 1112566_Dissertation

18

Hootsuite uses a social media management approach, allowing social networking sites

to be integrated in to the platform. Hootsuite use analytics8 to monitor key words and

trending phrases based on a group or specific user. Hootsuite performs social

networking publishing8, allow users to send posts to multiple social networking sites at

once.

In Figure 3 an example can be seen of Hootsuite’s user interface. The interface is based

upon a tab and tile approach, displaying relevant information based on the tab or tile the

user is currently on. While Hootsuite main aim is to integrate management tools into a

social media platform, Hootsuite doesn’t currently support a Geo-location map interface

allowing for social media to be displayed on the map.

Figure 3: (Hootsuite.com, 2015), Hootsuite UI

oPheme

8 Hootsuite.com, (2015). Home. [online] Available at: https://hootsuite.com/dashboard#/

[Accessed 29 Apr. 2015].

9 Portal.opheme.com, (2015). oPheme | Login. [online] Available at:

https://portal.opheme.com/discover [Accessed 29 Apr. 2015].

Page 19: 1112566_Dissertation

19

oPheme uses a combination of geo-location information from social networking posts,

sentiment analysis9, Klout score9 (popularity online) and a map9, displaying social

networking posts. oPheme has a basic intuitive layout, see Figure 4, allowing users to

navigate the application with ease, while offering more functionality compared to

Hootsuite. The proposed application will follow the approach oPheme has used,

keeping the application simple, but offering features such as pin clustering.

Figure 4: (Portal.opheme.com, 2015), oPheme UI

Page 20: 1112566_Dissertation

20

3.0 Methodology

3.1 Software Development Life Cycle

A software development life cycle (SDLC), describes phases of the software cycle and

the order in which those phases are executed. An example of a SDLC can be seen in

Figure 5. The SDLC always starts by gathering and analysing user requirements, from

there the program is designed, implemented, tested and final deployed, the software

system is then usually maintained and is included in the SDLC.

Figure 5: (Aranya, 2015), Software Life Cycle

The methodology within the SDLC process can vary, such as using methodologies,

such as scrum, waterfall and incremental, but standards such as (DuPaul, 2015)

ISO/IEC 12207 represent processes that establish a lifecycle for software, and provide a

mode for the development and configuration of software systems.

Stage 1: Planning and Requirement Analysis

Page 21: 1112566_Dissertation

21

The planning and requirement analysis stage is a fundamental stage in the SDLC. This

stage entails communicating with the customer to gather basic information about the

desired system and discuss terms of the contractual agreements10. Next follows the

requirement gathering process, gathering detailed information about the required

system. Data collection is carried out using an array of different practises, e.g. studying

the existing or obsolete system and software11, conducting interviews of users and

developers11, collecting answers from the questionnaires11. The requirements are

contemplated and segregated into user requirements, system requirements and

functional requirements. A feasibility study is carried out on purposed system10, 12. This

is done by analysing if a software can be made to fulfil all requirements of the user12,

and whether the project is financially, practically and technologically feasible for the

organization to do. The project can either be accepted or dropped depending on the

finding of the team and the company’s choice. If the project is successful, the developer

team generate a roadmap10 of their plan and select the best software methodology for

the project.

Stage 2: Designing the Program

The next step in the SDLC is to design the program. The design process involves

clearly outlining and defining the requirements of the system. This is done using a

software requirement specification (SRS)10 document which consists of all the product

requirements to be designed and developed during the project life cycle. The product

architects then decide on the best design approach for the project, through a design

document specification (DDS)10. One or more design approaches are stated in the

document, till the team or company decide the best design approach to take for the

project. In the software design stage the customer is communicated with to check

system and user requirements11. The developers produce meta-data12, data dictionaries12,

Page 22: 1112566_Dissertation

22

logical diagrams12, data-flow diagrams and pseudo codes to produce an overlay of the

project12.

Stage 3: Building the System

The next stage of the SDLC is the building the system10. The system is built using the

DDS produced the in the program design stage, which outlines the programming

languages and IDE’s used in the development process10. The developers start to build

and complete the required system.

Stage 4: Testing and Documentation

The next stage in the SDLC is to test and document the built system10. In the SDLC,

testing should be carried out at all stages of development10, rather than one specific

stage. This stage checks for bugs in the code and checks whether the product reaches

the standards defined in the SRS10. Software bugs should be tested by various methods

of testing, such as black box testing13, white box testing13. The system should be

documented throughout the build and design process and before the system is

completed10. This allows for code to be easily maintained and for features to be added.

Stage 5: System Deployment and System Maintenance

The final part of the SDLC is system deployment and system maintenance. This phase

is used to train the user on the system11, or supply the documentation produced in order

to user or maintain the system. The software is maintained by updating features in the

system or updating obsolete code10, 11. This phase may produce hidden bugs and real-

world unidentified problems previously undiscovered in the design, planning or

requirement analysis stage.

Page 23: 1112566_Dissertation

23

10

3.2 Software Methodologies

A software development methodology or a system development methodology when

used in software engineering, is a framework that is used to structure, plan, and control

the process of developing an information system15. There are many different

methodologies, each offering a different route to achieve the overall outcome of

creating an end product. The different software development methodologies which are

described below are: Waterfall model, Incremental model and Agile model.

Waterfall Model

A Waterfall methodology was first founded by (Habib, 2013) Winston Royce's, in1970,

in the IEE paper "Managing the Development of Large Software Systems”. The

Waterfall model, or sometimes referred to as a linear-sequential life cycle model15.

(Chapman, 2015) The water fall model says that each phase must be completed fully

before the next phase can begin14. (Chapman, 2015) At the end of each phase a review

is completed, which determines if the project is heading down the correct path, or

whether the project needs to be changed or dropped altogether. (Chapman, 2015) One

keep rule of the Waterfall methodology is, no phases should overlap, and meaning only

one phase can be takes at any one time14. This type of model should only be used for

small projects, where there will be no change in requirements. This can be seen in

Figure 6.

10 Tutorialspoint.com, (2015). SDLC - Overview. [online] Available at:

http://www.tutorialspoint.com/sdlc/sdlc_overview.htm [Accessed 29 Apr. 2015].

15 IT Info, (2015). Software Development Methodologies. [online] Available at:

http://www.itinfo.am/eng/software-development-methodologies/ [Accessed 29 Apr. 2015].

Page 24: 1112566_Dissertation

24

111213

Figure 6: WaterFall15

The advantages of using a Waterfall model is, it’s simply and easy to understand with

clear rules to follow. Waterfall models work well for smaller projects14, where

requirements are easy to understand and do not change. Waterfall does not allow for

multiple phases to overlap meaning a team can focus on one specific phases at any

given time14.

11 Istqbexamcertification.com, (2015). What are the Software Development Life Cycle (SDLC)

phases?. [online] Available at: http://istqbexamcertification.com/what-are-the-software-development-

life-cycle-sdlc-phases/ [Accessed 29 Apr. 2015].

12 Tutorialspoint.com, (2015). Software Development Life Cycle. [online] Available at:

http://www.tutorialspoint.com/software_engineering/software_development_life_cycle.htm [Accessed

29 Apr. 2015].

13 Tutorialspoint.com, (2015). Software Testing - Methods. [online] Available at:

http://www.tutorialspoint.com/software_testing/software_testing_methods.htm [Accessed 29 Apr.

2015].

Page 25: 1112566_Dissertation

25

The disadvantages of using a Waterfall model is, once in the testing stage of Waterfall,

it can be very difficult to go back and change something, or add something new to the

project14. Waterfall methodology is not a model for complex projects and does not

integrate well with object-oriented programming (OOP) projects14. Lastly, a Waterfall

methodology does not produce any working prototypes till very late in the

methodology, making it difficult to conceptualise problems the program could have in

the real world.

A waterfall methodology should only be used on projects if the project is short14, the

project is not subject to change in requirements and the technology used is understood

by the team14. 14

Incremental model

An incremental model is a model which is divided into multiple development cycles,

making the life cycle like a (Istqbexamcertification.com, 2015) “multi-waterfall” cycle.

Cycles are divided up into smaller, easier manage modules.

(Istqbexamcertification.com, 2015) Each of the different modules pass through the

requirements, design, implementation and testing phases. A working version of the

software or product is produced during the first module, allowing for a working

prototype in the early stages of development.

14 Istqbexamcertification.com, (2015). What is Waterfall model- advantages, disadvantages and

when to use it?. [online] Available at: http://istqbexamcertification.com/what-is-waterfall-model-

advantages-disadvantages-and-when-to-use-it/ [Accessed 29 Apr. 2015].

Page 26: 1112566_Dissertation

26

Figure 7: Incremental Life Cycle

An incremental model, seen in Figure 7, shows multiple cycles of the development

process, (Istqbexamcertification.com, 2015) each time the cycle is done, a new piece of

functionality is added or removed from the product or software. (Tilloo, 2013) The

Incremental model is broken down to produce a list of core features. The first increment

cycle is the core features of the application, the other increment cycles which follow are

supplementary features. (Tilloo, 2013) The core product is evaluated by the client,

allowing the client to add or remove features where necessary. A development plan is

then produced for the future development cycles. This method continues throughout the

development process.

The advantages of an incremental model is it (Tilloo, 2013) generates working software

quickly and early during the software life cycle allowing for testing to be carried out on

features produced. (Istqbexamcertification.com, 2015) The incremental model, it allows

for the customer to evaluate each build and each evaluation produces a new

development plan for future interactions. (DuPaul, 2015) The incremental model makes

it easier to manage risk because risky pieces are identified and handled during each

iteration of the incremental model. .

Page 27: 1112566_Dissertation

27

The disadvantages of an incremental model is a (Tilloo, 2013) clear and complete

definition of the whole system before it can be broken down and built incrementally,

which is time consuming and relies on a good understanding of the system

requirements. In the incremental model (Istqbexamcertification.com, 2015) each phase

of an iteration is rigid and do not overlap each other, therefore producing time

consuming results as testing can’t be carried out until the phase is completed. (Ghahrai,

2015) As additional functionality is added to the product or software, problems may

arise related to the system architecture or design which were not evident in earlier

prototypes, resulting in fragile code or an unstable system.

An incremental methodology should be used when (Istqbexamcertification.com, 2015)

requirements of the complete system are clearly defined and understood, there is a need

to get the product to market early.

Agile Framework - Scrum

Agile software development is a framework for undertaking software development

projects. There are a number of different agile software development methodologies,

e.g. Crystal Methods, Dynamic Systems Development Model (DSDM), and Scrum. A

Scrum methodology will be the focused upon. Agile frameworks, such as Scrum use a

short development period, called iterations, which usually last 2-4 weeks. Each iteration

can add or remove new features to the project and includes all necessary tasks such as

planning, requirements analysis, design, coding, testing, and documentation. At the end

of each iteration, the team revaluates project priorities.

Scrum was first defined as (Habib, 2013) "a flexible, holistic product development

strategy in 1986 by Hirotaka Takeuchi and Ikujiro Nonaka. Then in (Itinfo.am, 2015)

1995, Sutherland and Schwaber jointly presented a paper describing the Scrum

Page 28: 1112566_Dissertation

28

methodology. (Habib, 2013) Scrum is facilitated by a scrum master, who is not the

leader of the team, but rather the scrum master has the primary job is to remove

problems or issues which could affect the team’s ability of the team to deliver the sprint

goal.

Scrum enables and encourages the creation of (Itinfo.am, 2015) self-organising teams to

communicate in a verbal and graphical manner to all team members, from all

disciplines who are involved in the project. Scum defines members of the scrum by

their roles; (Habib, 2013) product owner, development team, scrum master,

stakeholders and managers.

Figure 8: (Istqbexamcertification.com, 2015), Scrum Lifecycle

A sprint lasts 2-4 weeks and in that scrum iteration, the team focuses on one issue and

does not deviate. (Itinfo.am, 2015) A brief daily meeting (called a scrum), is where

progress is reviewed and explained, upcoming work is described, and obstacles are

raised. (Itinfo.am, 2015) After each sprint all team members reflect about the past

sprint. New sprint goals are decided and the team focuses again till the sprint is

completed.

Page 29: 1112566_Dissertation

29

The advantages of a scrum methodology is (Habib, 2013) customer satisfaction by

rapid, continuous delivery of software, which can be tested and demonstrated to the

customer as a working prototype. A scrum produces working software which is

delivered frequently, usually in weeks rather than months. (Habib, 2013) Scrum allows

close, daily cooperation between business people and developers, allowing the

developers to understand the needs of the customer and software.

The disadvantages of a scrum methodology is, (Istqbexamcertification.com, 2015) large

software projects can make it difficult to assess the effort required at the beginning of

the software development life cycle, thus making the process time consuming and may

lead to poor understanding of the project by the team. (Istqbexamcertification.com,

2015) The project can easily get taken off track if the customer is not clear on what

final outcome of the project is. There is lack of emphasis on documentation in the

project making the project satiable to documentation issues in the future.

An Agile framework should be used when new changes are needed to be implemented

regularly. The freedom of agile allows for changes to be implemented at little cost

because of the frequency of new increments that are produced.

(Istqbexamcertification.com, 2015) Unlike the waterfall mode, the agile framework

allows for limited planning to get started with the project. Agile allows for changes to

be discussed and features or removed based on customer feedback. This in turn

produces the finished product which the customer requires.

3.3 Application Overview

The application will be designed to integrate social networking and Geo-Location into a

map to produce a 2D map of social network posts in a given location. The application

will pull the posts from the social networking site, based on the coordinates of the post.

Page 30: 1112566_Dissertation

30

The application will make use of map integration, social network integration and

application design to meet the overall aims and objectives of the project.

3.3.1 Map API integration, Pin Clustering and Geo-Fencing

The application will integrate a map using a map API. The map is used to display the

location of the posts and the content of the post received from the social networking

site. The map will allow display the user location and allow the user to interact with the

map. Pin clustering will be used, allowing for a large number of pins to be clustered

together on the map. This will be used as an esthetical feature, to stop the map showing

to much information. Geo-Fencing will be used in the application to allow the user to

limit where a search should be carried out on the map. This will result in posts in the

given Geo-location been displayed on the map.

3.3.2 Social Network Integration

The application will integrate two social networking sites, Twitter and Instagram. The

application will allow the user to authenticate with the two different social networking

sites, and gain access to the social networking sites user posts. The posts will be

displayed on a map based on the geo-location the user specified.

3.3.3 Database Integration

The application will integrate a database which will be used to store user information

and data from the social networking sites. This will allow the application to work

‘offline’ and allow the user to register and sign to use the application.

3.3.4 Hardware and Software Required to Build the Application

The application will be designed and developed using Android Studio. The Android

Studio is an IDE provided by Google to develop Android application. The IDE uses

(Developer.android.com, 2015) Gradle-based build system, (Developer.android.com,

Page 31: 1112566_Dissertation

31

2015) prebuilt code templates, (Developer.android.com, 2015) rich layout editor with

support for drag and drop theme editing and (Developer.android.com, 2015) lint tools to

catch performance, usability, version compatibility issues. The Application will tested

on an emulator and a physical Android device. (Developer.android.com, 2015) The

emulator is provided as part of Android studio and allows the application to be tested on

a range of different devices. The application will be built and ran on a physical Android

device, allowing for real world testing.

4.0 Implementation and Results

4.1 Android Platform and Android Applications

Android is a mobile platform was invented in (Ipwatchdog.com, 2015) 2003 by four

people, Andy Rubin, Rich Miner, Nick Sears and Chris White, who established a

company called Android Inc. in Palo Alto, California. (Ipwatchdog.com, 2015) In

August 2005, Android Inc was acquired by Google, who then developed the Android

platform delivering (Google, 2013) 10 different version of Android to date. The

Android platform architecture is based up 5 core components, as seen in Figure 9.

Page 32: 1112566_Dissertation

32

Figure 9: (John, 2015), Android OS Model

Linux Kernel

The (John, 2015) Linux kernel is the core foundation for the whole Android OS

architecture. The Linux Kernel is not distribution of Linux rather just a foundation for

the Android OS. (John, 2015) The kernel is used to interact with the hardware on the

device and contains all the essential hardware drivers. The Linux kernel acts as an

abstraction layer between the hardware and other software layers.

Libraries

Page 33: 1112566_Dissertation

33

Android uses native libraries, which are used to handle the different type of data. (John,

2015) The libraries are written in c or c++ language and are specific the particular

device hardware. An example of the native libraries include, (John, 2015) Surface

Manager, which is used for compositing window manager with off-screen buffering,

(John, 2015) Media framework: which provides different media codecs allowing the

recording and playback of different media formats, (John, 2015) SQLite: which is used

in android for data storage purposes, (John, 2015) WebKit: a browser engine used to

display HTML content and (John, 2015) OpenGL: Used to render 2D or 3D graphics

content to the screen.

Android Run time

Android runtime is a Dalvik Virtual machine, which is used in android devices to run

apps and is optimized for (John, 2015) low processing power and low memory

environments. The Dalvik VM allows multiple instance of (John, 2015) Virtual

machine to be created simultaneously (John, 2015) providing security, isolation,

memory management and threading support. Core Java Libraries provide most of the

functionalities defined in the Java SE libraries.

Application Framework

The application framework manages (John, 2015) devices resource management and

voice call management. Important parts of the application framework are as follows:

(John, 2015) Activity Manager, Content Providers, Telephony Manager, Location

Manager and Resource Manager.

Android Apps

Applications are the top layer in the Android architecture. Application is where

developer can created and run application on the Android platform. This is where the

Page 34: 1112566_Dissertation

34

created application will run on the device. (Fundamentals, 2015) Android apps are

written in the Java programming language. Application run under the suffix of an

Android package (APK), which is the format in which application are ran in the

Android environment.

4.2 Implementation Overview

The implementation stage marks how the application was implemented and the type of

technologies needed and used in order to create the application. The application ingrates

Google maps, Twitter, Pin clustering, SQLite Instagram and different design features in

order to create the application.

4.3 Map Integration

The application has been designed to implement a map API. The map API which has

been chosen is the Goggle Maps API. The reason Google maps has been chosen to

implement a map in the application is because it includes core features, such

as; Customize markers and info windows, gesture Control, tilt, rotate and zoom and

location services. Google Maps is well documented, thus making the map integration

easy to maintain. Google maps integrates seamlessly with android, thus making it easy

to add new map features.

In order to implement Google Maps, an authentication method is used. The method

involves receiving and storing a unique key in the application. The key is used in order

to access Google Maps to send and receive data from Google Maps. Google Maps uses

external libraries in order access features which can be implemented by Google

Maps. Google Maps can implement a different types of maps, including; 2D and 3D

maps, but also terrain maps, displaying the landscape of a given area.

Page 35: 1112566_Dissertation

35

Figure 10: Google Map

In Figure 10 in the implementation of Google Maps can be seen. In the application

Google Maps operates in a standard 2D view. A 2D view is used due to the simplistic

view of the map, while showing detailed views of the landscape, without the

terrain. Google maps is implemented so when the application loads and opens, the map

is displayed and shows the area of Cambridge with a zoom level of 11, thus displaying

the entire area of Cambridge. The map implements location services, showing the

location of the user at any given time, via the users GPS coordinates. This will be used

when implementing Geo-fencing as a geo-fence will be created around the user at the

current time. The map implements the gesture Control, tilt, rotate and zoom allowing

Page 36: 1112566_Dissertation

36

for the map to navigated, thus allowing the users to move around the map and access all

the pins on the map at any given time.

4.4 Pin Clustering

Google maps implements pin clustering, which allows for pins to be clustered. This is a

built in feature of Google maps using the same external libraries as Google Maps. Pin

clustering uses a MarkerCluster array and a MarkerManager. The MarkerCluster array

stores the coordinates of the pins which can then be accessed via the MarkerManager.

The MarkerManager is used define what markers are displayed and the visibility of the

markers at different zoom levels.

Figure 11: Pin Clustering Example

In Figure 11 an example of pin clustering can be seen. Pin clustering was implemented

in earlier version of the application, but as the social networking data was retrieved by

the application, pin clustering failed to function correctly. Pin clustering occurs based

Page 37: 1112566_Dissertation

37

on the zoom level on the map. The zoom level is currently maintained by the pre-set

values in the MarkerManager. As the map zooms out, pin clusters change to a larger

clusters of pins, which contains many sub clusters. As the map zooms in, larger pin

clusters become smaller clusters of pins, this continues till individual or a small group

of pins can be seen on the display. This can be seen in Figure. Google Maps allows for

custom pin clustering icons as well as custom pin icons. In the current application the

default for both pin and cluster icons are as default as they meet the functional design

needs of the application.

4.5 Custom Information Window

Google maps allow for customized information windows, when pins are selected.

Custom information windows are used to display the contents of the post received from

the social networking sites. Custom information widows can be customized by their

contents of what is displayed but also the look of the window. A standard custom

window is used in the application to display the contents of the social media posts the

application receives. An information window is a built using the standard libraries

which are used in order to build and create the Google Map.

Page 38: 1112566_Dissertation

38

Figure 12: Tweets displayed on a map

As can be seen in Figure 12 the contents of the widow contains the, username of the

user and tweet information. The information recurved from the social networking sites,

is then displayed in the information windows of the application. As a user selects a pin,

the information windows opens and closes, depending on whether a new pin is selected

in the application. Both the pins and information windows are created dynamically.

This is due to pins only displaying in a given area, based on the coordinate information

of the post received from the social networking sites. The dynamically created pins can

be seen in Figure 13.

Page 39: 1112566_Dissertation

39

Figure 13: Dynamic pins on a map

4.6 Geo-Fencing

One objective of the application was to implement a Geo-Fencing feature. Geo-fencing

would be used to display the posts from social networking sites in a given area,

therefore geo-fencing would limit the amount of results on the map. A Geo-fencing was

not implemented in the application due to time constraints in implementing the

application.

Geo-fencing would have been implemented in the application by creating a dynamic pin

in the application. The geo-fence would be created with the pin at the centre. The geo-

fenced would have been displayed on the screen by a circle and the diameter of the

circle would be adjusted accordingly with the use of a slider in the application. The

application would then only display and retrieve results in the geo-fenced area.

Page 40: 1112566_Dissertation

40

4.7 Social Network Integration

The application integrates social networking sites which are used to retrieve the posts

from users on the sites. The social networking sites which the application will use are

Twitter and Instagram. Facebook has not been implemented due to (Facebook

Developers, 2015) Facebook doesn’t allow posts to be retrieved from all users on

Facebook and limits the posts retrieved to people who the given user is friends with on

the site.

Twitter and Instagram allow posts to be retrieved and used by the application, and

nether Twitter or Instagram rely on the application user been friends with the user on

the social networking site.

4.8.1 Twitter Integration

Twitter Integration is used retrieve Tweets from Twitter and displays them in the

application. Twitter provide an API called Fabric. The Fabric API can be used to make

requests to Twitter and is based up on the oauth libraries which are used in the

authentication process.

The application integrates with Twitter to allow the application to retrieve Tweets from

Twitter. In order to do this, the application uses a Twitter API called Fabric. Fabric is

used to integrate Twitter functionality into the application. Fabric API is used by the

application to embed Tweets and log in with Twitter. The process of logging in with

twitter and authentication.

In order to be granted authentication from Twitter, the user signs in via the Twitter

login page in the application. If successful authentication is granted by Twitter, the

application is parsed a Key and Secret, which is unique to the authenticated user. The

Key and Secret is then parsed back to Twitter to gain access to Tweets on Twitter. The

Page 41: 1112566_Dissertation

41

key and secret are stored in the application, thus stopping the user authenticating

Twitter in the future.

In Figure 14, an example of the data which Twitter can parses in a Json format can be

seen. The application requests the data highlighted by red boxes in Figure 14. The data

the application uses is, timeline ID, screen-name, coordinates of the Tweet and the body

of text in the Tweet. The application limits the Tweets received based on the since_id

from Twitter. This is used to limit older tweets been displayed in the application.

Page 42: 1112566_Dissertation

42

Figure 14: (Dev.twitter.com, 2015), Twitter, Rest API

When the application receives the required information from Twitter, the application

displays the Tweets using a custom information window and a pin on the map. In

Figure 15 the Tweet information can be seen. In order for new tweets to come through

the application must send a request back to Twitter to check for new Tweets. This has

Page 43: 1112566_Dissertation

43

not been implemented in the application due to time constraints when creating the

application.

Figure 15: Tweets displayed on a map

The Twitter login and authentication process can be seen above. The application

displays the log in screen, which can be seen in Figure 16, this allows the user to

authentication their credentials with Twitter. Once the user has authenticated with

Twitter, the application displays the users key and secret to the screen and stores the

key and secret in the database, which can be seen in Figure 17. The on screen key and

secret are displayed for testing purposes only.

Page 44: 1112566_Dissertation

44

Figure 16: Twitter Login

Figure 17: Twitter , key and secret

Page 45: 1112566_Dissertation

45

A set back in the implementation of the application came by integrating Twitter and the

application. The application parsed the secret and key to Twitter, Twitter failed to

authenticate with the application, producing a 403 error. It was found the Fabric

authentication key and secret was incorrect and the request to twitter had not been

formatted correctly, thus producing the 403 error. The error was overcome by hard

coding the key and secret into the application, and changing the order and the function

of the requested information to Twitter. The application is therefore currently limited to

one user to authenticate with Twitter, but does evidence that Twitter and Google maps

can be integrated successfully.

4.8.2 Instagram Integration

One object of the application is to integrate Instagram with the application. Due to time

constraints this objective was not achieved. The application allows the user to sign in

with Instagram, but does not use the authentication information revived from Instagram

to achieve anything. Instagram can be added in the future as the authentication process

and implementation process is the same as Twitter.

To achieve the Instagram sign in process, Instagram uses oauth libraries to achieve this

outcome. The (Instagram.com, 2015) oauth 2.0 libraries are external libraries which are

used to authenticate with Instagram. The authentication process requires the user to sign

into Instagram via the application; the access token is the captured and received by the

application via the URL. The access token is then stored in the application or can be

used to access Instagram.

Instagram parses information using Json allowing a similar coding format as

implemented by Twitter. Information which can be requested from Instagram would be,

user ID, username, post information including text and picture. The received

Page 46: 1112566_Dissertation

46

information form Instagram would be implemented using a custom information window

and the coordinate of the post, which would be displayed as a pin on a Google map. An

example of information which Instagram sends can be seen in Figure 18.

Figure 18: (Instagram.com, 2015), Json example from Instagram

The Instagram login and authentication process can be seen below. The application

displays the log in screen, which can be seen in Figure 19, this allows the user to

authentication their credentials with Instagram. Once the user has authenticated with

Instagram, the application displays the users key and secret to the screen, which can be

seen in Figure 20. The on screen key and secret are displayed for testing purposes only.

Figure 19: Instagram Authenication

Page 47: 1112566_Dissertation

47

Figure 20: Instagram key

4.9 User Interface Design and XML

The application implements a simplistic user interface. The application uses a

combination of different user interface (UI) elements to achieve this. Fragments are

used allowing the user to slide between different screens in the application, allowing for

a simple navigation approach towards the application. A sliding menu is used to allow

navigation between the map and social media authentication screen. This allows the

application to separate the different screens, while also maintaining a fluid navigation.

Buttons, text fields and tick boxes are used in the application allowing the user to

navigate the application or submit information to the application. An example of the UI

can be seen in Figure 21.

Page 48: 1112566_Dissertation

48

Figure 21: UI example from application

The user interface has been designed using XML. XML achieved this by allowing UI

features to be changed and placed according to the design layout of the application.

XML allows for UI features to be placed and changed in the application, this includes

but is not limited to, size of UI objects, the placement of the UI object on the screen.

XML is used only for aesthetic purposes in the application and doesn’t provide

functionality to the application.

4.10 Database and SQL integration

The application integrates a database using an external library. The database library

used is SQLite. SQLite was chosen due an external library existing, and because of the

ease in which SQLite can be integrated with Android. SQLite is used to store

information during the registration process of the application, and retrieve user’s

information during the sign in process. SQL is used by the application to query data in

Page 49: 1112566_Dissertation

49

the database. During the registration process the application stores information about

the user, this includes: username, password, full name, email address and phone

number. The registration process uses a select and insert query, a select query is used to

check if the users already exists in the database and the insert query is used to store the

new user’s registration details. The stored information is used in the sign in process.

The application queries the users, username and password, before allowing access to the

application. The sign in process uses a select query to check if the users is registered in

the database.

The database is used to store the user’s key and secret which it receives from Twitter in

the authentication process. The key and secret are stored alongside the user’s user ID in

the database, linking Twitter to the specific user. The key and secret is then used to

retrieve the user’s home time line from twitter and display it on the Google map. The

process uses an insert query and select query to firstly store the key and secret in the

database, and to pass the secret and key to Twitter as authentication.

4.11 Coding Principles and Field Validation

In the implementation of the application, coding principals have been followed in order

to create solid code. The first coding principle is called SOLID. The (Carr, 2015)

SOLID acronym was introduced by Robert Cecil Martin. Each letter represents another

three-letter acronym that describes one principle. The (Carr, 2015) Single

Responsibility Principle (SRP) states that there should never be more than one reason

for a class to change. This principle has been achieved in the application by having

classes only performing on function, such as registration, database interaction using

SQL. (Carr, 2015) The Open/Closed Principle (OCP) specifies that software entities

(classes, functions,) should be open for extension but closed for modification. This

principle has been achieved by allowing a class such as the alert box class to be allowed

Page 50: 1112566_Dissertation

50

to be open, meaning implementing new features, but closed as the code has not been

modified since testing. (Carr, 2015) The Liskov Substitution Principle (LSP) states that

"functions that use pointers or references to base classes must be able to use objects of

derived classes without knowing it". This has been achieved by such classes as

registration class, calling the alert box or toast class, as neither classes depend on each

other, therefore classes can be changed without affecting each other. (Carr, 2015) The

Interface Segregation Principle (ISP) specifies that clients should not be forced to

depend upon interfaces that they do not use. Each class in the application only depends

on one Interface, therefore limiting the amount of interfaces one class shares. Thus

maintain robust code. (Carr, 2015) The Dependency Inversion Principle (DIP) makes

two statements. The first statement is that high level modules should not depend upon

low level modules. Both should depend upon abstractions. The second part of the rule is

that abstractions should not depend upon details. Details should depend upon

abstractions. This coding principle has not been followed throughout due to some high

level class’s dependent on low level classes.

The application follows a logical naming system. The logical naming system applies to,

class names, variable name and methods. The logical naming system follows the

principle that variable name, methods and classes should be named based on their

function or result. This principle allows for code to be easily maintained and makes the

code more robust thus allowing for new features to be implemented in the future.

The application uses field validation to check user input. The field validation check the

contents of the field, making sure the field is in the correct format for the database and

to check whether the fields is blank on the registration screen. This is carried out before

the users information is inserted into the database as the incorrect format of a field

could corrupt the database. In later version of the application, field validation will be

Page 51: 1112566_Dissertation

51

used to check for erroneous characters which could be used for SQL injection into the

database.

Page 52: 1112566_Dissertation

52

4.12 Testing

Table 1: Testing the core features of the application.

Test

ID

Purpose of Test Test Prediction Test Outcome Test Evidence

1 Does the application register

the user

The application registers the

new users successfully

The application registers the new

user and allow the user to sign into

the application, as seen in figure

Page 53: 1112566_Dissertation

53

Page 54: 1112566_Dissertation

54

2 Does the application sign in

the user

The application allows the

user to sign in successfully.

The application allows the user to

sign into the application and loads

the correct screen, as seen in figure

Page 55: 1112566_Dissertation

55

Page 56: 1112566_Dissertation

56

3 Does the application Display

the map

The application will display

the Google map.

The application displays the

Google map and allows the map to

be interacted with.

Page 57: 1112566_Dissertation

57

4 Does the application allow

for Twitter authentication

The application will

authentication the user with

Twitter and display the users

key and secret.

The application allows the users to

sign in to Twitter, and displays the

users key and secret in a message

box.

Page 58: 1112566_Dissertation

58

Page 59: 1112566_Dissertation

59

5 Does the application allow

for Instagram authentication

The application will

authentication the user with

Instagram and display the

users key and secret.

The application allows the users to

sign in to Instagram, and displays

the users key and secret in a

message box.

Page 60: 1112566_Dissertation

60

Page 61: 1112566_Dissertation

61

6 Does the application display

Twitter pins on the map

The application displays the

Twitter pins on to the Google

map.

The application displays the pins

on the Google map using the

location received from the Tweet.

Page 62: 1112566_Dissertation

62

7 Does the application allow

Twitter pins to be interacted

with

The application allows the

user to interact with the pins

on the Google map.

The application allows the pins to

be interacted with on the Google

map.

Page 63: 1112566_Dissertation

63

8 Does the application display

Tweet information when a

pin is selected

The application displays the

Tweet information when a pin

is selected.

The application displays the tweet

information when one of the pins

on Google map is selected by the

user.

Page 64: 1112566_Dissertation

64

5.0 Discussion

5.1 Overview of Social Networking Sites

Social networking sites are increasing in size and currently account for 31.24% of

internet traffic in 2014. Social networking sites such as Twitter, currently have more

than (About.twitter.com, 2015) 288 million monthly active users and more than

(About.twitter.com, 2015) 500 million Tweets are sent per day, and Instagram currently

have more than (300 Million: Sharing Real Moments, 2015) 300 million Instagram

users which send (300 Million: Sharing Real Moments, 2015) more than 70 million

photos and videos each day. With such rapid user growth in social networking sites,

social networking sites could become exploited by hackers and companies to access the

data which social networking sites hold on their users.

5.2 Social Media Monitoring

Social media monitoring is a (Janssen, 2015) process of using social media sites to

track, gather and mine the information on certain individuals, groups or companies.

There are different types of social media monitoring, the first been (The Future Place

Blog, 2015) ‘Counts’. Counts are used to count how often a term or phrase is used on

social networking sites. The second is (The Future Place Blog, 2015) ‘Trends’, which is

similar to counts. Trends look at terms or phrases used online and measure how often

popular they are online and to see if it can be linked to other events. The third is (The

Future Place Blog, 2015) ‘Sentiment Analysis’, which is used to examine a phrase,

keyword or conversation for the sentiment of the social networking post. (The Future

Place Blog, 2015) Sentiment analysis can use a combination of automated techniques,

applying a variety of algorithms and external libraries to match the correct sentiment to

the social media post. The Forth is (The Future Place Blog, 2015) ‘Social Influence’,

Page 65: 1112566_Dissertation

65

using a combination of Trends and sentiment analysis to monitor what a user is posting

about online, then providing targeted marketing to the specific user who is popular

online, resulting in the influential user passing the message to other users online. (The

Future Place Blog, 2015) One issue appears with using a social influence approach, it

removes the privacy and anonymity of a user online resulting in the user been aware

that they are been subject to targeted advertising.

Social media monitoring platforms such as Hootsuite and oPheme use different similar

to monitor social media activity. (Inc., 2015) Hootsuite monitors users online by using a

combination of geo-location and tracking key words used by users online. oPheme use a

combination of Geo-location and trending words such as hashtags, counts, social

influence and sentiment analysis. While the current version of the application does not

currently implement any monitoring aspects, due to the ethical issues this could raise,

such social monitoring could be implemented on the data received by the application,

thus resulting in users been stalked online and violations of user privacy.

5.3 Big Data and Data Mining

Big Data is defined by the (Sas.com, 2015) three V’s, Volume, Velocity and Variety.

Within the basis of the three V’s big data is defined as, structured, semi-structured and

unstructured. (Sas.com, 2015) The volume of big data relates to the amount of data

captured or stored and can range from Gigabytes to Petabytes of data. (Sas.com, 2015)

The velocity of big data, relate to the speed in which the data is captured or and reacting

to the amount of data been stored or used can present a large problem for companies.

(Sas.com, 2015) The Variety of data captured or strolled in terms of big data, relates to

the type of data which is captured and stored by companies, this could range from large

pierces of data such as photos to smaller data such as social networking posts.

Page 66: 1112566_Dissertation

66

As big data increases in size, so does the need to search through the data. Data mining

is used to do this. (Statsoft.com, 2015) “Data Mining is an analytic process designed to

explore data in search of consistent patterns and systematic relationships between

variables, and then to validate the findings by applying the detected patterns to new

subsets of data”. The goal of data mining is to find patterns and use these patterns to

predict future patters within the data. The process of data mining consists of

(Statsoft.com, 2015)three stages: initial exploration of the data, model building or

pattern identification with validation/verification of the searched data and finally

deployment of the result found. A recent report states that unstructured big data will far

exceed structured data according to (SearchBusinessAnalytics, 2015) "IDC Enterprise

Disk Storage Consumption Model" released in 2009, accounting for a compound annual

growth rate (SearchBusinessAnalytics, 2015) (CAGR) of 61.7% for unstructured data

within a company’s annual data intake.

Data mining presents issue for application such as oPheme and the application created

in this project. As either of the application are used, data from social networking sites is

received by the application and displayed on the device. An application such as oPheme

could be used to capture receive data from social networking sites and the received data

could be stored locally on the device or sent to a server farm. The data could be data

mined to find peoples personal information, such as: likes, dislikes, personality traits,

location of residence, age. Such personal information could be used to target specific

user to steal a user’s identity by through the methods of data mining and looking for

(Statsoft.com, 2015) patterns with in the user’s data and making prediction about the

user, such as when they are at work and when they are at home.

Page 67: 1112566_Dissertation

67

5.4 Ethical Issue and Moral Issues of Geo-Location Applications

The application and oPheme may operate in a legal manner, but such application as the

one created or oPheme do generate ethical and moral issues. The first ethical issues

both applications raise is an ethical issue of trust and dishonesty. The ethical issue of

dishonesty is raised as users of social networking sites expect to post information to

their friends on social networking sites. Social networking sites, such a Twitter and

Instagram attribute to the ethical issue of dishonesty by allowing third part application,

such as this application and oPheme to access user data.

As applications such as (Opheme.com, 2015) oPheme access a user’s post information

and display it on a map, users post information can be clearly be seen along with the

user location. oPheme could be used to stalk users online due to oPheme displaying

user post information on a map. The post information is updated on the map, showing

when the user sent the post and whether they sent it from, this could be used to track the

user through by searching for the posts sent by the user. Neither oPheme nor the created

application give feedback to users on the social networking sites about the location of

the post been accessed and displayed on a map. This behaviour from oPheme and the

created application creates a violation of trust to social networking users.

oPheme and the created application pose a question of: Is it morally correct to follow

people where ever they go? The definition of morality is, (TheFreeDictionary.com,

2015) the quality of being in accord with standards of right or good conduct. With this

definition, a basis can be drawn of whether an individual user of oPheme or the

application feel it is morally correct to follow user, therefore an it is the choice of the

individual user, no direct conclusion be based on the stated question above.

Page 68: 1112566_Dissertation

68

One other issue of such an application as the one created or oPheme is the issue of

potential threats to users. The designed application, proves that social networking sites

can be integrated successfully with Google maps. As data on social networking sites

can be displayed on a map, and the location of every users posts can be display on a

map, such an application existing in the real world could produce threats to users in the

form of stalking or harassment.

6.0 Conclusion

The first aim of the project was to compare and contrast existing Geo-location

application designs. This has been achieved in section 2, part 2.5 of the project. A

comparison of existing geo-location application, Hootsuite and oPheme, has been

achieved by studying the functionality and design of each of the applications and the

design. From this a methodology was produced based on the studied applications and

the design, listing desirable features for the application which to be implemented.

The second aim of the application was to design and develop an Android application

capable of placing Social Media on Google Maps. This has been achieved in section 4

of the project. The project integrates Twitter, Instagram and Google maps, displaying

the geo-location of social networking and the contents of the social networking posts on

a map. While the application integrates Instagram, the application only allows user

authentication with Instagram. In the future Instagram could be implemented in a

similar way to Twitter, allowing the application to access the user’s posts on Instagram.

The application doesn’t support Geo-location at present, resulting in application pulling

any post from Twitter and displaying it on the map. This feature could be implemented

in the future. The application does prove that social networking sites can be

Page 69: 1112566_Dissertation

69

successfully integrated with Google maps to display the geo-location and contents of

social networking posts.

The third aim of the application was to assess the potential threat to users and ethical

issues such an Application might raise. This has been achieved in section 5 of the

project. The project discusses the implications of an application existing and the

implications of geo-locations applications which is exist in the market today, Hootsuite

and oPheme. The project discusses the use of big data and data mining and how the

application could be used to mine user’s data. The project discusses the ethical and

moral implications of using such an application and about the types of social media

monitoring the application could implement and the types of social monitoring features

existing application implement and how these could be used against a user on a social

networking site.

7.0 References

7.1 Code

[closed], A. (2015). Android Map api v2 Custom marker with ImageView. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/14811579/android-map-api-v2-custom-marker-

with-imageview [Accessed 29 Apr. 2015].

2, S. (2015). Set Image from drawable as marker in Google Map version 2. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/18053156/set-image-from-drawable-as-marker-

in-google-map-version-2 [Accessed 29 Apr. 2015].

Acnenomor.com, (2014). ERROR:'keytool' is not recognized as an internal or external

command, operable program or batch file - acnenomor.com. [online] Available at:

http://www.acnenomor.com/4796632p1/errorkeytool-is-not-recognized-as-an-

internal-or-external-command-operable-program-or-batch-file [Accessed 17 Dec.

2014].

android?, C. (2015). Change the Color of Marker Option in android?. [online]

Stackoverflow.com. Available at:

Page 70: 1112566_Dissertation

70

http://stackoverflow.com/questions/22145646/change-the-color-of-marker-option-

in-android [Accessed 29 Apr. 2015].

AndroidBegin, (2012). Android Button Click New Activity Example - AndroidBegin.

[online] Available at: http://www.androidbegin.com/tutorial/android-button-click-

new-activity-example/ [Accessed 17 Dec. 2014].

AndroidBegin, (2012). Android Button Click New Activity Example - AndroidBegin.

[online] Available at: http://www.androidbegin.com/tutorial/android-button-click-

new-activity-example/ [Accessed 17 Dec. 2014].

Automateddeveloper.blogspot.co.uk, (2014). Thoughts on Development & Design:

Android & Twitter - OAuth Authentication Tutorial. [online] Available at:

http://automateddeveloper.blogspot.co.uk/2011/06/android-twitter-oauth-

authentication.html [Accessed 17 Dec. 2014].

b2cloud, (2014). Instagram integration in an Android app.. [online] Available at:

http://b2cloud.com.au/uncategorized/instagram-integration-in-an-android-app/

[Accessed 17 Dec. 2014].

database?, H. (2015). How does one check if a table exists in an Android SQLite

database?. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/3058909/how-does-one-check-if-a-table-exists-

in-an-android-sqlite-database [Accessed 29 Apr. 2015].

Dev.twitter.com, (2014). Integrate the SDK | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/integrate [Accessed 17 Dec. 2014].

Dev.twitter.com, (2015). Access Twitter's REST API | Twitter Developers. [online]

Available at: https://dev.twitter.com/twitter-kit/android/api [Accessed 29 Apr.

2015].

Dev.twitter.com, (2015). Error Codes & Responses | Twitter Developers. [online]

Available at: https://dev.twitter.com/overview/api/response-codes [Accessed 29

Apr. 2015].

Dev.twitter.com, (2015). GET statuses/home_timeline | Twitter Developers. [online]

Available at: https://dev.twitter.com/rest/reference/get/statuses/home_timeline

[Accessed 29 Apr. 2015].

Dev.twitter.com, (2015). Set up TweetUi | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/tweetui [Accessed 29 Apr. 2015].

Dev.twitter.com, (2015). TwitterCore | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/twittercore [Accessed 29 Apr. 2015].

Developer.android.com, (2014). Android Developers. [online] Available at:

http://developer.android.com/index.html [Accessed 17 Dec. 2014].

Page 71: 1112566_Dissertation

71

Developer.android.com, (2014). Fragments | Android Developers. [online] Available at:

http://developer.android.com/guide/components/fragments.html [Accessed 17 Dec.

2014].

Developer.android.com, (2015). MarkerOptions | Android Developers. [online]

Available at:

http://developer.android.com/reference/com/google/android/gms/maps/model/Mark

erOptions.html [Accessed 29 Apr. 2015].

Fabric.io, (2014). Fabric. [online] Available at: https://fabric.io/downloads [Accessed

17 Dec. 2014].

fragment, G. (2015). Google Maps Fragment returning null inside a fragment. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/25653898/google-maps-fragment-returning-

null-inside-a-fragment [Accessed 29 Apr. 2015].

Geoplaner.com, (2014). GPS Geoplaner online. [online] Available at:

http://www.geoplaner.com/ [Accessed 17 Dec. 2014].

Get.fabric.io, (2015). Fabric - Twitter's Mobile Development Platform. [online]

Available at: https://get.fabric.io/native-social [Accessed 29 Apr. 2015].

GitHub, (2014). thiagolocatelli/android-instagram-oauth. [online] Available at:

https://github.com/thiagolocatelli/android-instagram-oauth [Accessed 17 Dec.

2014].

Glennsayers.com, (2014). Creating a maps application on Android using Google

Services and Android Studio - Glenn Sayers. [online] Available at:

http://glennsayers.com/android-mapping/ [Accessed 17 Dec. 2014].

Google developer console, (2014). Google developer console. [online] Available at:

https://console.developers.google.com/project/828931335636/apiui/api?authuser=0

&redirected=true&utm_referrer=http:%2F%2Fwww.vogella.com%2Ftutorials%2F

AndroidGoogleMaps%2Farticle.html [Accessed 17 Dec. 2014].

Google Developers, (2014). Getting Started. [online] Available at:

https://developers.google.com/maps/documentation/android/start#getting_the_goog

le_maps_android_api_v2 [Accessed 17 Dec. 2014].

Google Developers, (2014). Getting Started. [online] Available at:

https://developers.google.com/maps/documentation/android/start#install_and_confi

gure_the_google_play_services_sdk [Accessed 17 Dec. 2014].

Google Developers, (2015). MarkerOptions. [online] Available at:

https://developers.google.com/maps/documentation/business/mobile/android/refere

nce/com/google/android/m4b/maps/model/MarkerOptions [Accessed 29 Apr.

2015].

Page 72: 1112566_Dissertation

72

Google Developers, (2015). Markers. [online] Available at:

https://developers.google.com/maps/documentation/android/marker [Accessed 29

Apr. 2015].

hashtag, T. (2015). Twitter fabric get tweets with hashtag. [online] Stackoverflow.com.

Available at: http://stackoverflow.com/questions/27768436/twitter-fabric-get-

tweets-with-hashtag [Accessed 29 Apr. 2015].

Instagram.com, (2014). Instagram Developer Documentation. [online] Available at:

http://instagram.com/developer/ [Accessed 17 Dec. 2014].

Layouts, H. (2014). How to implement a ViewPager with different Fragments /

Layouts. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-

with-different-fragments-layouts [Accessed 17 Dec. 2014].

Mathew, G. (2015). Customizing InfoWindow Contents in Google Map Android API V2

using InfoWindowAdapter | Knowledge by Experience. [online]

Wptrafficanalyzer.in. Available at: http://wptrafficanalyzer.in/blog/customizing-

infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/

[Accessed 29 Apr. 2015].

Mobiforge.com, (2014). Developing with Google Maps v2 for Android | mobiForge.

[online] Available at: http://mobiforge.com/design-development/developing-with-

google-maps-v2-android [Accessed 17 Dec. 2014].

NavigationDrawerFragment, i. (2015). incompatible types: Fragment cannot be

converted to NavigationDrawerFragment. [online] Stackoverflow.com. Available

at: http://stackoverflow.com/questions/26386320/incompatible-types-fragment-

cannot-be-converted-to-navigationdrawerfragment [Accessed 29 Apr. 2015].

newsfeed/timeline, A. (2015). Android - specific twitter hashtag newsfeed/timeline.

[online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/28214398/android-specific-twitter-hashtag-

newsfeed-timeline [Accessed 29 Apr. 2015].

Rabara, P. and Rabara, P. (2014). Android - Sliding Menu Demo. [online] The App

Guruz. Available at: http://www.theappguruz.com/tutorial/android-sliding-menu-

demo/ [Accessed 17 Dec. 2014].

Shah, A. (2012). How to iterate through Java List? 4 way to iterate through loop •

Crunchify. [online] Crunchify. Available at: http://crunchify.com/how-to-iterate-

through-java-list-4-way-to-iterate-through-loop/ [Accessed 29 Apr. 2015].

Stackoverflow.com, (2014). ERROR:'keytool' is not recognized as an internal or

external command, operable program or batch file. [online] Available at:

Page 73: 1112566_Dissertation

73

http://stackoverflow.com/questions/6211919/errorkeytool-is-not-recognized-as-an-

internal-or-external-command-operable-p [Accessed 17 Dec. 2014].

studio?, H. (2015). How to get a specific user's timeline and view their tweets by using

fabric in android studio?. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/28984830/how-to-get-a-specific-users-

timeline-and-view-their-tweets-by-using-fabric-in-a [Accessed 29 Apr. 2015].

Todroid.com, (2014). How To Create a Map and GPS Application using Android

Studio | ToDroid. [online] Available at: http://www.todroid.com/how-to-create-a-

google-map-application-using-android-studio/ [Accessed 17 Dec. 2014].

Todroid.com, (2014). How To Create a Map and GPS Application using Android

Studio | ToDroid. [online] Available at: http://www.todroid.com/how-to-create-a-

google-map-application-using-android-studio/ [Accessed 17 Dec. 2014].

Tutorialspoint.com, (2014). Android Fragments. [online] Available at:

http://www.tutorialspoint.com/android/android_fragments.htm [Accessed 17 Dec.

2014].

Utility, G. (2014). Google Maps Android Marker Clustering Utility. [online] Google

Developers. Available at:

https://developers.google.com/maps/documentation/android/utility/marker-

clustering [Accessed 17 Dec. 2014].

v2, R. (2015). Remove previous Marker and add new Marker in Google Map v2.

[online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/17379807/remove-previous-marker-and-add-

new-marker-in-google-map-v2 [Accessed 29 Apr. 2015].

Windows, I. (2015). Info Windows. [online] Google Developers. Available at:

https://developers.google.com/maps/documentation/android/infowindows

[Accessed 29 Apr. 2015].

YouTube, (2014). Derek Banas. [online] Available at: https://www.youtube.com/

[closed], A. (2015). Android Map api v2 Custom marker with ImageView. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/14811579/android-map-api-v2-custom-marker-

with-imageview [Accessed 29 Apr. 2015].

2, S. (2015). Set Image from drawable as marker in Google Map version 2. [online]

Stackoverflow.com. Available at: http://stackoverflow.com/questions/18053156/set-

image-from-drawable-as-marker-in-google-map-version-2 [Accessed 29 Apr. 2015].

Acnenomor.com, (2014). ERROR:'keytool' is not recognized as an internal or external

command, operable program or batch file - acnenomor.com. [online] Available at:

Page 74: 1112566_Dissertation

74

http://www.acnenomor.com/4796632p1/errorkeytool-is-not-recognized-as-an-internal-

or-external-command-operable-program-or-batch-file [Accessed 17 Dec. 2014].

android?, C. (2015). Change the Color of Marker Option in android?. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/22145646/change-the-color-of-marker-option-in-

android [Accessed 29 Apr. 2015].

AndroidBegin, (2012). Android Button Click New Activity Example - AndroidBegin.

[online] Available at: http://www.androidbegin.com/tutorial/android-button-click-new-

activity-example/ [Accessed 17 Dec. 2014].

AndroidBegin, (2012). Android Button Click New Activity Example - AndroidBegin.

[online] Available at: http://www.androidbegin.com/tutorial/android-button-click-new-

activity-example/ [Accessed 17 Dec. 2014].

Automateddeveloper.blogspot.co.uk, (2014). Thoughts on Development & Design:

Android & Twitter - OAuth Authentication Tutorial. [online] Available at:

http://automateddeveloper.blogspot.co.uk/2011/06/android-twitter-oauth-

authentication.html [Accessed 17 Dec. 2014].

b2cloud, (2014). Instagram integration in an Android app.. [online] Available at:

http://b2cloud.com.au/uncategorized/instagram-integration-in-an-android-app/

[Accessed 17 Dec. 2014].

database?, H. (2015). How does one check if a table exists in an Android SQLite

database?. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/3058909/how-does-one-check-if-a-table-exists-in-

an-android-sqlite-database [Accessed 29 Apr. 2015].

Dev.twitter.com, (2014). Integrate the SDK | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/integrate [Accessed 17 Dec. 2014].

Dev.twitter.com, (2015). Access Twitter's REST API | Twitter Developers. [online]

Available at: https://dev.twitter.com/twitter-kit/android/api [Accessed 29 Apr. 2015].

Dev.twitter.com, (2015). Error Codes & Responses | Twitter Developers. [online]

Available at: https://dev.twitter.com/overview/api/response-codes [Accessed 29 Apr.

2015].

Dev.twitter.com, (2015). GET statuses/home_timeline | Twitter Developers. [online]

Available at: https://dev.twitter.com/rest/reference/get/statuses/home_timeline

[Accessed 29 Apr. 2015].

Dev.twitter.com, (2015). Set up TweetUi | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/tweetui [Accessed 29 Apr. 2015].

Page 75: 1112566_Dissertation

75

Dev.twitter.com, (2015). TwitterCore | Twitter Developers. [online] Available at:

https://dev.twitter.com/twitter-kit/android/twittercore [Accessed 29 Apr. 2015].

Developer.android.com, (2014). Android Developers. [online] Available at:

http://developer.android.com/index.html [Accessed 17 Dec. 2014].

Developer.android.com, (2014). Fragments | Android Developers. [online] Available at:

http://developer.android.com/guide/components/fragments.html [Accessed 17 Dec.

2014].

Developer.android.com, (2015). MarkerOptions | Android Developers. [online]

Available at:

http://developer.android.com/reference/com/google/android/gms/maps/model/MarkerO

ptions.html [Accessed 29 Apr. 2015].

Fabric.io, (2014). Fabric. [online] Available at: https://fabric.io/downloads [Accessed

17 Dec. 2014].

fragment, G. (2015). Google Maps Fragment returning null inside a fragment. [online]

Stackoverflow.com. Available at:

http://stackoverflow.com/questions/25653898/google-maps-fragment-returning-null-

inside-a-fragment [Accessed 29 Apr. 2015].

Geoplaner.com, (2014). GPS Geoplaner online. [online] Available at:

http://www.geoplaner.com/ [Accessed 17 Dec. 2014].

Get.fabric.io, (2015). Fabric - Twitter's Mobile Development Platform. [online]

Available at: https://get.fabric.io/native-social [Accessed 29 Apr. 2015].

GitHub, (2014). thiagolocatelli/android-instagram-oauth. [online] Available at:

https://github.com/thiagolocatelli/android-instagram-oauth [Accessed 17 Dec. 2014].

Glennsayers.com, (2014). Creating a maps application on Android using Google

Services and Android Studio - Glenn Sayers. [online] Available at:

http://glennsayers.com/android-mapping/ [Accessed 17 Dec. 2014].

Google developer console, (2014). Google developer console. [online] Available at:

https://console.developers.google.com/project/828931335636/apiui/api?authuser=0&re

directed=true&utm_referrer=http:%2F%2Fwww.vogella.com%2Ftutorials%2FAndroid

GoogleMaps%2Farticle.html [Accessed 17 Dec. 2014].

Google Developers, (2014). Getting Started. [online] Available at:

https://developers.google.com/maps/documentation/android/start#getting_the_google_

maps_android_api_v2 [Accessed 17 Dec. 2014].

Google Developers, (2014). Getting Started. [online] Available at:

https://developers.google.com/maps/documentation/android/start#install_and_configure

_the_google_play_services_sdk [Accessed 17 Dec. 2014].

Page 76: 1112566_Dissertation

76

Google Developers, (2015). MarkerOptions. [online] Available at:

https://developers.google.com/maps/documentation/business/mobile/android/reference/

com/google/android/m4b/maps/model/MarkerOptions [Accessed 29 Apr. 2015].

Google Developers, (2015). Markers. [online] Available at:

https://developers.google.com/maps/documentation/android/marker [Accessed 29 Apr.

2015].

hashtag, T. (2015). Twitter fabric get tweets with hashtag. [online] Stackoverflow.com.

Available at: http://stackoverflow.com/questions/27768436/twitter-fabric-get-tweets-

with-hashtag [Accessed 29 Apr. 2015].

Instagram.com, (2014). Instagram Developer Documentation. [online] Available at:

http://instagram.com/developer/ [Accessed 17 Dec. 2014].

Layouts, H. (2014). How to implement a ViewPager with different Fragments /

Layouts. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-

different-fragments-layouts [Accessed 17 Dec. 2014].

Mathew, G. (2015). Customizing InfoWindow Contents in Google Map Android API

V2 using InfoWindowAdapter | Knowledge by Experience. [online]

Wptrafficanalyzer.in. Available at: http://wptrafficanalyzer.in/blog/customizing-

infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/

[Accessed 29 Apr. 2015].

Mobiforge.com, (2014). Developing with Google Maps v2 for Android | mobiForge.

[online] Available at: http://mobiforge.com/design-development/developing-with-

google-maps-v2-android [Accessed 17 Dec. 2014].

NavigationDrawerFragment, i. (2015). incompatible types: Fragment cannot be

converted to NavigationDrawerFragment. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/26386320/incompatible-types-fragment-cannot-be-

converted-to-navigationdrawerfragment [Accessed 29 Apr. 2015].

newsfeed/timeline, A. (2015). Android - specific twitter hashtag newsfeed/timeline.

[online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/28214398/android-specific-twitter-hashtag-

newsfeed-timeline [Accessed 29 Apr. 2015].

Rabara, P. and Rabara, P. (2014). Android - Sliding Menu Demo. [online] The App

Guruz. Available at: http://www.theappguruz.com/tutorial/android-sliding-menu-demo/

[Accessed 17 Dec. 2014].

Shah, A. (2012). How to iterate through Java List? 4 way to iterate through loop •

Crunchify. [online] Crunchify. Available at: http://crunchify.com/how-to-iterate-

through-java-list-4-way-to-iterate-through-loop/ [Accessed 29 Apr. 2015].

Page 77: 1112566_Dissertation

77

Stackoverflow.com, (2014). ERROR:'keytool' is not recognized as an internal or

external command, operable program or batch file. [online] Available at:

http://stackoverflow.com/questions/6211919/errorkeytool-is-not-recognized-as-an-

internal-or-external-command-operable-p [Accessed 17 Dec. 2014].

studio?, H. (2015). How to get a specific user's timeline and view their tweets by using

fabric in android studio?. [online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/28984830/how-to-get-a-specific-users-timeline-

and-view-their-tweets-by-using-fabric-in-a [Accessed 29 Apr. 2015].

Todroid.com, (2014). How To Create a Map and GPS Application using Android

Studio | ToDroid. [online] Available at: http://www.todroid.com/how-to-create-a-

google-map-application-using-android-studio/ [Accessed 17 Dec. 2014].

Todroid.com, (2014). How To Create a Map and GPS Application using Android

Studio | ToDroid. [online] Available at: http://www.todroid.com/how-to-create-a-

google-map-application-using-android-studio/ [Accessed 17 Dec. 2014].

Tutorialspoint.com, (2014). Android Fragments. [online] Available at:

http://www.tutorialspoint.com/android/android_fragments.htm [Accessed 17 Dec.

2014].

Utility, G. (2014). Google Maps Android Marker Clustering Utility. [online] Google

Developers. Available at:

https://developers.google.com/maps/documentation/android/utility/marker-clustering

[Accessed 17 Dec. 2014].

v2, R. (2015). Remove previous Marker and add new Marker in Google Map v2.

[online] Stackoverflow.com. Available at:

http://stackoverflow.com/questions/17379807/remove-previous-marker-and-add-new-

marker-in-google-map-v2 [Accessed 29 Apr. 2015].

Windows, I. (2015). Info Windows. [online] Google Developers. Available at:

https://developers.google.com/maps/documentation/android/infowindows [Accessed 29

Apr. 2015].

YouTube, (2014). Derek Banas. [online] Available at: https://www.youtube.com/

7.2 Final Project Research

300 Million: Sharing Real Moments. (2015). [online] Available at:

http://blog.instagram.com/post/104847837897/141210-300million [Accessed 29

Apr. 2015].

About.twitter.com, (2015). About Twitter, Inc. | About. [online] Available at:

https://about.twitter.com/company [Accessed 29 Apr. 2015].

Page 78: 1112566_Dissertation

78

Aranya, (2015). Software Life Cycle. [image] Available at:

http://www.aranya.com/blog/Aranya_Blog/Im_Getting_Ready_to_Start_a_New_S

oftware_Project_What_Should_I_Expect_20.html [Accessed 29 Apr. 2015].

Carr, R. (2015). The SOLID Principles. [online] Blackwasp.co.uk. Available at:

http://www.blackwasp.co.uk/SOLID.aspx [Accessed 29 Apr. 2015].

Chapman, J. (2015). Software Development Methodology. [online] Hyperthot.com.

Available at: http://www.hyperthot.com/pm_sdm.htm [Accessed 29 Apr. 2015].

Dev.twitter.com, (2015). GET statuses/home_timeline | Twitter Developers. [online]

Available at: https://dev.twitter.com/rest/reference/get/statuses/home_timeline

[Accessed 29 Apr. 2015].

Developer.android.com, (2015). Android Studio Overview | Android Developers.

[online] Available at: http://developer.android.com/tools/studio/index.html

[Accessed 29 Apr. 2015].

Developer.android.com, (2015). Using the Emulator | Android Developers. [online]

Available at: http://developer.android.com/tools/devices/emulator.html [Accessed

29 Apr. 2015].

Duggan, M., Ellison, N., Lampe, C., Lenhart, A. and Madden, M. (2015). Social Media

Update 2014. [online] Pew Research Center's Internet & American Life Project.

Available at: http://www.pewinternet.org/2015/01/09/social-media-update-2014/

[Accessed 29 Apr. 2015].

DuPaul, N. (2015). Software Development Lifecycle (SDLC). [online] Veracode.

Available at: http://www.veracode.com/security/software-development-lifecycle

[Accessed 29 Apr. 2015].

Facebook Developers, (2015). Documentation for building software with Facebook -

APIs, SDKs and Services. [online] Available at:

https://developers.facebook.com/docs [Accessed 29 Apr. 2015].

Fundamentals, A. (2015). Application Fundamentals | Android Developers. [online]

Developer.android.com. Available at:

http://developer.android.com/guide/components/fundamentals.html [Accessed 29

Apr. 2015].

Ghahrai, A. (2015). Incremental Model - Advantages and Disadvantages. [online]

Testingexcellence.com. Available at:

http://www.testingexcellence.com/incremental-model/ [Accessed 29 Apr. 2015].

Google, (2013). Inside the different Android Versions. [online] Android Central.

Available at: http://www.androidcentral.com/android-versions [Accessed 29 Apr.

2015].

Page 79: 1112566_Dissertation

79

Habib, M. (2013). Agile software development methodologies and how to apply them -

CodeProject. [online] Codeproject.com. Available at:

http://www.codeproject.com/Articles/604417/Agile-software-development-

methodologies-and-how-t [Accessed 29 Apr. 2015].

Hootsuite.com, (2015). Home. [online] Available at: https://hootsuite.com/dashboard#/

[Accessed 29 Apr. 2015].

Inc., H. (2015). Listening. [online] Hootsuite.com. Available at:

https://hootsuite.com/products/platform/social-media-listening [Accessed 29 Apr.

2015].

Instagram.com, (2015). • Instagram Developer Documentation. [online] Available

at: https://instagram.com/developer/authentication/ [Accessed 29 Apr. 2015].

Instagram.com, (2015). • Instagram Developer Documentation. [online] Available

at: https://instagram.com/developer/authentication/ [Accessed 29 Apr. 2015].

Ipwatchdog.com, (2015). A Brief History of Google’s Android Operating System.

[online] Available at: http://www.ipwatchdog.com/2014/11/26/a-brief-history-of-

googles-android-operating-system/id=52285/ [Accessed 29 Apr. 2015].

Istqbexamcertification.com, (2015). What is Incremental model- advantages,

disadvantages and when to use it?. [online] Available at:

http://istqbexamcertification.com/what-is-incremental-model-advantages-

disadvantages-and-when-to-use-it/ [Accessed 29 Apr. 2015].

Itinfo.am, (2015). Software Development Methodologies. [online] Available at:

http://www.itinfo.am/eng/software-development-methodologies/ [Accessed 29

Apr. 2015].

Janssen, C. (2015). What is a Social Networking Site (SNS)? - Definition from

Techopedia. [online] Techopedia.com. Available at:

http://www.techopedia.com/definition/4956/social-networking-site-sns [Accessed

29 Apr. 2015].

Janssen, C. (2015). What is Social Media Monitoring? - Definition from Techopedia.

[online] Techopedia.com. Available at:

http://www.techopedia.com/definition/29592/social-media-monitoring [Accessed

29 Apr. 2015].

John, S. (2015). Android Architecture - EazyTutz. [online] EazyTutz. Available at:

http://www.eazytutz.com/android/android-architecture/ [Accessed 29 Apr. 2015].

Kemp, S. (2014). Global Social Media Users Pass 2 Billion. [online] We Are Social.

Available at: http://wearesocial.net/blog/2014/08/global-social-media-users-pass-2-

billion/ [Accessed 29 Apr. 2015].

Page 80: 1112566_Dissertation

80

Opheme.com, (2015). oPheme | All About oPheme. [online] Available at:

http://www.opheme.com/ [Accessed 29 Apr. 2015].

PewResearchCenter, (2015). Adult User Demographic on Social Networking Sites /.

[image] Available at: http://www.pewinternet.org/2015/01/09/social-media-update-

2014/ [Accessed 29 Apr. 2015].

PewResearchCenter, (2015). Social networking site use by ages group, 2005 - 2013.

[image] Available at: http://www.pewinternet.org/fact-sheets/social-networking-

fact-sheet/ [Accessed 29 Apr. 2015].

Portal.opheme.com, (2015). oPheme | Login. [online] Available at:

https://portal.opheme.com/discover [Accessed 29 Apr. 2015].

Rouse, M. (2006). What is social networking? - Definition from WhatIs.com. [online]

WhatIs.com. Available at: http://whatis.techtarget.com/definition/social-

networking [Accessed 29 Apr. 2015].

Sas.com, (2015). What Is Big Data?. [online] Available at:

http://www.sas.com/en_us/insights/big-data/what-is-big-data.html [Accessed 29

Apr. 2015].

SearchBusinessAnalytics, (2015). What is unstructured data? - Definition from

WhatIs.com. [online] Available at:

http://searchbusinessanalytics.techtarget.com/definition/unstructured-data

[Accessed 29 Apr. 2015].

Smith, C. (2014). 200+ Amazing Facebook User Statistics (January 2015). [online]

DMR. Available at: http://expandedramblings.com/index.php/by-the-numbers-17-

amazing-facebook-stats/ [Accessed 29 Apr. 2015].

Statsoft.com, (2015). What is Data Mining, Predictive Analytics, Big Data. [online]

Available at: http://www.statsoft.com/textbook/data-mining-techniques [Accessed

29 Apr. 2015].

The Future Place Blog, (2015). What is social media monitoring?. [online] Available at:

http://thefutureplace.typepad.com/the_future_place/2011/06/what-is-social-media-

monitoring.html [Accessed 29 Apr. 2015].

TheFreeDictionary.com, (2015). Morally right. [online] Available at:

http://www.thefreedictionary.com/Morally+right [Accessed 29 Apr. 2015].

Tilloo, R. (2013). Incremental Model In Software Engineering : What Is It? Advantages

&. [online] TechnoTrice. Available at: http://www.technotrice.com/incremental-

model-in-software-engineering/ [Accessed 29 Apr. 2015].

Wong, D. (2015). Report: Social Media Drove 31.24% of Overall Visits to Sites.

[online] The Shareaholic Content Marketing Blog. Available at:

Page 81: 1112566_Dissertation

81

https://blog.shareaholic.com/social-media-traffic-trends-01-2015/ [Accessed 29

Apr. 2015].

Appendix I

Application Code and User Interface Design

AlertBox.class

package com.example.harry.ophemeApp;

import android.app.AlertDialog;

import android.content.Context;

import android.content.DialogInterface;

import java.util.Timer;

import java.util.TimerTask;

public class AlertBox {

// creating variables for the alert box

static AlertDialog.Builder alertBoxBuilder;

static AlertDialog alertBox;

static Timer timer;

static TimerTask timerTask;

// creating the alert box method

static void alertBox(Context ctx, String title, String myMessage) {

// setting up the alert box for the look of the alert looks

alertBoxBuilder = new AlertDialog.Builder(ctx);

alertBoxBuilder.setMessage(myMessage);

alertBoxBuilder.setTitle(title)

.setCancelable(true)

.setNeutralButton(android.R.string.cancel,

new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int whichButton) {

dialog.cancel();

}

});

alertBox = alertBoxBuilder.show();

}

// creating timer method which will be used to display the alert box for 3 seconds

static void timer(int seconds) {

timer = new Timer(); //At this line a new Thread will be created

timerTask = new TimerTask() {

Page 82: 1112566_Dissertation

82

@Override

public void run() {

timer.cancel();

alertBox.dismiss(); //dismiss global alert box

}

};

timer.schedule(timerTask, seconds * 1000); //delay in milliseconds

}

}

FirstFragment.class

package com.example.harry.ophemeApp.Main_screen_fragments;

import android.os.Bundle;

import android.support.v4.app.Fragment;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import com.example.harry.ophemeApp.R;

public class FirstFragment extends Fragment {

//method to call the first fragment

public static FirstFragment newInstance(String text) {

FirstFragment f = new FirstFragment();

Bundle b = new Bundle();

b.putString("msg", text);

f.setArguments(b);

return f;

}

// used to inflate the fragment layout

@Override

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle

savedInstanceState) {

View v = inflater.inflate(R.layout.first_frag, container, false);

return v;

}

}

Page 83: 1112566_Dissertation

83

SecondFragment.class

package com.example.harry.ophemeApp.Main_screen_fragments;

import android.os.Bundle;

import android.support.v4.app.Fragment;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import com.example.harry.ophemeApp.R;

public class SecondFragment extends Fragment {

//method to call the first fragment

public static SecondFragment newInstance(String text) {

SecondFragment f = new SecondFragment();

Bundle b = new Bundle();

b.putString("msg", text);

f.setArguments(b);

return f;

}

// used to inflate the fragment layout

@Override

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle

savedInstanceState) {

View view = inflater.inflate(R.layout.second_frag, container, false);

return view;

}

}

InstagramConstants.class

package com.example.harry.ophemeApp.socialMedia;

// used for authentication which is sent from the app to Instagram to receive the data

back

public class InstagramConstants {

static public String CLIENT_ID = "9206815f14434538b50f1f95d2edf6c7";

static public String CLIENT_SECRET = "e99dc0c9372a43cd825cf0b188420921";

static public String CALLBACK_URL = "http://www.opheme.com";

Page 84: 1112566_Dissertation

84

}

MainMap.class

package com.example.harry.ophemeApp;

import android.app.Fragment;

import android.app.FragmentManager;

import android.os.Build;

import android.os.Bundle;

import android.util.Log;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import com.crashlytics.android.Crashlytics;

import com.google.android.gms.maps.GoogleMap;

import com.google.android.gms.maps.MapFragment;

import com.google.android.gms.maps.SupportMapFragment;

import com.google.android.gms.maps.model.LatLng;

import com.google.android.gms.maps.model.Marker;

import com.google.android.gms.maps.model.MarkerOptions;

import com.google.maps.android.clustering.ClusterManager;

import com.twitter.sdk.android.Twitter;

import com.twitter.sdk.android.core.AppSession;

import com.twitter.sdk.android.core.Callback;

import com.twitter.sdk.android.core.Result;

import com.twitter.sdk.android.core.TwitterApiClient;

import com.twitter.sdk.android.core.TwitterAuthConfig;

import com.twitter.sdk.android.core.TwitterCore;

import com.twitter.sdk.android.core.TwitterException;

import com.twitter.sdk.android.core.models.Coordinates;

import com.twitter.sdk.android.core.models.Tweet;

import com.twitter.sdk.android.core.services.StatusesService;

import org.apache.commons.lang3.StringUtils;

import java.util.List;

import io.fabric.sdk.android.Fabric;

/**

* Created by Harry on 20/04/2015.

*/

public class MainMap extends Fragment {

// sets up google map variable

private GoogleMap mMap;

private ClusterManager<CustomMarker> mClusterManager;

private static final String TWITTER_KEY =

"SXqmmMWwryKQVVCM4G5QP5c8w";

Page 85: 1112566_Dissertation

85

private static final String TWITTER_SECRET =

"8XOqx9Bwo7dv2XgPK5csbdoolsExPA5F38TpTJb9vRtqZr0HvR";

// private static final String TWITTER_KEY =

"U5ZSjqQC4ib8GImLTkACQXYKv";

// private static final String TWITTER_SECRET =

"pAVlkQ6dFw7GHpYLGmP1FLIhuR4BD5CYgox1ucRcb3SbIC1UNG";

@Override

public View onCreateView(LayoutInflater inflater, ViewGroup container,

Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.main_map, container, false);

TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY,

TWITTER_SECRET);

Fabric.with(this.getActivity(), new Twitter(authConfig), new Crashlytics());

//setUpMapIfNeeded();

setUpMap_();

grabTimeline(); // Twitter

return rootView;

}

/*

private MapFragment getMapFragment() {

FragmentManager fm = null;

// older versions

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {

fm = getFragmentManager();

// lollipop

} else {

fm = getChildFragmentManager();

}

return (MapFragment) fm.findFragmentById(R.id.map);

}

*/

protected void grabTimeline() {

TwitterCore.getInstance().logInGuest(new Callback<AppSession>() {

@Override

public void success(Result<AppSession> appSessionResult) {

TwitterApiClient twitterApiClient =

TwitterCore.getInstance().getApiClient();

StatusesService statusesService = twitterApiClient.getStatusesService();

Page 86: 1112566_Dissertation

86

statusesService.userTimeline(15894713L, null, 200, null, null, true, true,

false, false, new Callback<List<Tweet>>() {

@Override

public void success(Result<List<Tweet>> result) {

Tweet t;

Marker m;

for (int i = 0; i < result.data.size(); i++) {

t = result.data.get(i);

if (t.coordinates instanceof Coordinates) {

Log.d("Twitter-TWEET", "ScreenName: rdinita \nText:" +

t.text);

// either these

// mCluster - already set up

// mCluster.addItem(new

CustomMarker(t.coordinates.getLatitude(), t.coordinates.getLongitude()))

// [optional] also add t.text to CustomMarker to be used in

InfoWindowClickListener

// or these

LatLng coords = new LatLng(t.coordinates.getLatitude(),

t.coordinates.getLongitude());

m = mMap.addMarker(

new MarkerOptions()

.position(coords)

.title("rdinita")

.snippet(t.text)

);

m.showInfoWindow();

}

}

//Do something with result, which provides a Tweet inside of

result.data

}

public void failure(TwitterException e) {

//Do something on failure

Log.d("Twitter-API-Failure", e.getMessage());

Crashlytics.log(StringUtils.join(e.getStackTrace()));

}

});

Page 87: 1112566_Dissertation

87

}

@Override

public void failure(TwitterException e) {

// OOPS

Log.d("Twitter-AUTH-Failure", e.getMessage());

Crashlytics.log(StringUtils.join(e.getStackTrace()));

}

});

}

private void setUpMapIfNeeded() {

// Do a null check to confirm that we have not already instantiated the map.

if (mMap == null) {

// Try to obtain the map from the SupportMapFragment.

mMap = ((MapFragment)

getFragmentManager().findFragmentById(R.id.map))

.getMap();

// Check if we were successful in obtaining the map.

if (mMap != null) {

setUpMap();

}

}

}

private void setUpMap_() {

mMap = getMapFragment().getMap();

mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);

mMap.setMyLocationEnabled(true);

mMap.getUiSettings().setZoomControlsEnabled(false);

}

private MapFragment getMapFragment() {

FragmentManager fm = null;

// older versions

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {

fm = getFragmentManager();

// lollipop

} else {

fm = getChildFragmentManager();

}

return (MapFragment) fm.findFragmentById(R.id.map);

}

// method used to start the map at a certain place, cambridge

// creates markers on the map

private void setUpMap() {

Page 88: 1112566_Dissertation

88

mMap.addMarker(new MarkerOptions().position(new LatLng(0,

0)).title("Marker"));

}

}

MenuFragDrawer.class

package com.example.harry.ophemeApp;

import android.app.Fragment;

import android.app.FragmentManager;

import android.content.Context;

import android.content.Intent;

import android.content.res.Configuration;

import android.content.res.TypedArray;

import android.os.Bundle;

import android.support.v4.app.ActionBarDrawerToggle;

import android.support.v4.app.FragmentActivity;

import android.support.v4.widget.DrawerLayout;

import android.util.Log;

import android.view.Menu;

import android.view.MenuItem;

import android.view.View;

import android.widget.AdapterView;

import android.widget.Button;

import android.widget.ListView;

import java.util.ArrayList;

import com.example.harry.ophemeApp.socialMedia.InstagramConstants;

import com.example.harry.ophemeApp.utility.ToastClass;

import com.example.harry.ophemeApp.socialMedia.instagram_oauth.InstagramApp;

import

com.example.harry.ophemeApp.socialMedia.instagram_oauth.InstagramApp.OAuthAut

henticationListener;

public class MenuFragDrawer extends FragmentActivity {

protected static final String TAG = "MenuFragDrawer";

private DrawerLayout mDrawerLayout;

private ListView mDrawerList;

private ActionBarDrawerToggle mDrawerToggle;

// nav drawer title

private CharSequence mDrawerTitle;

// used to store app title

private CharSequence mTitle;

Page 89: 1112566_Dissertation

89

// slide menu items

private String[] navMenuTitles;

private TypedArray navMenuIcons;

private ArrayList<NavDrawerItem> navDrawerItems;

private NavDrawerListAdapter adapter;

private FragmentActivity mActivity;

public Context mContext; // initiated in onCreate()

@Override

protected void onCreate(Bundle savedInstanceState)

{

super.onCreate(savedInstanceState);

setContentView(R.layout.main_sliding_drawer);

mContext = this;

mActivity = this;

mTitle = mDrawerTitle = getTitle();

// load slide menu items

navMenuTitles = getResources().getStringArray(R.array.nav_drawer_items);

// nav drawer icons from resources

navMenuIcons = getResources()

.obtainTypedArray(R.array.nav_drawer_icons);

mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);

mDrawerList = (ListView) findViewById(R.id.list_slidermenu);

navDrawerItems = new ArrayList<NavDrawerItem>();

// adding nav drawer items to array

// Map

navDrawerItems.add(new NavDrawerItem(navMenuTitles[0],

navMenuIcons.getResourceId(0, -1)));

//// Instagram

// Account

navDrawerItems.add(new NavDrawerItem(navMenuTitles[1],

navMenuIcons.getResourceId(1, -1)));

//// Twitter

//navDrawerItems.add(new NavDrawerItem(navMenuTitles[2],

navMenuIcons.getResourceId(2, -1)));

// Recycle the typed array

navMenuIcons.recycle();

Page 90: 1112566_Dissertation

90

mDrawerList.setOnItemClickListener(new SlideMenuClickListener());

// setting the nav drawer list adapter

adapter = new NavDrawerListAdapter(getApplicationContext(),

navDrawerItems);

mDrawerList.setAdapter(adapter);

// enabling action bar app icon and behaving it as toggle button

getActionBar().setDisplayHomeAsUpEnabled(true);

getActionBar().setHomeButtonEnabled(true);

mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,

R.drawable.ic_drawer, //nav menu toggle icon

R.string.app_name, // nav drawer open - description for accessibility

R.string.app_name // nav drawer close - description for accessibility

)

{

public void onDrawerClosed(View view)

{

getActionBar().setTitle(mTitle);

// calling onPrepareOptionsMenu() to show action bar icons

invalidateOptionsMenu();

}

public void onDrawerOpened(View drawerView)

{

getActionBar().setTitle(mDrawerTitle);

// calling onPrepareOptionsMenu() to hide action bar icons

invalidateOptionsMenu();

}

};

mDrawerLayout.setDrawerListener(mDrawerToggle);

if (savedInstanceState == null)

{

// on first time display view for first nav item

displayView(0);

}

}

/**

* Slide menu item click listener

*/

private class SlideMenuClickListener implements ListView.OnItemClickListener

{

@Override

public void onItemClick(AdapterView<?> parent, View view, int position, long id)

{

// display view for selected nav drawer item

displayView(position);

Page 91: 1112566_Dissertation

91

}

}

/**

* TODO: implement proper menu options (top right menu) or drop it entirely

*/

@Override

public boolean onCreateOptionsMenu(Menu menu)

{

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

return true;

}

@Override

public boolean onOptionsItemSelected(MenuItem item)

{

// toggle nav drawer on selecting action bar app icon/title

if (mDrawerToggle.onOptionsItemSelected(item)) {

return true;

}

// Handle action bar actions click

switch (item.getItemId())

{

case R.id.action_settings:

return true;

default:

return super.onOptionsItemSelected(item);

}

}

/* *

* Called when invalidateOptionsMenu() is triggered

*/

@Override

public boolean onPrepareOptionsMenu(Menu menu)

{

// if nav drawer is opened, hide the action items

boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);

menu.findItem(R.id.action_settings).setVisible(!drawerOpen);

return super.onPrepareOptionsMenu(menu);

}

/**

* Diplaying fragment view for selected nav drawer list item

*/

private void displayView(int position)

{

// update the main content by replacing fragments

Fragment fragment = null;

Page 92: 1112566_Dissertation

92

switch (position) {

case 0:

fragment = new MainMap();

break;

/**

* TODO: change name to something like "AccountLoginFrag" perhaps, names

need to make sense

*/

case 1:

fragment = new TwitterLoginFrag();

SetupInstagramLogin();

break;

/*case 1:

fragment = new InstagramLoginFrag();

break;

case 2:

fragment = new TwitterLoginFrag();

break;*/

default:

break;

}

if (fragment != null)

{

FragmentManager fragmentManager = getFragmentManager();

fragmentManager.beginTransaction()

.replace(R.id.frame_container, fragment).commit(); // R.id.frame_container

is used as ID of active fragment

// update selected item and title, then close the drawer

mDrawerList.setItemChecked(position, true);

mDrawerList.setSelection(position);

setTitle(navMenuTitles[position]);

mDrawerLayout.closeDrawer(mDrawerList);

}

else

{

// error in creating fragment

Log.e("MainActivity", "Error in creating fragment");

}

}

@Override

public void setTitle(CharSequence title)

{

mTitle = title;

getActionBar().setTitle(mTitle);

}

Page 93: 1112566_Dissertation

93

/**

* When using the ActionBarDrawerToggle, you must call it during

* onPostCreate() and onConfigurationChanged()...

*/

@Override

protected void onPostCreate(Bundle savedInstanceState)

{

super.onPostCreate(savedInstanceState);

// Sync the toggle state after onRestoreInstanceState has occurred.

mDrawerToggle.syncState();

}

@Override

public void onConfigurationChanged(Configuration newConfig)

{

super.onConfigurationChanged(newConfig);

// Pass any configuration change to the drawer toggles

mDrawerToggle.onConfigurationChanged(newConfig);

}

@Override

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

{

super.onActivityResult(requestCode, resultCode, data);

Log.d(TAG, "data received, passed through MenuFragDrawer");

//Fragment fragment =

getSupportFragmentManager().findFragmentById(R.id.frame_container);

Fragment fragment =

getFragmentManager().findFragmentById(R.id.frame_container);

if (fragment != null)

{

fragment.onActivityResult(requestCode, resultCode, data);

Log.d(TAG, "data received, passing it to active fragment");

}

}

/* INSTAGRAM CODE */

private InstagramApp mApp;

private Button btnConnect;

//private TextView tvSummary;

public void SetupInstagramLogin ()

{

mApp = new InstagramApp(mContext, InstagramConstants.CLIENT_ID,

InstagramConstants.CLIENT_SECRET, InstagramConstants.CALLBACK_URL);

Page 94: 1112566_Dissertation

94

mApp.setListener(listener);

}

// this determines what happens after Instagram OAuth process succeeded or failed

OAuthAuthenticationListener listener = new OAuthAuthenticationListener() {

@Override

public void onSuccess() {

ToastClass.showToast(mActivity, "Connected as " + mApp.getUserName() + "

with token: " + mApp.getAccessToken());

}

@Override

public void onFail(String error) {

ToastClass.showToast(mActivity, "Error: " + error);

}

};

public void InstagramButtonOnClick(View view) {

mApp.authorize(); // always authorize

}

}

MyActivity.class

package com.example.harry.ophemeApp;

import android.os.Bundle;

import android.support.v4.app.Fragment;

import android.support.v4.app.FragmentActivity;

import android.support.v4.app.FragmentManager;

import android.support.v4.app.FragmentPagerAdapter;

import android.support.v4.view.ViewPager;

import android.widget.Button;

import com.example.harry.ophemeApp.Main_screen_fragments.FirstFragment;

import com.example.harry.ophemeApp.Main_screen_fragments.SecondFragment;

import com.twitter.sdk.android.Twitter;

import com.twitter.sdk.android.core.TwitterAuthConfig;

import io.fabric.sdk.android.Fabric;

public class MyActivity extends FragmentActivity {

// Use to authenticate with Twitter server side

private static final String TWITTER_KEY = "P4U38Szs8SWNw67Stuf7hyyiO";

private static final String TWITTER_SECRET =

"stmlRuoJsYYfQPCq0O9Mz9yAzOh5sei094MpNX9wmTuxwCKATy";

Page 95: 1112566_Dissertation

95

Button button;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

// This code was generated by fabric

final TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY,

TWITTER_SECRET);

// This code was generated by fabric

Fabric.with(this, new Twitter(authConfig));

setContentView(R.layout.activity_my);

ViewPager pager = (ViewPager) findViewById(R.id.viewPager);

pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));

}

public class MyPagerAdapter extends FragmentPagerAdapter {

public MyPagerAdapter(FragmentManager fm) {

super(fm);

}

// This is used by the fragments in the start screen to set up the order of teh

fragments

@Override

public Fragment getItem(int pos) {

switch (pos) {

case 0:

return FirstFragment.newInstance("");

case 1:

return SecondFragment.newInstance("");

case 2:

return FourthFragment.newInstance("");

case 3:

return ThirdFragment.newInstance("");

default:

return FirstFragment.newInstance("");

}

}

@Override

public int getCount() {

return 4;

}

}

Page 96: 1112566_Dissertation

96

}

NavDrawerItem.class

package com.example.harry.ophemeApp;

public class NavDrawerItem {

private String title;

private int icon;

private String count = "0";

// boolean to set visiblity of the counter

private boolean isCounterVisible = false;

public NavDrawerItem() {

}

public NavDrawerItem(String title, int icon) {

this.title = title;

this.icon = icon;

}

// sets up the menu attributes, name etc

public NavDrawerItem(String title, int icon, boolean isCounterVisible, String count)

{

this.title = title;

this.icon = icon;

this.isCounterVisible = isCounterVisible;

this.count = count;

}

// create title for menu

public String getTitle() {

return this.title;

}

// used to display menu icon

public int getIcon() {

return this.icon;

}

public String getCount() {

return this.count;

}

// used for visability of menu

public boolean getCounterVisibility() {

return this.isCounterVisible;

}

}

Page 97: 1112566_Dissertation

97

NavDrawerListAdapter.class

package com.example.harry.ophemeApp;

import android.app.Activity;

import android.content.Context;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import android.widget.BaseAdapter;

import android.widget.ImageView;

import android.widget.TextView;

import java.util.ArrayList;

// This class is used to to display the text, icons, etc in the menu

public class NavDrawerListAdapter extends BaseAdapter {

private Context context;

private ArrayList<NavDrawerItem> navDrawerItems;

public NavDrawerListAdapter(Context context, ArrayList<NavDrawerItem>

navDrawerItems) {

this.context = context;

this.navDrawerItems = navDrawerItems;

}

// size of the menu

@Override

public int getCount() {

return navDrawerItems.size();

}

// positions of items in the menu

@Override

public Object getItem(int position) {

return navDrawerItems.get(position);

}

// item id in the menu

@Override

public long getItemId(int position) {

return position;

}

// sets up menu view

@Override

public View getView(int position, View convertView, ViewGroup parent) {

Page 98: 1112566_Dissertation

98

if (convertView == null) {

LayoutInflater mInflater = (LayoutInflater)

context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);

convertView = mInflater.inflate(R.layout.drawer_list_item, null);

}

// used to initialise the menu icon, text and number of items in menu

ImageView imgIcon = (ImageView) convertView.findViewById(R.id.icon);

TextView txtTitle = (TextView) convertView.findViewById(R.id.title);

TextView txtCount = (TextView) convertView.findViewById(R.id.counter);

imgIcon.setImageResource(navDrawerItems.get(position).getIcon());

txtTitle.setText(navDrawerItems.get(position).getTitle());

// displaying count

// check whether it set visible or not

if (navDrawerItems.get(position).getCounterVisibility()) {

txtCount.setText(navDrawerItems.get(position).getCount());

} else {

// hide the counter view

txtCount.setVisibility(View.GONE);

}

return convertView;

}

}

SocialMediaToken.class

package com.example.harry.ophemeApp.socialMedia;

// used to create the social media varaibles/tokens which are used for

// the instagram login

public class SocialMediaToken {

public String type;

public String userName;

public String token;

public String secret;

public SocialMediaToken(String type, String userName, String token, String secret) {

this.type = type;

this.userName = userName;

this.token = token;

this.secret = secret;

}

}

Terms_conditions.class

Page 99: 1112566_Dissertation

99

package com.example.harry.ophemeApp;

import android.app.Activity;

import android.os.Bundle;

import android.webkit.WebView;

import android.widget.Button;

public class Terms_conditions extends Activity {

Button previousButton;

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.term_conditions);

// used to set up and create the web view for the TC and view

WebView browser = (WebView) findViewById(R.id.WebView);

browser.getSettings().setLoadWithOverviewMode(true);

browser.getSettings().setUseWideViewPort(true);

// the web view URL

browser.loadUrl("http://www.opheme.com/terms");

}

}

ThirdFragment.class

package com.example.harry.ophemeApp;

import android.content.Intent;

import android.os.Bundle;

import android.support.v4.app.Fragment;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import android.widget.Button;

import android.widget.EditText;

public class ThirdFragment extends Fragment {

// create variables for buttons and text fields

Button regButton;

Button signInButton;

EditText userName;

EditText password;

// default username and password

String userN = "1112566";

String passwd = "1112566";

Page 100: 1112566_Dissertation

100

// set up the third fragment

public static ThirdFragment newInstance(String text) {

ThirdFragment f = new ThirdFragment();

Bundle b = new Bundle();

b.putString("msg", text);

f.setArguments(b);

return f;

}

// inflate the third fragment view

@Override

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle

savedInstanceState) {

View view = inflater.inflate(R.layout.third_frag, container, false);

// initalise buttons and text fields

regButton = (Button) view.findViewById(R.id.regButton);

signInButton = (Button) view.findViewById(R.id.signInButton);

userName = (EditText) view.findViewById(R.id.userNameEditText);

password = (EditText) view.findViewById(R.id.passwordEditText);

//used to create intent for reg Button which will open the user register class

regButton.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

Intent i = new Intent(view.getContext(), UserRegister.class);

startActivityForResult(i, 0);

}

});

// create on click listener for sign in button

signInButton.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

// convert text fields to text

String userNames = userName.getText().toString();

String passwords = password.getText().toString();

// check if username and password fields are equal to the above

if (userNames.equals(userN) && passwords.equals(passwd)) {

Page 101: 1112566_Dissertation

101

// used to display welcome message box on sign in

AlertBox.alertBox(view.getContext(),

getString(R.string.welcome_user_sign_in) + userNames, "");

AlertBox.timer(3);

// Intent j = new Intent(view.getContext(), MainMap.class);

Intent j = new Intent(view.getContext(), MenuFragDrawer.class);

startActivityForResult(j, 0);

// call methods to check fields arent empty, display message box if they

are

} else {

emptyFields(userN, passwd);

AlertBox.alertBox(view.getContext(), getString(R.string.error_title),

getString(R.string.incorrect_login_details));

}

}

});

return view;

}

// method used to check if text fields arent empty

public boolean emptyFields(String userN, String passwd) {

if (userN.equals("") || passwd.equals("")) {

return true;

}

return false;

}

}

TwitterLoginFrag.class

package com.example.harry.ophemeApp;

//import android.support.v4.app.Fragment;

import android.app.Fragment;

import android.content.Intent;

import android.os.Bundle;

import android.util.Log;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import android.widget.Toast;

import com.example.harry.ophemeApp.server.ServerInteraction;

import com.example.harry.ophemeApp.server.ResponseClass;

import com.example.harry.ophemeApp.socialMedia.SocialMediaToken;

Page 102: 1112566_Dissertation

102

import com.example.harry.ophemeApp.utility.ToastClass;

import com.twitter.sdk.android.core.Callback;

import com.twitter.sdk.android.core.Result;

import com.twitter.sdk.android.core.TwitterAuthToken;

import com.twitter.sdk.android.core.TwitterException;

import com.twitter.sdk.android.core.TwitterSession;

import com.twitter.sdk.android.core.identity.TwitterLoginButton;

public class TwitterLoginFrag extends Fragment {

protected TwitterLoginButton loginButton;

// used to set up and store Twitter details of the user

public TwitterLoginFrag() {

}

// inflates fragment

@Override

public View onCreateView(LayoutInflater inflater, ViewGroup container,

Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.account_screen, container, false);

loginButton = (TwitterLoginButton)

rootView.findViewById(R.id.twitter_login_button);

loginButton.setCallback(new Callback<TwitterSession>() {

@Override

public void success(Result<TwitterSession> result) {

// used to store users twitter information

String userName = result.data.getUserName();

TwitterAuthToken authToken = result.data.getAuthToken();

String token = authToken.token;

String secret = authToken.secret;

SocialMediaToken tokenInfo = new SocialMediaToken("Twitter", userName,

token, secret);

ServerInteraction.storeSocialMediaToken(getActivity(), tokenInfo);

}

@Override

public void failure(TwitterException exception) {

// Do something on failure

Log.d("twitter-auth-fabric-", "EXCEPTION: " + exception.getMessage());

}

});

Page 103: 1112566_Dissertation

103

return rootView;

}

@Override

public void onActivityResult(int requestCode, int resultCode, Intent data) {

Log.d("twitter-auth-fabric", "data received, TWITTER FABRIC , passing it to

twitter button");

// pass activity result to the twitter button

loginButton.onActivityResult(requestCode, resultCode, data);

}

}

UserRegister.class

package com.example.harry.ophemeApp;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.widget.Button;

import android.widget.CheckBox;

import android.widget.EditText;

public class UserRegister extends Activity {

// delaring variables

Button create_account_mainMapButton;

Button tCButton;

EditText emailAddress;

EditText firstName;

EditText password;

EditText passwordConfirmation;

CheckBox tcCheckBox;

String email = "1112566";

String fName = "1112566";

String passwd = "1112566";

String passwd1 = "1112566";

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.user_register);

// initalize fields and buttons

Page 104: 1112566_Dissertation

104

emailAddress = (EditText) findViewById(R.id.emailRegEditText);

firstName = (EditText) findViewById(R.id.firstNameRegEditText);

password = (EditText) findViewById(R.id.passwordRegEditText);

passwordConfirmation = (EditText)

findViewById(R.id.passwordConfirmRegEditText);

tcCheckBox = (CheckBox) findViewById(R.id.terms_ConditionsCheckBox);

tCButton = (Button) findViewById(R.id.tCButton);

// creating button to go to map fragment/intent to go to map fragment

create_account_mainMapButton = (Button)

findViewById(R.id.createAccountButton);

create_account_mainMapButton.setOnClickListener(new View.OnClickListener()

{

public void onClick(View view) {

//convert fields to string

String emailAddress1 = emailAddress.getText().toString();

String firstName1 = firstName.getText().toString();

String password1 = password.getText().toString();

String passwordConfirmation1 = passwordConfirmation.getText().toString();

// checks if fields are the same as the values

if (emailAddress1.equals(email) && firstName1.equals(fName)

&& password1.equals(passwd) &&

passwordConfirmation1.equals(passwd) && isCheck1) {

// call the alreat box to display meesage on the screen

AlertBox.alertBox(view.getContext(),

getString(R.string.welcome_user_sign_in) + firstName1, "");

// removes alert box after 3 seconds

AlertBox.timer(3);

// create and call new intent to open new class

Intent j = new Intent(view.getContext(), MenuFragDrawer.class);

startActivityForResult(j, 0);

} else {

// performs error checking on fields, making sure they match or arent

empty

// making sure check box is checked

passwordChecking(passwd, passwd1);

emptyFields(email, fName, passwd, passwd1);

termConditionsChecked();

// displays alert box if there was an error in the fields

AlertBox.alertBox(view.getContext(), getString(R.string.error_title),

"There was an error in the fields, try again");

}

}

});

Page 105: 1112566_Dissertation

105

// used to open a new class and screen, terms_condtions.class

tCButton.setOnClickListener(new View.OnClickListener() {

public void onClick(View arg0) {

// create and call new intent to open new class

Intent k = new Intent(arg0.getContext(), Terms_conditions.class);

startActivityForResult(k, 0);

}

});

// method used to check if check box is checked

tcCheckBox.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {

if (tcCheckBox.isChecked()) {

isCheck1 = true;

}

}

});

}

public boolean isCheck1;

// used to check check if checkbox is equal to true or false

public boolean termConditionsChecked() {

if (isCheck1 == true) {

return true;

}

return false;

}

// method used to check if the password fields match

public boolean passwordChecking(String passwd, String passwd1) {

if (passwd.equals(passwd1)) {

return true;

}

return false;

}

// method used to check if any of the fields are empty

public boolean emptyFields(String fName, String email, String passwd, String

passwd1) {

if (fName.equals("") || email.equals("") || passwd.equals("") || passwd1.equals(""))

{

return true;

}

return false;

}

}

Page 106: 1112566_Dissertation

106

account_screen.xml

first_frag.xml

Page 107: 1112566_Dissertation

107

fourth_frag.xml

Page 108: 1112566_Dissertation

108

main_map.xml

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

<FrameLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical">

<LinearLayout

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent">

<fragment

android:id="@+id/map"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:name="com.google.android.gms.maps.MapFragment"/>

</LinearLayout>

</FrameLayout>

main_sliding_drawer.xml

<android.support.v4.widget.DrawerLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/drawer_layout"

android:layout_width="match_parent"

android:layout_height="match_parent">

<!-- Framelayout to display Fragments -->

<FrameLayout

android:id="@+id/frame_container"

android:layout_width="match_parent"

android:layout_height="match_parent"/>

<!-- Listview to display slider menu -->

<ListView

android:id="@+id/list_slidermenu"

android:layout_width="240dp"

android:layout_height="match_parent"

android:layout_gravity="start"

android:choiceMode="singleChoice"

android:divider="@color/list_divider"

Page 109: 1112566_Dissertation

109

android:dividerHeight="1dp"

android:listSelector="@drawable/list_selector"

android:background="@color/list_background"/>

</android.support.v4.widget.DrawerLayout>

second_frag.xml

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

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@drawable/gradient">

<TextView

android:id="@+id/tvFragSecond"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerHorizontal="true"

android:layout_centerVertical="true"

android:textSize="26sp"

/>

<TextView

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/opheme_discover_title"

android:id="@+id/ophemeDiscoverTitleTextView"

android:layout_alignParentTop="true"

android:layout_centerHorizontal="true"

android:textSize="@dimen/text_size_title"

android:paddingTop="@dimen/title_frag_padding"

Page 110: 1112566_Dissertation

110

android:layout_gravity="center_horizontal"

android:gravity="center_horizontal"

android:textColor="@color/frag_text_color"/>

<TextView

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/opheme_discover"

android:id="@+id/ophemeDiscoverTextView"

android:textSize="@dimen/text_size_body"

android:paddingTop="@dimen/title_frag_padding"

android:layout_gravity="center_horizontal"

android:gravity="center_horizontal"

android:textColor="@color/frag_text_color"

android:layout_centerVertical="true"

android:layout_alignParentLeft="true"

android:layout_alignParentStart="true"

android:paddingLeft="@dimen/textbox_padding"

android:paddingRight="@dimen/textbox_padding"/>

</RelativeLayout>

terms_condtions.xml

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

<LinearLayout

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

xmlns:android="http://schemas.android.com/apk/res/android"

android:background="@drawable/gradient"

android:textColor="@color/frag_text_color">

<WebView

android:id="@+id/WebView"

android:layout_width="match_parent"

android:layout_height="match_parent">

</WebView>

</LinearLayout>

third_frag.xml

Page 111: 1112566_Dissertation

111

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

<GridLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:layout_centerHorizontal="true"

android:background="@drawable/gradient"

android:orientation="vertical">

<TextView

android:id="@+id/tvFragThird"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_column="0"

android:layout_row="0"/>

<TextView

android:id="@+id/signUpTextView"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_column="0"

android:layout_gravity="center_horizontal"

android:layout_row="1"

android:gravity="center_horizontal"

Page 112: 1112566_Dissertation

112

android:paddingTop="@dimen/title_frag_padding"

android:text="@string/sign_in"

android:textColor="@color/standard_text_color"

android:textSize="30sp"/>

<EditText

android:id="@+id/userNameEditText"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_column="0"

android:layout_row="2"

android:editable="true"

android:hint="@string/hint_username"

android:paddingTop="@dimen/editbox_padding_side"

android:textColorHint="@color/standard_text_color"/>

<EditText

android:id="@+id/passwordEditText"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_column="0"

android:layout_gravity="center_horizontal"

android:layout_row="3"

android:editable="true"

android:hint="@string/hint_password"

android:inputType="textPassword"

android:paddingTop="@dimen/editbox_padding_side"

android:textColorHint="@color/standard_text_color"

/>

<Button

android:id="@+id/signInButton"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_gravity="center_horizontal"

android:layout_marginTop="@dimen/button_padding"

android:ems="10"

android:gravity="center_horizontal|fill_vertical"

android:text="@string/sign_in_btn"/>

<Button

android:id="@+id/regButton"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_column="0"

android:layout_gravity="center_horizontal|bottom"

android:layout_marginBottom="@dimen/button_bottom_padding"

android:layout_row="4"

android:ems="10"

Page 113: 1112566_Dissertation

113

android:gravity="center_horizontal|fill_vertical"

android:text="@string/reg_btn"

android:textColor="@color/standard_text_color"/>

</GridLayout>

user_register.xml

String.xml

<!--String.xml file, used to display text on the application -->

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

<resources>

<string name="app_name">1112566</string>

<string name="action_settings">Settings</string>

<string name="whats_opheme_title">What is 1112566?</string>

<string name="whats_opheme">1112566 offers location aware, multi platform social

media monitoring combined with a host of filters and alerts.</string>

<string name="opheme_discover_title">1112566 Discover</string>

<string name="opheme_discover">Search any geographical area and watch social

media activity as it happens. Filter for any keyword or hashtag.\n\nShare your findings

with the entire World! Use the built-in Tweet feature to let everyone know about

it!</string>

<string name="opheme_campaign_title">1112566 Campaign</string>

<string name="opheme_campaign_point1">Automatically messages potential

Page 114: 1112566_Dissertation

114

customers nearby as they interact with social media.</string>

<string name="opheme_campaign_point2">Actively monitors and detects when

someone is using social media such as Twitter in a particular area.</string>

<string name="opheme_campaign_point3">Directly message your potential

customers on your behalf, alerting them to promotions or offers you might have near to

them.</string>

<string name="opheme_campaign_point4">It removes the headache of complicated

marketing strategy and delivers a relevant message to recipients about an event or offer

near them. If your target customers are more likely

to be in a particular place around a given time or day further

refine your campaign using additional filters.</string>

<string name="username">UserName</string>

<string name="password">Password</string>

<string name="hint_username">Enter UserName</string>

<string name="hint_password">Enter Password</string>

<string name="reg_btn">Register</string>

<string name="sign_in">Sign In</string>

<string name="sign_in_btn">Sign In</string>

<string name="register_title">Register</string>

<string name="hint_email">Enter Email Address</string>

<string name="hint_first_name">Enter First Name Only</string>

<string name="hint_confirm_password">Confirm Password</string>

<string name="create_account">Create Account</string>

<string name="Terms_Conditions">I have read and agreed to the Terms and

Conditions</string>

<string name="error_title">Error</string>

<string name="incorrect_login_details">Incorrect login details. Please try

again.</string>

<string name="welcome_user_sign_in">Welcome </string>

<string name="missing_details_registration">Registrations details missing, please

enter all details.</string>

<string name="unmatching_password_registration">Passwords do not match. Please

try again</string>

<string name="tick_tc_registration">Please read/tick Terms and Conditions

box</string>

<string name="email_format_registration">Email address is not in the correct

format, Please try again.</string>

<string name="account_screen_title">Account Information</string>

<string name="account_screen_firstname">First Name</string>

<string name="account_screen_lastname">Last Name</string>

<string name="account_screen_email">Email Address</string>

<string name="account_screen_phone_number">Phone Number</string>

<string name="account_screen_save_changes">Save Changes</string>

Page 115: 1112566_Dissertation

115

<string name="account_screen_firstname_default">1112566</string>

<string name="account_screen_lastname_default">1112566</string>

<string name="account_screen_email_default">[email protected]</string>

<string name="account_screen_phone_number_default">01223 112233</string>

<!--All part of sliding menu-->

<string name="drawer_open">Slider Menu Opened</string>

<string name="drawer_close">Slider Menu Closed</string>

<!-- Nav Drawer Menu Items -->

<string-array name="nav_drawer_items">

<item>Map</item>

<!--<item>Instagram</item>-->

<item>Account</item>

</string-array>

<array name="nav_drawer_icons">

<item>@drawable/google_maps_icon</item>

<!--<item>@drawable/instagram_icon</item>-->

<item>@drawable/ic_home</item>

</array>

<string name="desc_list_item_icon">Item Icon</string>

</resources>

Color.xml

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

<resources>

<color name="backgroud_blue">#04AFF7</color>

<color name="text_color">#FFFFFF</color>

<color name="frag_text_color">#000000</color>

<color name="standard_text_color">#000000</color>

<color name="counter_text_bg">#626262</color>

<color name="list_item_title">#fff</color>

<color name="list_background">#303030</color>

<color name="list_background_pressed">#992416</color>

<color name="list_divider">#272727</color>

<color name="counter_text_color">#c5c4c4</color>

</resources>

dimens.xml

<resources>

<!-- Default screen margins, per the Android Design guidelines. -->

<dimen name="activity_horizontal_margin">16dp</dimen>

Page 116: 1112566_Dissertation

116

<dimen name="activity_vertical_margin">16dp</dimen>

<dimen name="editbox_padding_side">20dp</dimen>

<dimen name="title_frag_padding">10dp</dimen>

<dimen name="button_padding">20dp</dimen>

<dimen name="button_bottom_padding">10dp</dimen>

<dimen name="textbox_padding">5dp</dimen>

<dimen name="text_size_body">25sp</dimen>

<dimen name="text_size_title">30sp</dimen>

</resources>

Page 117: 1112566_Dissertation

117

Appendix II

Poster:

Page 118: 1112566_Dissertation

118