Escolar Documentos
Profissional Documentos
Cultura Documentos
Keio University
5322 Endo Fujisawa Kanagawa 252-8520 JAPAN
Submitted in partial fulllment of the requirements
for the degree of Bachelor
Advisors:
Professor Tatsuya Hagino
Associate Professor Takashi Hattori
rSystem:
(LBSNS)
LBS
rSystem
rSystem
rSystem
ii
Contents
1 Introduction
1.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2
Structure of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
2.3
2.3.1
2.3.2
2.3.3
Geosocial Networking . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4
3.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
3.2.1
3.2.2
10
3.2.3
11
3.2.4
12
3.3
Related Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3.4
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
iii
15
4.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
4.2
15
4.3
Conceptual Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
4.3.1
16
4.3.2
18
Technical Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
4.4.1
. . . . . . . . . . . . . .
19
4.4.2
Positioning Method . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
4.4.3
Map-based Interaction . . . . . . . . . . . . . . . . . . . . . . . . . .
23
4.4.4
24
4.5
Possible Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.6
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
4.4
27
5.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
5.2
System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
5.3
29
5.4
Implementation of rServer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
5.4.1
Worker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
5.4.2
Database Management . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.4.3
Twitter Streamer . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.4.4
33
Implementation of rClient . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
5.5.1
35
5.5.2
Mapping Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
5.5.3
Location Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
5.5.4
rNotify Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
5.5
iv
5.6
41
5.7
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
6 Evaluation of rSystem
43
6.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
6.2
. . . . . . . . . . . . . . . .
43
6.2.1
43
6.2.2
45
47
6.3.1
47
6.3.2
48
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
6.3
6.4
51
A Appendix
57
List of Tables
2.1
4.1
22
5.1
30
6.1
44
6.2
46
6.3
47
6.4
48
6.5
49
vi
List of Figures
2.1
4.1
System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
4.2
rEvent Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
4.3
rNotify Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
4.4
23
4.5
24
5.1
28
5.2
29
5.3
rServer Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
5.4
Master-Worker Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
5.5
rClient Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
5.6
36
5.7
37
5.8
38
5.9
rNotify Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
6.1
Samsung Galaxy S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
6.2
50
vii
Chapter 1
Introduction
1.1 Introduction
Since the introduction of Web 2.0, Social Network Service (SNS) has become one of the most
used online service on the Internet. In the past few years, many advances in both content
and technology of SNS have been seen, especially the development of mobile technology
which has set the trend for current Web-based SNS such as Facebook, Myspace and Twitter
to turn into mobile. Moreover, it is this development of mobile technology that did not only
resurrect Location-based Service (LBS) but also allowed it to spread into social networking to create the pattern of Location-based Social Networking Service (LBSNS), in which
geographical location is utilized in order to provide location-related social service. Along
with real-time concept, location-based concept is currently the setting trend for the future
of social networking.
However, as well as LBS in general, LBSNS is also facing identical problem which is
the lack of proactiveness. Especially when current trend Social Check-in will no longer
attract users interest, next generation of service that oers new user experience is highly
expected. Therefore, in this thesis we propose rSystem, a LBS that focuses on social event
and oers a proactive notication which bases on location of a user to proactively inform him
with nearby event. Because LBSNS often involves location-tracking, there are also several
challenges that come up during development of rSystem, which are positioning method and
users concern for privacy that need to be considered. And nally, as well as developing any
service users satisfaction is also a great challenge of our system. This thesis also emphasizes
on our approach and solution toward those problems and challenges.
Chapter 2
Background: The Prospect of
Location-based in SNS
2.1 Introduction
This chapter describes the overlook of location-based concept in social networking. In the
rst section, the background of SNS and its future possibilities are introduced. The next
section discusses about LBSNS and its emergence in social networking, as well as geosocial
networking which is currently the mainstream of LBSNS at the moment.
Twitter, Friendster, Myspace (North America), Mixi (Japan) and Cyword (Korea) with
approximately 800 million registered user currently [1, 14, 24, 25].
Twitter, one of the most well-known social network sites that we mentioned above, is
a good example of a successful service, which oers a social networking and microblogging
service, enabling its users to send and read other users messages called tweets . Tweets are
text-based posts of up to 140 characters displayed on the users prole page [13]. Twitter
set the trend for real time services, where users can broadcast to the world what they are
doing, or what is on their minds within 140 character limit. It is its simplicity that makes
Twitter popular, especially among always-connected generation, who use handheld devices
to organize their lives and coordinate social interactions, because Twitter enables them to
update as well as stay updated with the latest information in such short and simple tweets.
Recently with development of mobile Internet, an explosively increasing number of users
are performing their daily Internet activities such as surng web, reading news, checking
mail as well as social networking via their handheld. Researchers have shown that mobile
Internet is expected to take over by 2015 [5].Therefore, it is highly possible that future trend
for SNS will be a signicant movement to mobile device.
Development of mobile devices with such technologies as satellite positioning and cellular positioning, have as well made mobile tracking possible within an aordable cost. It
is this essential improvement of location service that enabled LBS, a new trend of social
network service which utilizes location information. Along with real-time-based, the concept
of location-based is currently and will continue to be the key terms for the development of
social networking in the future.
Initializing
Condition
Interaction
Location tracking
Reactive
Requested by User
User invokes
Synchronous
Once
Proactive
Self-initialized
Predened event occurs
Asynchronous
Permanently
Figure 2.1: The Evolution of Location-based Services as described in LBS: Back to the
Future [4]
collected in our system, which we would mention in later chapter, also revealed that more
than 31% of tweets containing geotagging in Japan in 24 hours came from users using
Foursquare which was 8634 over 27649 tweets. This fact proves that social check-in has been
signicantly popular among users and is believed to be one of the most successful LBSNSs
so far.
2.4 Summary
In this chapter, we have mentioned about the background of SNS and its two concepts of
real-time and location-based. With the rise of mobile internet and the increasing use of
mobile devices and development in mobile technology, that location-based is expected to be
the ideal tendency for social networking as more and more LBSNSs would be available in
the near future.
Chapter 3
Problem, Motivation and Related
Works
3.1 Introduction
This chapter discusses the problems in developing LBS at the present. They are the lack of
proactive service, the need of new user experience and users concern for privacy when using
LBS. Understanding these issues, we would like to introduce our motivation in this project
and related works on the problem.
10
Indeed, with these services users are able to share their location information with others.
However there is not much service that is able to provide users with useful adding values
on the given location such as places of interest, local events, trac information or weather
information. Therefore, the need of new user experience should also be considered when
developing a new LBSNS in the future.
11
each other with their location histories. By mining users location history and their friends
activities , GeoLife is able to predict the individuals interest in the locations to suggest
recommendation about places of interest.
The importance of proactive service is also agreed by some previous research. For example, Location Based Community Services [10] is a service emphasizing on friend nder and
sharing notes among users. On their work, they found out the requirement of proactiveness
and Push-based interaction as well as determined privacy as serious issue to consider.
3.4 Summary
With recent advancement of technology, we are now able to break through the restrictions
that previous works were limited. For this reason, we would like to introduce our proposal
on solving the problem in the next chapters by introducing rSystem, a location-based event
service with proactive notication.
14
Chapter 4
rSystem, A Location-based Event
Service with Proactive Notication
4.1 Introduction
This chapter contains our approach on the problems stated in the previous chapter by proposing rSystem, a location-based event service with proactive notication. Starting with system
overview, this chapter emphasizes on rSystem and the conceptual approaches and technical
approaches that is applied in the system. Finally, we describe some scenarios where rSystem
might prove to be useful in real life.
cesses data of users and events while a mobile application works as a client to track location,
handle user interaction and provide notication service. Server-Client model is considered
to help reduce clients workload, which suits our implementation on mobile devices.
16
of users taking part in an event, it is also possible to count the number of participants,
which would give a user additional data when he is looking for interesting events.
2. The factor of time, which expresses the period of time when the event occurs, is
bounded by start time and end time value. An event is considered to be ongoing if
current time is in this events occurring period.
3. The location-based characteristic of rEvent is achieved because of the fact that location
element plays the most important role in an events data. Location information is
described by geo location which is constructed from a pair of latitude and longitude
value. Based on these values, distance between two points can be calculated by using
Haversine formula as below.
haversin
( )
d
R
given that
haversin () = sin2
( )
18
main program as well as keep track of users location. Therefore we propose such approach
to work on this problem.
rNotify consists of two modules, shown in Fig. 4.3. The rst module constantly requests
for location information of user from the devices positioning service. The other stays updated with database of events by continuously sending request and processing response. If an
event matches any condition of ongoing or nearby event, rNotify will attract users attention
by sending notication such as playing sound or vibrating.
service well-known for its simplicity and trendy. According to Compete.com, Twitter is
ranked as the third most used social network service in all over the world with 175 million
registered users, and 95 million tweets per day [11, 14].
In Japan, Twitter also witnessed an impressive rise as it has grown by 400% in 2010
to reach 13.2 million users, in comparison with 13.5 million of Mixi.jp - the largest SNS so
far [17].
Twitter is also considered the most open of all social networks by providing an API which
allows outside developers access users status updates. The Twitter API basically consists of
two REST APIs and a Streaming API. The formers enable developers to access core Twitter
data within a rate limitation while the latter provide near real-time high-volume access to
Twitters status stream.
There are three advantages of implementing our system on Twitter. Firstly, Twitter
has numerous users, many of who are tweeting via applications on their mobile devices.
Implementing rSystem into a Twitter application allows users to try the service without the
inconvenience of moving to a new SNS, thus make it more acceptable.
On the other hand, Twitter API is an ideal tool for developing services, including geo
methods for developing location-related services. This allows developers to build applications
on top of Twitter infrastructure and come up with many ideas which are even better than the
Twitters original basic function. Furthermore, Twitter API has a large number of libraries
which are available for almost every programming language. In this case of rSystem, we used
Twitter4J [27] developed by Yusuke Yamamoto, which is an open-sourced, mavenized and
Google App Engine safe Java library for the Twitter API, released under the BSD license.
Finally, by implementing on Twitter rSystem has the capability to send update about
event to Twitter as tweet, such as when a user creates an event or joins an event. And on
the contrary it is also possible to get event updates from Twitter stream, for example getting
new events update posted as tweet by Twitter user. This enables the sharing of information
between rSystems users and users who do not use the system, as well as produces the social
aspect of rSystem.
20
Moreover with the ability to access Twitter data, rSystem oers nearby tweet and nearby
friend function, the former of which displays tweets that is sent around a specic place
while the latter displays friends of a user who is currently nearby. Its allows users to have
knowledge about people and events happening around them, which contributes to help them
with decision in creating or joining event as well as inviting friends to an event.
Dead Reckoning
Method
Respond time
Accuracy
Powerconsumption
Estimating on last
known location
Immediately
Very low
None
Network
Positioning
Cellular & WiFi
based sensing
Fast
Medium
High
GPS Positioning
Satellite sensing
Slow
High
Very high
Because each method has its advantage and disadvantage, the balance between accuracy,
speed and battery-eciency requires a lot of consideration. On this specic case of rSystem,
we implemented a positioning module which maintains the best estimate while keep the
consumption of power minimum and response time acceptable.
In order to maintain the best estimate of location, new location acquired by any method is
compared to the current best considered location by considering the time of acquiring, source
and accuracy. If the new location does not satisfy these conditions, it will be dismissed.
Based on the characteristic of each method, we applied following policy to balance between accuracy and battery-eciency as shown in Fig. 4.4.
Because Dead Reckoning is considered to be the worst estimate, therefore even when
the location is determined by last known data other location-sensing processes will
continue to work for a specied period before self-stopping.
Secondly, Cellular and WiFi access point based is believed to be not as precise as
GPS however it can provide quick response. For this reason, after new location is
obtained, Network positioning process is stopped while GPS will continue to work for
a predened period before self-stopping.
GPS is considered to be the most accurate source. Therefore after data from this
source is obtained all location-sensing processes including GPS positioning itself will
be stopped.
22
Figure 4.4: Combination of 3 Positioning Methods: GPS, Network and Dead Reckoning
When it comes to proactive notication service, keeping track of users location is necessary.
However, because the requirement of power-conserving should also be considered seriously,
we placed a limitation of minimum time interval between requests from rNotify to devices
positioning service. In other words, rNotify keeps track of users location by continuously
send request to devices location service but only after restricted time could it request for
the next update of location data.
interaction is deployable.
In rSystem, we introduce a map-based interaction, in which the output data is mainly
displayed on map such as Tweets or events. On the other hand, input location data can
also be inserted by directly selecting from items on the map. With map-based interaction,
rSystem is exptected to bring up new user experience. The implementation of map-based
interaction will be discussed in detail in next chapter.
Maps
without saving it inside the system. In notication function where tracking of users location
is employed, request is sent from client without any location data. After receiving reply from
server, the client itself checks for matching conditions between location of events and current
position. This method is known as location-aware which the device itself has the knowledge
about its current location, and by self-monitoring it noties user where he approaches to an
event.
Secondly, although users location is not recorded, his trace is still stored in some cases,
for example by creating, joining an event, sending tweet. The rst measure is simply allowing
him to decide whether to send his location data such as tweet without location or create
event with null location. On the other hand, if he approves to send his location, a measure
to protect this data is required. rSystem applied a protection that a user is not able to see
who participate in the event except for the total number of attendants. Finally, in order to
avoid the threat of exposure of transmission between server and client, request and response
are encrypted as a security enhancement implemented in rSystem.
25
Ken, Tom and Yuri is students of a workgroup. They have group meeting everyweek but
the location and time is usually not xed. Ken uses rSystem to set up a meeting by creating
an event for group and adding his friends username into the participant list. Finally, he sets
up the time and location for the meeting. Tom and Yuri who are also using rSystem on
their mobiles, immediately receive notication about the event meeting by Ken. By using
rSystem, they are able to see the location where the meeting will take place. When its time
for the meeting, their mobiles ring and remind them to go. They immediately leave for the
place.
Takeshi is a event organizer. One time, he is hired to hold a festival where a lot of people
are expected to join. In order to promote for this event, he decides to send this event to
rSystem as a public event. He does not use rSystem on his phone, however he uses a Twitter
application to send tweet to Twitter with #rmemo hashtag containing information about
the festival. Ken, Tom and Yuri are currently going out nearby, they use rSystem to search
for nearby entertainment event and they notice about Hondas festival. They think it is
interesting so they decide to participate.
In these scenarios, it is proved that rSystem is considerably helpful in daily life. By using
rSystem application on mobile devices, users can schedule reminder, arrange meeting as well
as publicize event to others.
4.6 Summary
As an approach to the pointed out problem, in this chapter we have introduced rSystem and
its main features and methods including proposing rEvent, a location-based event service and
rNotify, a proactive notication which are the core of the system in the hope of bringing new
user experience. An approach to take full advantage of mobile devices available locationservices to provide estimation with acceptable accuracy while conserving energy has also
been introduced as well as our solution on privacy problem.
26
Chapter 5
Design and Implementation of
rSystem
5.1 Introduction
This chapter emphasizes on the design and implementation of rSystem that was discussed
in the previous chapter. Starting with the design of system and data model, details of the
system implementation including server and client as well as their modules and functions
will be described in the following sections.
which were sent from Twitters user via website and other applications. The other utilizes
REST API to provide access to data of Twitters user such as updating status, obtaining
time line.
rClient is a mobile application which contains following functions.
Handle request/response with server
Provide UI with map and GUI
Track users current location
Notify user with events
Connection between rServer and rClient is maintained by a sequence of request/response
messages. Therefore the procedure of this operation can be described as follows. Firstly,
initialized by user or self-initialized in case of proactive notication, rClient sends a message
to server requesting for some data. Then, rServer processes this request and reply with a
response containing required data. Based on this data, rClient provides appropriate interaction with user, for example displaying events on a map or notifying nearby event with
28
sound.
There are two main entities in the data model of rSystem, which are user and event (see
Fig. 5.2). The relation between them describes the data of who takes part in what event.
As mentioned above, by deploying as a Twitter application, rSystem enables users to
access to their Twitter account via the client. Hence, data for Twitter authentication is
required, for example users email/username and password. However, in order to avoid the
exposure of sensitive data, we use the OAuth authentication, where instead of username and
password, an access token given by a combination of consumer key, consumer secret, token
key and token secret is used to gain access to a Twitter account. In particular, an application
must at rst register itself with Twitter to obtain consumer key and secret while token key
and token secret can be achieved by the permission of this user to allow the application to
read/write to his account.
User data model contains four attributes which are username, password, token and token
secret. Specically, username is a users Twitter screen name while password is his password
used in the system which will be stored in the database as the hash string generated from
the original password. Token and token secret store the data for OAuth authentication as
described above.
29
On the other hand, data model of an event includes title, author, location and time
related information. Location consists of latitude and longitude while time is constructed
from two attributes which are start_time and end_time.
Data is stored in a DBS implemented in server which means that no data will be kept at
clients, allowing the client to be more compact and database-platform-independent as well
as ensuring security better.
Specication
2 x Xeon L5520 CPU 6GB Memory
Virtual Server
2 core 1024MB Memory
CentOS version 5.5
enkaku.tom.sfc.keio.ac.jp
OpenJDK Runtime Enviroment
MySQL version 5.0.77
As described in Fig. 5.3, rServer contains four modules which are Worker, Database
Management, Twitter Streamer and Functional Module. Modules which require access to
Twitter are implemented with Twitter4J, a library for Java [27].
5.4.1 Worker
Worker module is a child thread created by servers main thread to handle request from
client (see Fig. 5.4). A worker thread is created when server accepts a new connection. It
then read the request sent by the client and analyzes format of the message. Depending on
the type of request Worker calls for the appropriate method of the Functional Module. After
obtaining the result data from this method, it produces response and reply to the client and
nally, ends itself assuming no error is found. Otherwise, Worker will throw exception before
self-terminating.
31
function. Currently, the lter is set to collect tweets that came from Japan only by bounding
the latitude and longitude values to a square containing Japan where the northeast corner
is (141.5, 43.1) of Hokkaido and the southwest corner is (129.5, 30.9) of Kagoshima.
On the other hand, rmemo hashtagged tweets contain data of rEvent, therefore they
are processed in a higher level of complexity. Firstly the location of event is expected to be
similar to the location of the tweet. The text content of this tweet is decomposed into pieces,
then by using a simple Natural Language Processing module, start time and end time data
is extracted as well as the attendants of the event.
Although this tweet is written in natural language, it is expected to have the following
format
content of event from start_time to end_time @participant1 @participant2 #rmemo
Given that, start_time and end_time describe the two time attributes which can be expressed in both absolute and relative syntax. Concretely, such absolute syntaxes as yy/
mm/dd or yyyy-mm-dd are accepted while relative syntaxes like now and tomorrow
are also recognizable. List of participants can be added using Twitters mention @ notation
and the hashtag #rmemo species tweet containing data of an event.
Twitter handler which handles request related to Twitter such as viewing home
time line, updating new status and nding nearby Twitter followers. Data is sent or
obtained from Twitter by using Twitter REST API. In order to provide information
nearby followers of a user, rServer looks for lastest tweets made by friends in his list,
and searchs for tweet containing location data. This location is considered as current
location of this friend if it is recent enough, specically within 6 hours from current
time.
Nearby tweet handler which handles request for nearby tweet. Instead of nding
nearby tweet by directly accessing Twitter data, this operation can be done by accessing
database of rServer, where geotagged tweets were stored in advance, thus enabling
response to be instantly obtained.
Weather handler which handles request for weather information of a specied location. Using Google Weather API to obtain an xml containing result from Google,
server will parse it to achieve the weather information for that place.
34
rClient consists of four modules which are Client, Mapping, Location service and rNotify
service (see Fig. 5.5).
specic location by looking in the rServers database instead of searching directly from
Twitter as mentioned above.
Weather handler provides weather information of a specied location.
are then placed to their exact locations dened by latitude and longitude values. For events
of which location is not dened or is null, they are displayed as onscreen items that are
not bound to a xed point but stick on the screen and move together with the screen when
the view changes hence the name onscreen item. In Fig. 5.7, events that a user decided to
take part in or was invited are displayed as red V mark icons while nearby public events are
displayed as blue ones and events without location as green onscreen items (see Fig. 5.7).
Besides mapping, in order to provide a full map-based interaction, user must be able to
directly interact with items on the map. Therefore we also implemented those overlays to
be touchable, in which those items will display their detailed information when their overlay
is touched as well as available activities such as join this event or delete this event. A touch
36
When location is requested, this module starts up by requesting for both GPS provider
and Network Provider if available. After 5 seconds, it applies for Dead Reckoning by calling for last known location. If this location satises an evaluation of time, accuracy and
37
(a) Pin is dropped to (b) Display Weather (c) Create a Tweet (d) Create an Event
Touch Point
Info
with this location
with this location
38
conditions, both GPS Provider and Network Provider is terminated which also nishes this
modules process.
This module is implemented as MyLocationManager class. In order to request for location
in another Acitivity, this Activity should be implemented with above interface, constructing
its own MyLocationManager instance and start locating by calling MyLocationManagers
startLocating() method, for example as shown in List 5.2.
Listing 5.2: Using Location-service in other Activity by implementing interface
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
private LocationManager lm ;
private MyLocationManager mlm ;
public class MappingActivity extends MapActivity implements MyLocation {
public void onCreate ( Bundle savedInstanceState ) {
// l o c a t i o n manager
lm = ( LocationManager ) this . getApplication ( ) . getSystemService ( LOCATION_SERVICE ) ;
mlm = new MyLocationManager ( this , lm , 0 ) ;
}
// s t a r t l o c a t i n g
public void doStartLocating ( View v ) {
if ( mlm . startLocating ( ) == false ) {
Toast . makeText ( this . getBaseContext ( ) , getText ( R . string . gps_disable ) , Toast . LENGTH_SHORT ) . show ( ) ;
}
else {
Toast . makeText ( this . getBaseContext ( ) , getText ( R . string . gps_enable ) , Toast . LENGTH_SHORT ) . show ( ) ;
}
}
}
In order to notify user with new event rNotify keeps track of the event list where after
receiving response any change indicates a new event therefore it will send a notication to
user about the new event. Similarly, rNotify keeps track of an ongoing list as well as a list
of nearby events to detect new ongoing event and nearby event.
(c) An
event
Listing 5.3: Calculating distance between two location with given co-ordinates
1
2
3
4
5
6
7
8
9
10
11
12
13
// h a v e r s i n e f o r m u l a
private boolean isNear ( double lat , double lon , int range ) {
if ( currentLat == 1 | | currentLon == 1)
return false ;
double earthRadius = 6 3 7 1 ;
double dLongRad = Math . toRadians ( lon currentLon ) ;
double dLatRad = Math . toRadians ( lat currentLat ) ;
double lat1Rad = Math . toRadians ( lat ) ;
double lat2Rad = Math . toRadians ( currentLat ) ;
double haversine = Math . sin ( dLatRad / 2 ) * Math . sin ( dLatRad ) + Math . cos ( lat1Rad ) * Math . cos ( lat2Rad ) * Math . sin ( dLongRad / 2 ) * Math . sin ( dLongRad/2) ;
double d = 2 * earthRadius * Math . asin ( Math . sqrt ( haversine ) ) ;
return d * 1000 < range ;
}
rNotify oers two kind of notication which are instant notication and constant notication (see Fig. 5.9(e)). Constant notication is shown by icons and a short statistical text
indicating the number of ongoing event and nearby event. While on the contrary, instant
40
notication is done by sending sound and vibration along with a text message when a new
event is found. Nearby events is detected by calculating distance from the event to users
current location by using an implementation of Haversine formula, as mentioned in List 5.3.
<memo>
<i d>1</ i d>
<l a t i t u d e>latitude</ l a t i t u d e>
<l o n g i t u d e>longitude</ l o n g i t u d e>
<c r e a t e b y>author</ c r e a t e b y>
< t i t l e>event data</ t i t l e>
<s t a r t>start time</ s t a r t>
<end>end time</ end>
<count>number of participants</ count>
</memo>
<memo>
<i d>2</ i d>
<l a t i t u d e>latitude</ l a t i t u d e>
<l o n g i t u d e>longitude</ l o n g i t u d e>
<c r e a t e b y>author</ c r e a t e b y>
< t i t l e>event data</ t i t l e>
<s t a r t>start time</ s t a r t>
<end>end time</ end>
<count>number of participants</ count>
</memo>
implemented in rSystem is AES cryptology provided by Java Security Package. AES Keypass
is currently pre-setup at both ends.
5.7 Summary
In this chapter, we have discussed on the design and implementation of rSystem which consists a Java multi-thread server deployed on a Server computer and an Android application
employed in Android mobile devices. By operating as background service, rNotify implemented in the client is able to proactively imform user with new events, ongoing events as
well as nearby events.
42
Chapter 6
Evaluation of rSystem
6.1 Introduction
To fully evaluate design and implementation of rSystem as well as the mixed locationservice technique proposed in the system, we introduce two types of evaluation. Firstly,
a quantitative analysis was applied to evaluate the positioning method in the matter of
accuracy and respond speed. Secondly, a qualitative evaluation by survey was conducted to
obtain users opinion and satisfaction with the system and its services. This chapter focuses
on describing those evaluation as well as their result.
43
position.
3. Evaluate its last estimation before the method stops listening.
Due to the fact that surrounding terrain does considerable inuence on location-sensing,
therefore above test was carried out in both urban area with lots of high obstacles and open
area.
Specication
Device
Samsung Galaxy S (Fig. 6.1)
Model number GT-I9000
Firmware
Android OS 2.2
CPU
ARM Cortex A8 1GHz
Memory
512MB RAM
Network
3G & WiFi
Table 6.1: Detailed Specication of Device used for Evaluating
rSystems positioning method was compared with following applications using same platform and hardware, described in Table 6.1.
44
Subject
rSytem
LbsTestMode
Maps Application
First estimation
Time Distance
1.5s
26.65m
2.3s
25.30m
3.0s
25.00m
108.0s 50.20m
30.0s 60.39m
12.0s 18.63m
3.5s
29.81m
1.0s
23.58m
3.0s
28.13m
Last estimation
Time Distance
14.0s 43.93m
62.3s 25.30m
14.0s 19.43m
108.0s 50.20m
30.0s 60.39m
12.0s 18.63m
3.5s
29.81m
60.0s 5.70m
120.0s 10.19m
Deriving from the result, the data proved that mixed method applied in rSystem was able
to provide result with acceptable accuracy and time, where preciseness inside 50 meter range
could be acquired within the rst 5 seconds. It was also considered to achieve eciency in
power-saving as the last estimation was determined within 60 seconds.
The second experiment produced result as demonstrated in Table 6.3. Because of being
surrounded with high obstacles, GPS did not work as well as Network sensing which had
advantage of the availability of Wireless APs and the better Cellular signal in municipal area.
For example, in case of rSystem, the rst estimation was produced by Network Provider,
which had the preciseness within 50m while the last estimation was usually given by GPS
which had the dierence at 70m-100m. This fact proved the necessity of utilizing both source
to determine users location.
Taking advantage of both positioning method, even operating in urban area, rSystem
was able to detect location within 60 seconds with the accuracy up to 50m. Because of the
fact that rSystems target is event, the range of 50m is acceptable for such outdoor event as
concerts, fairs or exhibitions.
In conclusion, in both experiments rSystem had the capability of determining location
with considerable preciseness while maintaining low power consumption. Moreover, although
it is still controversial issue to evaluate whether GPS or Network sensing is better in each
46
Subject
rSytem
LbsTestMode
Maps Application
First estimation
Time Distance
5.9s
50.30m
2s
30.71m
2.2s
37.86m
32.0s 77.57m
29.0s 38.26m
34.0s 112.92m
1s
37.31m
3.0s
38.59m
2.0s
45.20m
Last estimation
Time Distance
50.0s 180.97m
27.4s 71.29m
64.3s 37.86m
32.0s 77.57m
29.0s 38.26m
34.0s 112.92m
27s
110.95m
80.0s 164.45m
80.0s 38.12m
particular case, combination of both methods is proved to achieve good result since whatever
source is used, at least one estimation can be obtained in 60 seconds with acceptable accuracy,
which is a required ability when providing notication service.
47
Function
Self reminder
Group reminder
Event promotion
Event suggestion
Very
Useful
(2)
1
0
2
0
Useful
(1)
Average
(0)
Useless
(-2)
Total
6
5
5
7
1
3
1
1
0
0
0
0
0
0
0
0
1
0.625
1.125
0.875
Evaluation on rNotify
Secondly, participants were asked for their assessment for notication service, including
notication for new event, event that was about to start and nearby event. The result
48
shown in Table 6.5, expresses the fact that information of starting event and nearby event
were considered the most eective feature.
Function
Very
Useful
(2)
Overall notica- 2
tion service
Notify for new 1
event
Notify for starting 3
event
Notify for nearby 3
event
Useful
(1)
Average
(0)
Useless
(-2)
Total
1.125
1.25
1.25
Another interesting nd is that those instant type of notication was preferred than
constant notication because according to a participant, it was the instant notication that
helped them to notice the tasks they wanted to be reminded.
Evaluation on Map-based Interaction
All participants have used smartphone such as iPhone or Android so they are familiar with
the touch interaction. The survey revealed that the input of interaction, which allows
users to directly interact with maps items, was considered even more useful than the output
displaying items on the map as 8/8 participants agreed that the former was more helpful.
Evaluation on Privacy Problem
Before trying rSystem, 8 participants were asked whether they were concerned for privacy
problem, 100% of whom claimed that they would worry about the threat of being track
by other people. After being described with the privacy policy as well as security method
applied in rSystem, 3 of 8 participants acknowledged them as being good enough while 5
users appraised them as average level. As shown in Fig. 6.2, 25% of participants no longer
worry about above threat when using rSystem.
49
In conclusion, our user study shows that rSystem was considered useful with its capability of giving instant notication, especially when an event is about to start or when the
user approaches near an event, which reminded them about the event eectively. Besides,
the ability to publicize event is highly appreciated. This fact proves that the possibility
of location-based marketing or advertisement is practical. However, such service should
be considered carefully when developing because user are extremely concerned about their
privacy.
6.4 Summary
In this chapter, we have mentioned about our evaluating methods applied to rSystem. rSystem is appreciated for its usefulness and eectiveness of giving proactive notication. Technical approach applied in the system also achieved considerable accuracy on positioning, while
proved to be ecient on power-saving. Our privacy policy was proved to have inuence on
users concern for the problem as well.
50
Chapter 7
Conclusion and Future Work
In conclusion, rSystem have proved that location-awareness can oer user with more benet
if proactive service is added into LBS. In addition to traditional time-based notication, we
found out that location-based notication is highly appreciated.
When it comes to the concept of an event, location factor shows its usefulness by the
capability of providing many location-related service as well as enabling visualization of the
event on the map.
Since location-sensing is the key technology in a LBS, our research revealed that a method
taking advantage of both GPS and Network positioning as well as using Dead Reckoning
appropriately, could provide result with considerable accuracy within acceptable time while
achieving battery-eciency. Moreover, instead of having the system tracking users location, the method in which the application itself is aware of its current location to provide
corresponding reaction, was proved to be eective toward the problem of users concern for
privacy.
During our user study, we have acquired some valuable opinion for the development of
rSystem in the future. Firsly, the concept of event should be made more sophisticated, for
example event should be classied by type so that users can search for event matching their
interest. Moreover, in order to have a large database of event, event is expected to be created
not only by users, but also be collected from other sources of database. Finally, users are
looking forward to using the system on more platform, especially iPhone.
51
Acknowledgement
First of all, I would like to thank my advisor, Professor Tatsuya Hagino for his great advice,
guidance and encouragement during my research. I am also extremely grateful to Associate
Professor Takashi Hattori for his valuable comments and support on my project and this
thesis.
I am deeply thankful to Mr. Hiroto Yahagi and Mr. Junya Hirose for helping me a lot
since I joined HxH Lab., as well as all members of HxH Laboratory and POS group for their
great support and encouragement.
I highly appreciate my friends and my juniors from Vietnamese student group for their
precious aid when I carried out experiments on rSystem.
Last but not least, I am very grateful for receiving consecutive encouragement from my
family and my friends here in Japan during my study abroad.
52
Bibliography
[1] Mixi counter. http://s.hamachiya.com/mc/.
[2] Louise Barkhuus. Privacy in location-based services, concern vs. coolness. In Mobile
HCI 2004 Workshop on Location Systems Privacy and Control.
[3] Louise Barkhuus and Anind Dey. Location-based services for mobile telephony: a study
of users privacy concerns. In 9th IFIP TC13 International Conference on HumanComputer interaction, pages 709712.
[4] Paolo Bellavista, Axel Kpper, and Sumi Helal. Location-based services: Back to the
future. In IEEE Pervasive Computing, volume 7 Issue 2, pages 8589, April 2008.
[5] Je Bertolucci. Mobile internet to dominate within 5 years. http://www.pcworld.com/
article/184876/mobile_internet_to_dominate_within_5_years_study.html, December 2009.
[6] Sunny Consolvo, Ian E. Smith, Tara Matthews, Anthony Lamarca, Jason Tabert, and
Pauline Powledge. Location disclosure to social relations: Why, when, & what people
want to share. In In Proc. CHI, pages 8190. ACM Press, 2005.
[7] Goran M. Djuknic and Robert E. Richton. Geolocation and assisted gps. Computer,
34:123125, February 2001.
[8] Yan-David Erlich. Beyond the checkin: Where location-based social networks should
go next. http://mashable.com/2010/07/01/location-social-media, July 2010.
53
[9] William G. Griswold, Patricia Shanahan, Steven W. Brown, Robert Boyer, Matt Ratto,
and et al. Activecampus experiments in community-oriented ubiquitous computing.
IEEE Computer, 37:7381, 2003.
[10] Georg Groh and Christian Hillebr. Lbcslocation based community services: Proactive
lbs services for mobile communities in the research project cosmos. Technical report,
Technical University of Munich, 2004.
[11] Compete
Inc.
ter climbs.
Social
networks:
takes
over
top
spot,
twit-
http://blog.compete.com/2009/02/09/facebook-myspace-twitter-social-
http:/
/www.comscoredatamine.com/2010/11/twitter-sees-impressive-growth-in-japan,
November 2010.
[18] Mobile Advertising News. Grand Truth: Half of all the time spent on the mobile
internet is on Social Networking Sites. http://www.mobiadnews.com/?page_id=4529,
April 2010.
54
[19] Daniele Quercia, Neal Lathia, Francesco Calabrese, Giusy Di Lorenzo, and Jon
Crowcroft. Recommending social events from mobile phone location data. In ICDM10:
10th IEEE International Conference on Data Mining, pages 1417, 2010.
[20] Needleman Rafe, Claire Cane Miller, and Adrianne Jeries. Reporters roundtable:
Checking in with facebook and foursquare.
http://www.cnet.com/8301-30976_1-
http://
http://www.switched.com/2010/03/11/tweet-your-location-from-twitter-next-
55
http:/
/www.businessweek.com/technology/content/sep2009/tc20090927_138649.htm,
September 2009.
[29] Yu Zheng, Yukun Chen, Xing Xie, and Wei-Ying Ma. Geolife2.0: A location-based
social networking service. In Proceedings of the 2009 Tenth International Conference on
Mobile Data Management: Systems, Services and Middleware, MDM 09, pages 357
358, Washington, DC, USA, 2009. IEEE Computer Society.
[30] Kathryn Zickuhr and Aaron Smith.
services. http://www.pewinternet.org/Reports/2010/Location-based-services/Report/
Main-ndings.aspx, November 2010.
56
Appendix A
Appendix
Start Positioning using GPS, Network Provider and Dead
Reckoning
Listing A.1: Method used to start positioning
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
57
28
29
}
if ( locationManager . isProviderEnabled ( LocationManager . NETWORK_PROVIDER ) == true ) {
lastLocationNW = locationManager . getLastKnownLocation ( LocationManager . NETWORK_PROVIDER ) ;
if ( lastLocationNW != null ) {
// o n l y a c c e p t a c c u r a t e data
if ( isAccurate ( lastLocationNW ) ) {
bestLocation = lastLocationNW ;
myLocation . getLocation ( lastLocationNW ) ;
// w a i t f o r 120 more s e c o n d s f o r gps l o c a t i o n change
new Timer ( ) . schedule ( new TimerTask ( ) {
public void run ( ) {
// TODO Autog e n e r a t e d method s t u b
locationManager . removeUpdates ( locationListenerGPS ) ;
}
} , 120000) ;
// w a i t f o r 30 s f o r nw l o c a t i o n change
new Timer ( ) . schedule ( new TimerTask ( ) {
public void run ( ) {
// TODO Autog e n e r a t e d method s t u b
locationManager . removeUpdates ( locationListenerNW ) ;
}
} , 30000) ;
}
}
}
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
}
} , 5000) ;
boolean gps = false ;
boolean network = false ;
try {
gps = locationManager . isProviderEnabled ( LocationManager . GPS_PROVIDER ) ;
network = locationManager . isProviderEnabled ( LocationManager . NETWORK_PROVIDER ) ;
}
catch ( Exception e ) {}
if ( gps == false && network == false ) {
return false ;
}
else {
locationManager . requestLocationUpdates ( LocationManager . GPS_PROVIDER , minUpdateTime , 0 , locationListenerGPS ) ;
locationManager . requestLocationUpdates ( LocationManager . NETWORK_PROVIDER , minUpdateTime , 0 , locationListenerNW ) ;
return true ;
}
60
61
62
63
64
65
66
67
68
69
70
58
59
60
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
61