Case Mobile
Case Mobile
Case Mobile
71
SAETAK
Android OS je danas jedan od najrasprostranjenijih OS-a na novoisporuenim mobilnim i tablet ureajima. Razlog zbog
kojeg postoji interes za pisanjem o ovoj temi nije samo u tome to sve vie ljudi zamjenjuje rad na raunalima i laptopima
za rad na mobilnim ureajima i tabletima, ve to su u najnovijoj verziji Android OS-a implementirana inovativna i svjea
rjeenja koja korisniku omoguuju jednostavniji i bri rad, utedu energije, utedu vremena i manje uloenog novca. Rad
prikazuje nove pristupe i mogunosti trenutno najnovije verzije Androida 4.4. KitKat API-ja, koji jo nije toliko
rasprostranjen na tritu zbog ograniene dostupnosti na odreenim mobilnim ureajima i tabletima. Vei naglasak je
stavljen na primjenu tehnika i tehnologija koje su usko vezane za Cloud Computing, odnosno raunalstvo u oblaku. Neke
od novosti su ugraena mogunost za ispis sadraja prikazanog na ekranu pomou pisaa, uteda energije primjenom
senzora pokreta, novi pristup u organizaciji memorijskog i spremnikog prostora izvravanjem aktivnosti u pozadi OS-a,
smanjena mogunost ruenja aplikacija itd.
ABSTRACT
Android OS is today one of the most widespread used OS on mobile and tablet devices. The reason why there is an
interest in writing about this topic is not only because more and more people replace work on computers and laptops to
mobile devices and tablets, it is because in the latest version of the Android OS are implemented innovative and fresh
solutions that allow the user simpler and faster work, better energy, time savings and less invested money. This work
presents new approaches and opportunities currently on the latest version of Android 4.4. KitKat API, which has not
been so widespread on the market due limited availability on certain mobile devices and tablets. Bigger emphasis is
placed on the application of techniques and technologies that are closely related to cloud computing. Some of these
innovations in KitKat include integrated option to print the content on the screen using printer devices, saving energy with
using motion sensors, a new approach in the organization of memory and storage tank, performing those activities in the
background of the OS, the minimum possibility of demolition applications and so on.
1. INTRODUCTION
The first appearance of the Android OS on a mobile
device took place on the commercial market in
September 2008. It is developed by the Google
Corporation along with the Open Handset Alliance
(OHA). Since the first version until today, Google has
released 19 different versions of Application
Programming Interface (API). This number is impressing
considering that this was a period of less than six years.
According to available statistical data on worldwide
basis the number of new delivered units of the Android
OS in 2013 is greater than 500 million which is
equivalent to 78.60% of the worlds market, followed by
iOS with 26.90% and WP8 with 1.60% (MobiThinking,
2014). If we are looking only on Android OS statistics
(Android Developers, 2014a), currently the most
common and most popular version is Android Jelly Bean
(API 16, 17, 18) with a 64.40% of contributions. Second
one is Gingerbread (API 10) with 17.80%, and third is
Ice Cream Sandwich (API 15) with 15.00%. On fourth
place is the latest version of Android 4.4. (API 19), also
known as KitKat, with a 5.30% share, having its
percentage doubled if compared to the second month of
the year. Demand for KitKat is steadily growing as it
brings
new
solutions,
capabilities,
enhanced
performance, minimized fragmentation, reduced OS; but
does not dramatically change graphical design in
comparison with predecessor Android Jelly Bean. There
are a few new features and improvements but not all of
them are perfect yet.
72
CASEmobile
CASEmobile
73
74
CASEmobile
With document URI, document can be open; here is an
example of how to open a Bitmap:
private Bitmap getBitmapFromUri(Uri uri)
throws
IOException
{
ParcelFileDescriptor
par = gettContentResolver().
openFileDescriptor(uri,
"r");
FileDescriptor file =
par.getFileDescriptor();
Bitmap image = BitmapFactory.
decodeFileDescriptor(file);
par.close();
return
image;
}
Code 3 Method for opening the selected bitmap file
CASEmobile
75
WebPrint
method
retrieves
references
to
PrintManager service, gives WebView instance and
creates a print adapter. Metod print() inside the print
76
CASEmobile
CASEmobile
77
78
CASEmobile
5. CONCLUSION
Android 4.4. KitKat API is 19th API release for Android
platform that offers new features for users and app
developers. Google doesn't deliver a huge list of
transformative design and feature changes, but provides
support that allows developers to develop applications
easier. The main feature of the new mobile OS is
adaptation to lower hardware capabilities with less
working memory and lower screen resolution. Within
this article, the attention is placed on possibilities for app
References:
1
Allumalla, A.R., 2013. Difference between Android Jellybean 4.3 and Kitkat 4.4 / [WWW Document]. Techzost. URL
http://blog.techzost.com/4185/difference-android-jellybean-43-kitkat-44/2013/10 (accessed 5.1.14).
Android Developers, 2013. Android 4.4 APIs [WWW Document]. Android Developers. URL
https://developer.android.com/about/versions/android-4.4.html#SMS (accessed 5.5.14).
Android Developers, 2014a. Dashboards | Android Developers [WWW Document]. Android Developers. URL
http://developer.android.com/about/dashboards/index.html (accessed 4.29.14).
Android Developers, 2014b. Running Android with low RAM [WWW Document]. Android Developers. URL
https://source.android.com/devices/low-ram.html (accessed 4.30.14).
Android Developers, 2014c. Storage Access Framework [WWW Document]. Android Developers. URL
https://developer.android.com/guide/topics/providers/document-provider.html (accessed 5.5.14).
Chowdhry, A., 2013. 10 Of The Best Android KitKat Features [WWW Document]. Forbes. URL
http://www.forbes.com/sites/amitchowdhry/2013/11/04/10-of-the-best-android-kitkat-features/2/ (accessed 5.12.14).
MobiThinking, 2014. Global mobile statistics 2014 Part A: handset market share [WWW Document]. URL
http://mobithinking.com/mobile-marketing-tools/latest-mobile-stats/a#smartphone-shipments (accessed 5.8.14).
Rowinski, D., 2013. 10 Things Developers And Users Need To Know About Android KitKat 4.4 [WWW Document].
ReadWrite. URL http://readwrite.com/2013/11/07/android-kitkat-developers-users (accessed 5.1.14).
Smith, C., 2013. Android KitKat Development Tools - Procstats [WWW Document]. Double Encore. URL
http://www.doubleencore.com/2013/11/android-kitkat-development-tools/ (accessed 5.12.14).
10
Wallat, J., 2013. Android 4.4 KitKat: here are the hidden functions - AndroidPIT [WWW Document]. AndroidPIT.
URL http://www.androidpit.com/android-4-4-hidden-functions (accessed 5.1.14).
Information on authors:
Zoran Kos B.Sc
e-mail: zoran.kos@foi.hr
Zoran Kos is 2nd year student of Information and Programming engineering of Faculty of Organization and Informatics in
Varadin. Main interests are programming web, desktop and mobile application, new IT trends like cloud computing and
mobility, making and presenting business models for startup projects. While developing new apps he focused on frontend development. He already has few smaller but successful projects behind him.
Zoran is the main contributor to this paper. He wrote the first version of the text and did coding of the presented
examples.
Zlatko Stapi, PhD.
e-mail: zlatko.stapic@foi.hr
Faculty of Organization and Informatics
Pavlinska 2, 42000 Varadin, Tel: +385 42 390 820, Fax: +385 42 213 413
Zlatko Stapi, PhD., works at the Information Systems Development Department at Faculty of Organization and
Informatics in Varadin. He obtained his PhD in computer sciences from University of Alcal (Spain) and in information
sciences from University of Zagreb (Croatia) in cotutelled doctorate program. His scientific and research interests include
software- and mobile applications development methodologies. He participated in more than 15 scientific and professional
projects and published more than 30 scientific and professional papers. Currently he leads the Laboratory for
Development and Transfer of Mobile Technologies (FOI MT-Lab). Zlatko is putting a special focus in inclusion of students
in his scientific and professional activities. The published papers, projects, awards and other relevant information can be
found on his personal website: http://www.foi.unizg.hr/djelatnici/zlatko.stapic.
Zlatkos contributions to this paper are only of corrective nature. He mentored student Zoran Kos in defining the body, the
structure and the style of the paper. After the first version of the paper is written, he proof-read the text and made
necessary changes to make the text more focused and readable.
CASEmobile
79
Miljenko Cvjetko
SAETAK:
U okviru predavanja sluatelji ce biti upoznati sa osnovnim konceptima Xamarin tehnologija i alatima koji omoguuju rad
na vie platformi. Cilj predavanja je razbiti neke predrasude i zablude oko Xamarin tehnologija, te dati uvod u kojem se
smjeru kree krosplatformski razvoj aplikacija.
SUMMARY
Xamarin 2.0 tools brought breaking news for cross platform development of enterprise (line-of-business) applications and
have democratized .net and C# programming language with a giant leap accross platform differences based on mono
framework. One of the greatest breakthroughs is expected with Xamarin Test Cloud in the field of application testing
which is (at this point in time) very cumbersome and not widespread.
1. UVOD
2. RAZVOJNI ALATI
Jedan od najbitnijih proizvoda Xamarina su IDE alati
Xamarin Studio i proirenja (addinovi) za Visual Studio
koji omoguuju razvojnim programerima ciljanje vie
platformi i integraciju razvojnog procesa.
80
CASEmobile
CASEmobile
81
82
CASEmobile
Xamarin open source proizvoda i na svim ostalim
platformama, naroito Windows operativnim sustavima.
4.4 ASP.net
4. PLATFORME
4.1 Mono runtime
Nakon produbljene suradnje sa Microsoftom ovoga
proljea veliki pomaci napravljeni su na integraciji mono
runtimea sa Microsoftovim novim compilerom Roslyn
projektom. Zajedniki rad i postignua prikazana su
takoer na //BUILD/ konferenciji.
5. ZAKLJUAK
Ovo je bio samo jedan povrinski pregled s visokog o
trenutanom stanju tehnologija koje razvija Xamarin na
mobilnom, ali i na serverskom dijelu u suradnji sa svojim
partnerima / prvenstveno Microsoftom.
Podaci o autoru:
Miljenko Cvjetko
e-mail: mcvjetko@holisticware.net
e-mail: miljenko.cvjetko@xamarin.com
http://holisticware.net
http://xamarin.com
HolisticWare is startup company whcih develops mobile apps with .net technology. In 2011 teams top prioities were
developing with Mono technology (open sourced .net port) to non-indows platforms, especially iOS and Android.
CASEmobile
83
SAETAK:
Android je danas najpopularniji operacijski sustav za mobilne platforme. No, unato svojoj popularnosti, nativan razvoj
aplikacija za Android zna biti poprilino dugotrajan muktorpan posao, te je ponekad ak i za jako male i jednostavne
aplikacije potrebno ubaciti puno koda. Upravo iz tog razloga, danas se javlja sve vie i vie novih i inovativnih opensource rjeenja koja smanjuju taj problem iz pojedinih aspekata. Android Annotations i Active Android upravo su takva
rjeenja koja se danas koriste sve vie u sve ozbiljnijim projektima. Active Android ORM je alat koji uvelike olakava
manipulaciju bazom podataka, dok je Android Annotations razvojni okvir koji nam prua skraeno pisanje mnogih
popularnih dijelova koda koji se s vremenom i veliinom aplikacije sve vie gomilaju. Oba ova razvojna okvira koriste
anotacije u programskom jeziku Java, te uvelike skrauju pisanje koda, to omoguuje developerima da se vie
fokusiraju na inenjering i dizajn aplikacije, nego na samo pisanje koda.
ABSTRACT:
Nowadays, Android is the most popular mobile operating system. But, although its popularity, native Android application
development can be quite time and energy consuming work. Sometimes, it is necessary to write a lot of code even for
small and simple applications. That is exactly why there are more and more various new open-source solutions that take
care of those problems from different aspects. Android Annotations and Active Android are such solutions that are being
more and more used in lot of serious projects. Active Android is an ORM tool that eases database manipulation a lot. On
the other hand, Android Annotations is an framework that offers us shortened writing of the popular parts of code, and
increases the complete code readability. Both of these frameworks use annotations in Java programing language and
reduce the code writing a lot, which enables the developers to be more focused on engineering and design of the
application, instead on focusing on code writing.
1. INTRODUCTION
The successful development of mobile applications is
largely dependent on the quality of written code.
Unfortunately, today the code is increasing rapidly and it
should be reduced. Specifically, regarding the
development for Android, very often for some general
things there must be code written that is already mostly
predefined and in the high ratio it does not change from
application to application. By writing such code,
developers spend precious time reading it and it
becomes cumbersome and unreadable.
From the above mentioned reasons, some developers
are trying to make their own development frameworks
that will replace the entire predefined code with only a
few lines of their own, and with that save a lot of time.
The aim of this paper is to introduce developers who
develop applications for Android that there are
developmental frameworks that can help them with the
speed and quality of development of mobile
applications.
This paper is divided into three chapters; in the first one,
Active Android development framework will be
explained, which is ORM for Android. The next chapter
is intended for Android Annotations development
framework, which with the help of Java Annotations
helps in reducing a lot of code. The final chapter is
intended for the comparison of native approach with the
usage of a development frameworks where the
2. ACTIVE ANDROID
2.1 Introduction to Active Android
As an Android operating system framework, Active
Android is an ORM (object relational mapper) library.
Active Android allows you to manipulate data in
database over SQLite database management system. It
provides quick and easy usage without using any of the
SQL queries directly. Developers don't even need to
know SQL to use this framework[1]. Active Android
provides usage with the records in the database via
objects, so that the developers don't have problems with
conversion of tabular entries into objects and vice versa.
Model class represents a table and class instance
represents a record in table. Database management
with Active Android is much simpler and faster because
developers can create a class and with annotation tell
the system that that class represents table in the
database. Active Android does all the work around the
database setup so that the developers don't have to
write CRUD methods themselves.
Nowadays the Active Android is one of the most useful
frameworks for programming applications on Android
operating system as shown by the increasing number of
users. The source code of the framework can be found
at Github where everyone can take it and use it [2].
84
CASEmobile
android:value="CaseApp.db" />
<meta-data
android:name="AA_DB_VERSION"
android:value="1" />
...
Now we are ready to start coding our database. Instead
of creating DatabaseHelper and DatabaseAdapter
classes, we just need to add few modifications to the
existing model classes:
Receipt.java
@Table(name = "receipts")
public class Receipt extends Model {
@Column(name = "chocolatte")
private Chocolatte chocolatte;
@Column(name = "salesman")
private Salesman salesman;
@Column(name = "time")
private String time;
public Receipt() {
}
...
As shown above, using Javas annotation processing
tool, Active Android allows us to define our table inside
its appropriate model class. Notice also that this time
we didnt add the id attribute in our class. That is
because Active Android itself handles it and Model class
allows our classes to inherit that attribute. As for the
foreign keys, Active Android improves that part as well.
If we put into a column an attribute that is a child of
Model class, Active Android automatically creates
foreign key for that column. Another noteworthy fact is
that Active Android provides us a way to just query the
database and it handles the whole linking and
communication process with the database, which
allows the developer to focus more on designing and
developing, instead of mindless coding.
Receipt.java
...
//Some query methods
public static Receipt readReceiptById(long id) {
return new Select().from(Receipt.class).where("Id =? ",
id).executeSingle();
}
public static List<Receipt> readAllReceipts() {
return new Select().from(Receipt.class).execute();
}
public static Receipt
readReceiptForSalesmanAndChocolatte(Salesman salesman,
Chocolatte chocolatte) {
return new Select().from(Receipt.class).where("salesman
=? AND chocolatte =? ",
salesman.getId(),
chocolatte.getId()).orderBy("Id").executeSingle();
}
...
CASEmobile
85
4. DISCUSSION
4.1 Comparing Active Android and Android
Anotations with native approach
As stated before, both Android Annotations and Active
Android frameworks are used for reducing the amount
of code needed for implementing some functionalities in
our Android applications.
Android Annotations framework makes our code more
readable and easier to use and understand by replacing
(not removing) a lot of code that is either generated or
86
CASEmobile
5. CONCLUSSION
This paper briefly summarizes the advantages and
disadvantages of using frameworks such as Android
Annotations and Active Android for native android
development. Android is a tremenduous platform, and
it's development is great. But, as allways, there is room
for improvement. While developing applications in a
standard way, developers often have to add or generate
relatively large ammounts of code to acomplish some
really trivial functionalities. But with usage of additional
frameworks, as shown in this paper, that code could be
easilly reduced and it's readibility improved, which is
often a very important factor.
To conclude this paper, we will add a quote from Robert
C. Martin to show how important clean and readible
code is:
The ratio of time spent reading [code] versus writing is
well over 10 to 1 [therefore] making it easy to read
makes it easier to write. [7]
References:
1
. Plesac, Infinum Talks - Active Android. [Online]. Available: http://www.slideshare.net/Infinum/infinum-androidtalks-02-activeandroid. [Accessed: 21-May-2014].
R. C. Martin, Ed., Clean code: a handbook of agile software craftsmanship. Upper Saddle River, NJ: Prentice Hall,
2009.
Information on authors:
Alen Huskanovi
e-mail: ahuskano@foi.hr
Faculty of Organization and Informatics
Alen Huskanovi is a regular student of the third year of undergraduate study Information Systems at the Faculty of
Organization and Informatics in Varazdin. He has participated in various national and international competitions, among
which stands out IEEEmadC international competition for the design of mobile applications where he won first prize.
CASEmobile
87
Actively working on the system PEAS with whom he came to Croatian finals of Microsoft Imagine Cup. He is primarily
engaged in the development of applications for the Android operating system.
David Ante Macan
e-mail: amacan@foi.hr
Faculty of Organization and Informatics
David Ante Macan is a third year undergraduate student of Information Systems at Faculty of Organization and
Informatics. He has participated in various competitions, including the Croatian Microsoft Imagine Cup finals, won the best
design award at IEEEmadC contest, won the third place at Infinum student Hackathon 2014, etc. His main area of interest
is mobile development, especially Android. He is actively working on several projects, including the Personal Exam
Assistant (PEAS) project at Faculty of Organization and Informatics. He is also a member of IEEE Institute and is one of
the student coordinators and founders of the Laboratory for mobile technologies (MT Lab) at Faculty of Organization and
Informatics.
88
CASEmobile
CASEmobile
89
SAETAK:
Relacijske su baze danas temelj poslovanja velikog broja modernih organizacija. Tenja organizacija za skalabilnou
sustava i trend razvoja Web 2.0. aplikacija uvjetovali su razvoj NoSQL (Not only SQL) baza podataka. Drugi tip
motivacije ogleda se u agilnom pristupu razvoju s naglaskom na smanjenje kompleksnosti i poveanje brzine razvoja. S
obzirom na velike trokove u odreenim domenama implementacije relacijskih baza podataka, NoSQL baze podataka
nastoje smanjiti trokove odravanja skalabilnosti i pruiti jednostavna rjeenja za distribuciju i particioniranje modela
podataka. Ovaj e rad predstaviti danas najkoritenije tipove NoSQL baza podataka pozicionirajui ih direktno u okvire
primjene s naglaskom na direktnu usporedbu u konkretnoj domeni s relacijskim bazama podataka.
ABSTRACT:
Relational databases are one of the underlying parts of modern organizations. Need for system scalability and
development of Web 2.0. applications are one of the main drivers for NoSQL (Not only SQL) database rise. Another type
of motivation is represented by trend of agile development with emphasis on reducing complexity requirements and
increasing speed of application development. Considering higher costs in some areas of relational database system
implementation, NoSQL databases are trying to directly reduce costs of maintaining scalability and offer solutions for
effortless distribution and partitioning of data models. This paper will introduce the most used NoSQL database systems
by positioning them directly into the scope of usage with emphasis on direct comparison with relational databases.
1. INTRODUCTION
The NoSQL trend has appeared as a response to
massive cost of storing and manipulating data in
classical relational database systems. Another benefit of
NoSQL movement was flexibility of data modeling and
distribution. ''Relational databases provide a variety of
features and strict data consistency. But this rich feature
set and the ACID properties implemented by RDBMSs
might be more than necessary for particular applications
and use cases. As an example, Adobes ConnectNow
holds three copies of user session data; these replicas
do not neither have to undergo all consistency checks of
a relational database management systems nor do they
have to be persisted. Hence, it is fully sufficient to hold
them in memory.''[2] NoSQL systems share several key
characteristics. ''When compared to relational
databases, NoSQL systems are more scalable and
provide superior performance.[1]
With this approach, NoSQL databases are trying to
resolve some of the most common relational database
problems.
Since most of Web 2.0. applications are agile, NoSQL
databases tend to be very flexible as opposite to
relational databases. For instance, in most NoSQL
systems you do not have fixed database schema
structure and there is no need for forcing unique data
model. These types of data modeling are applicable to
applications that generate high amount of inconsistently
structured data (e.g. Web blogs, etc).
Jonathan Ellis from Rackspace defines three problems
of relational databases: [3]
1. Data scalability
2. Single server performance
3.
2. DATA MODELS
One of the main differentiation between relational and
NoSQL databases is the data model. Modern NoSQL
databases can be divided into three main categories.
90
CASEmobile
CASEmobile
data structure can be easily represented by group of
columns called column family:
CF= user_role
rowKey1 role
admin
rowKey2 role
user
permission
dateCreated
All
2012-1-11
permission
dateCreated
Basic
2013-11-13
91
92
CASEmobile
5. CONCLUSION
NoSQL trend is emerging as a valid relational database
alternative for specific use. It is very important to
analyse important aspects of different NoSQL data
models and include them in system requirements. As
mentioned, NoSQL databases behave different
according to size of data set and amount of operations
to execute. Flexible schema approach and functional
query structure manage to increase performance and
give effortless ways for data partitioning.
Relational SQL databases are focusing on rigid
structure with defined data types for storing data. In that
way, they are not suitable for use in environments that
are generating massive amounts of differently structured
data. With growth of Web 2.0. application usage there
are a lot of requirements for NoSQL databases.
CASEmobile
93
References:
1
MongoDB Inc., Top 5 Considerations When Evaluating NoSQL Databases, June 2013.
Planet Casandra Inc., Bazaarvoice Chooses Casandra over MySQL, HBasa and MongoDB to Power Content
Analytics Platform [Online]. Available: http://planetcassandra.org/blog/post/bazzarvoice-chooses-cassandra-overmysql-hbase-and-mongodb-to-power-content-analytics-platform/ [Accessed: 16-May-2014].
10
11
J. Pokorny, NoSQL databases: a step to database scalability in web environment, Charles University, Praha, 2013.
12
C. Hadjigeorgiou, RDBMS vs NoSQL: Performance and Scaling Comparison, The University of Edinburgh, August
2013.
13
M. Fotache, D. Cogean, NoSQL and SQL Databases for Mobile Applications. Case Study: MongoDB versus
PostgreSQL, University of Iasi, Romania, February 2013.
Information on authors:
Mario Novoselec
e-mail: mnovosel2@foi.hr
Faculty of Organization and Informatics
Mario Novoselec is a third year full time undergraduate student at Faculty of Organization and Informatics, University of
Zagreb. He is one of the initial members of FOI MT Lab. His main interests are focused towards developing Web
applications with emphasis on user experience and modern design. He has also been involved in various non-commercial
projects.
Denis Pavlovi
e-mail: dpavlovi@foi.hr
Faculty of Organization and Informatics
Denis Pavlovi is a third year full time undergraduate student at Faculty of Organization and Informatics, University of
Zagreb. He is also one of the initial members of FOI MT Lab. He is interested in modern web application design and
development. He is involved in various non-commecial projects.
Milan Pavlovi
e-mail: mpavlovi2@foi.hr
Faculty of Organization and Informatics
Milan Pavlovi is a third year full time undergraduate student at Faculty of Organization and Informatics, University of
Zagreb. He is also one of initial member of FOI MT Lab. His main interests are Information Systems engineering and
development. He is also interested in Java desktop, mobile and web application development and technology.
94
CASEmobile
CASEmobile
95
SAETAK:
U ovom radu definirana su glavna podruja kljuna za funkcioniranje softvera za mobilne ureaje u javnom
prijevozu i analizirana je mogunost porasta uslune kvalitete u putnikom prijevozu sa stajalita elemenata
koji ine inteligentne transportne sustave implementirane u vozila javnog prijevoza. Poseban naglasak
stavljen je na odreena podruja, bitna za realizaciju takvih tehnologija, odnosno usluga. Kao polazna
toka istraivanja, uz internet koji slui kao osnova za funkcioniranje i spajanje softvera, koriteni su ureaji
koji su potrebni za realizaciju praeni detaljnim opisom aplikacije koja moe sluiti u tu svrhu. Upravo ta
aplikacija predloena je kao bitan imbenik, te je prezentiran nain na koji svi ti gore navedeni elementi
mogu funkcionirati zajedno. Ostala podruja koja su takoer obraena su: zadovoljstvo putnika, vea
kvaliteta usluge, implementiranje inteligentnih sustava u javni prijevoz i prezentiranje istih korisnicima
javnog prijevoza, usklaivanje funkcija softvera, internet i vozila u javnom prijevozu putnika na nain na koji
e se zadovoljiti potrebe putnika, prijevoznika i okolia.
SUMMARY:
This paper tries to define main areas, crucial for functioning of mobile phones software in the public
transport and analyses the possible increase of service quality in the public travelers transport from the
standpoint of elements comprising the intelligent transportation systems implemented in the public transport
vehicles. Special emphasis was given to the specific areas, relevant for the realization of such technologies
that is services. Appliances required for realization of such services were used as the starting point of
research alongside the Internet that serves as basis for functioning and connecting software, followed by
detailed overview of applications which can be used for the same purpose. As an important element a
proposition for designing applicative software uniting all the above described areas was proposed, thus
presenting the way all these elements can function together. Other areas of interest that were discussed
are: travelers satisfaction, higher quality of service, implementing the intelligent systems in the public
transport and presenting them to the public transport users, harmonizing the operations of software,
Internet and vehicles in the public travelers transport in ways that will concurrently fulfill needs of travelers,
carriers and the environment.
1. UVOD
Javni prijevoz je jedna od primarnih zadaa kod
rastereenja gradskih prometnica. Jednako tako, ako je
dobro organiziran, moe pridonijeti znaajnom
smanjenju emisije CO2 plinova u atmosferu. Osim toga,
jedan od glavnih ciljeva Europske unije jest odrivi
promet i sniavanje emisije CO2 i ouvanje okolia na
nain da se rasterete gradske prometnice a teite sa
cestovnog prometa se prebaci na ostale grane prometa
kao to je npr. eljezniki promet. Poveanje prometa
kroz poveani rast broja vozila na prometnicama
rezultira zagaenjem okolia, atmosfere, postepenim
nestankom neobnovljivih izvora energije, zagaenjem
pitkih voda, globalnim zatopljenjem. Vaniji efekti su
tetni uinci na ljude, biljne i ivotinjske vrste to
rezultira istrebljenjem pojedinih vrsta. Meutim, zbog
neznanja, neupuenosti ili manjka dobre volje, ljudi i
dalje koriste osobna vozila kao svakodnevni nain
prijevoza. Na taj nain u velikoj mjeri tete prirodi ali i
samima sebi. Stoga se namee glavno pitanje: kako
ljude navesti da ponu vie koristiti neki oblik javnog
prijevoza?
96
CASEmobile
CASEmobile
oekivani rezultat za korisnika usluge. To je obeanje
dano sa strane prijevoznika sa namjerom da se usluga
osigura. Postignuta kvaliteta je rezultat poteza koje su
poduzeli sudjelujui partneri (prijevoznici, gradska
uprava i dr..). Razlika izmeu opaene i postignute
kvalitete omoguava da se ocijeni zadovoljstvo
korisnika, to je najvaniji pokazatelj uspjenosti
aktivnosti na podruju poboljanja usluge.
Osnovna komponenta djelovanja je, dakle, detaljna
definicija kvalitete koju oekuje putnik i izraenost iste u
obliku rezultata za klijente. Oekivana kvaliteta
omoguava razvoj metoda i partnerstva za poboljanje
kvalitete kao i ocjenu uspjenosti sustava.
Korist ovakvog pristupa je ta da obuhvaa sve razine
odgovornosti i izvedbe usluge. Na primjer, osoblje na
odreenoj liniji, na nekoj stanici ili smjeni, ili u
inspekcijskom timu, formirati e i koristiti istu metodu na
toj razini prijevoza, osiguravajui tako potpunu
dosljednost.
Prihvaeni pokazatelj kvalitete i uspjenosti poduzea je
zadovoljstvo korisnika/putnika. Zadovoljan putnik je
lojalan putnik i prijevoznik mora uiniti sve da svoje
potencijalne korisnike usluge uini stvarnim korisnicima,
a svoje trenutne korisnike stalnim korisnicima.
Zadovoljan putnik je besplatna reklama prijevoznika i
manje je osjetljiv na pojavu poremeaja u prijevozu.
Zadovoljan korisnik govori o svome zadovoljstvu
nekolicini, dok e nezadovoljan korisnik o svome
nezadovoljstvu govoriti puno veem broju ljudi.
Pri ocjenjivanju zadovoljstva putnika treba stalno voditi
rauna o nekoliko parametara:
zadovoljstvo je dinamian proces, koji se stalno
mijenja, s obzirom na stupanj zadovoljenja
zahtijeva, na promjene u oekivanjima, na
promjene u subjektivnom i objektivnom okruenju
putnika
ne postoji univerzalno, ope zadovoljstvo putnika,
nego je to mnoina pojedinanih zadovoljstava koje
tek svojim ukupnim djelovanjem daju zadovoljstvo
putnika kao pojedinca. Zadovoljstvo putnika (kao
grupe) je prosjek pojedinanih oekivanja i emocija
zadovoljstvo je relativan pojam. Lojalnost korisnika
ne moe se zadrati ak ni zadovoljstvom koje
osjea. Naputati znaju i zadovoljni korisnici.
3. KRATKI OSVRT
Inteligentni transportni sustav (ITS) je upravljaka i
informatiko-komunikacijska
nadogradnja
(ili
nadgradnja) klasinog prometnog i transportnog
sustava, tako to se postie bitno vea propusnost,
sigurnost, zatienost i ekoloka prihvatljivost u odnosu
na rjeenja bez ITS aplikacija. (Bonjak, 2008., 161.) To
znai da se kroz stvarno vremensko prikupljanje i
obradu podataka te umreenu distribuciju informacija
postie znatno smanjenje zaguenja, ekanja,
prometnih nesrea, neuinkovitosti prijevoza, ekolokih
oneienja itd.
Atribut inteligentni openito oznaava sposobnost
adaptivnog djelovanja u promjenjivim uvjetima i
situacijama, pri emu je potrebno prikupiti dovoljno
podataka i obraditi ih u stvarnom vremenu. Koncept
inteligentnih informacijskih sustava (IIS) blizak je
informatiarima kao i razliite napredne tehnike koje su
zajednike IIS-u i ITS-u. Koncepti i tehnike umjetne
inteligencije (AI tj. Artificial Intelligence) - prepoznavanje
oblika, strojno uenje, inteligentno izraunavanje itd.,
97
4. PODRUJA ISKORISTIVOSTI
INTELIGENTNIH TRANSPORTNIH
SUSTAVA
Meunarodna organizacija za normizaciju ISO
definirala je 11 domena ITS-a:
1. informiranje putnika (Traveler Information)
2. upravljanje prometom i operacijama
(Traffic Management and Operations)
3. vozila (Vehicles)
4. prijevoz tereta (Freight Transport)
5. javni prijevoz (Public Transport)
6. urne slune (Emergency)
7. elektronika plaanja vezana uz transport
(Transport Related Electronic Payment)
8. sigurnost osoba u cestovnom prijevozu
(Road Transport Related Personal Safety)
9. nadzor vremenskih uvjeta i okolia
(Weather and Environmental Monitoring)
10. upravljanje odzivom na velike nesree
(Disaster Response Management and Coordination)
11. nacionalna sigurnost (National Security)
U skladu s temom rada bitno je usredotoiti se na
odreena podruja usluga. U podruju usluga
informiranja putnika (traveller information) obuhvaene
su statike i dinamike informacije o prometnoj mrei,
usluge predputnog i putnog informiranja, te podrka
slubama koje obavljaju prikupljanje, pohranjivanje i
98
CASEmobile
CASEmobile
99
6. SPECIJALIZIRANOST APLIKATIVNOG
SOFTVERA
Neka je za potrebe ovog rada aplikativni softver
definiran kao skup programa koji imaju specijaliziranu
namjenu, kao to je obrada teksta, slike, zvuka, dizajn i
upravljanje bazama podataka, izrada web stranica itd.
(Leme, 2006., 1)
Specijaliziranost aplikativnog softvera se ogleda u
njegovoj namjeni odreenoj prema vrsti korisnika.
Jednako tako svaki specijalizirani softver treba biti
prilagoen irem spektru korisnika. Zbog toga se
inzistira na njegovoj jednostavnosti pri uporabi. Obino
se aplikativni softver moe kupiti na tritu kao gotov
proizvod ili se moe naruiti njegova izrada ili ga u
krajnjem sluaju korisnik moe izraditi sam. Trite
mobilnih aplikacija je brzo rastue te je izrada aplikacija
za mobilne platforme logian izbor tvrtkama koje ele
ponuditi i prilagoditi svoje servise za mobilne platforme.
Prije svega, ovo proizlazi iz toga to dananje mobilne
platforme nude vrhunski user-experience i lokacijski
neovisan pristup do informacija putem brzih 3G/4G
mrea. Nije zanemariva niti marketinka vrijednost koju
donose mobilne aplikacije za tvrtke koje odlue nuditi
svoje servise putem mobilnih platformi. Distribucija
mobilnih aplikacija obino je centralizirana te ih korisnici
preuzimaju ili kupuju putem internetskih trgovina.(slika
2)
100
CASEmobile
CASEmobile
pametnih telefona koji koriste razliite operativne
sustave i preglednike za surfanje internetom, pa sadraj
treba prilagoditi posebno za svaki od njih. Sljedea
vana karakteristika je to su mobilni ureaji daleko
manji od monitora raunala, pa sadraj treba optimalno
smjestiti na manje ekrane, a osim toga i same veliine
ekrana variraju od ureaja do ureaja.
101
102
CASEmobile
CASEmobile
103
104
CASEmobile
9. ZAKLJUAK
Javni gradski prijevoz osmiljen je kao nain prijevoza
koji e rasteretiti gradska sredita, povezati razliite
dijelove grada i pridonijeti sigurnosti u prometu. Na
mnogo naina se nastoji poboljati javni prijevoz, bilo
novim prijevoznim sredstvima ili poboljanjem kvalitete
usluge ime se nastoji privui to vei broj ljudi. Isto
tako korisnici usluga takoer trae to pristupaniju
uslugu uz visok stupanj informatizacije sustava.
Slika 9. Izgled suelja postavki u aplikativnom softveru
(Izvor: Izradio autor)
Opcija postavke sluila bi za promjenu svih korisnikih
podataka, kao i za promjenu postavki suelja i
komunikaciju s autoprijevoznikom ali i drugim
korisnicima putem drutvenih mrea. Kategorije unutar
postavki su sljedee:
Postavke korisnikog profila
Postavke aplikativnog suelja
Povezivanje rauna
Bodovi
Obavijesti
Kontakti
Postavke korisnikog profila gdje bi bilo omogueno
mijenjati osobne podatke, naine plaanja i izmjenu
fotografija. Svaki korisnik bi imao personalizirano
suelje prijavom na bilo kojem ureaju i u svakom
CASEmobile
pojednostavljena primjena naplate voznih karata, kako
za korisnika tako i za prijevoznika.
Primjena takve tehnologije omoguuje da prijevoz
putnika funkcionira bolje, efikasnije i omoguuje
poveanje alternativnih tipova usluge. Konano,
organizacija omoguuje ekonomski efikasniji sustav.
to se tie putnika, takav sustav omoguuje veu
atraktivnost sustava prijevoza putnika koja pomae da
se putnici lake odlue na putovanje javnim gradskim
prijevozom.
105
Literatura:
1
Downey, D. F. et al, Ion Implantation Technology, Prentice-Hall (New York, 1993), pp. 65-67. [A book reference]
Wasserman, Y, Integrated Single-Wafer RP Solutions for 0.25-micron Technologies, IEEE Trans-CPMT-A, Vol.17,
No. 3 (1995), pp. 346-351. [A reference to a journal article ]
Shu, William K., PBGA Wire Bonding Development, Proc 46th Electronic Components and Technology Conf,
Orlando, FL, May. 1996, pp. 219-225. [A reference to a presentation at a Conference]
Institut graevinarstva Hrvatske d.d., Poslovni centar Rijeka: Generalni urbanistiki plan Grada Rijeke, prometni dio,
knjiga 1, Rijeka, 2001.
thexrt.blogspot.com, 24.4.2014
www.apple.com
www.bluefountainmedia.com
Podaci o autorima:
Samir Rizvi, bacc.ing.traff
e-mail: srizvic@veleri.hr,
Barbara Rudi, vii predava
e-mail: barbara.rudic@veleri.hr
Doc. dr.sc. Pogari Ivan
e-mail: pogarcic@veleri.hr
Profesor visoke kole na Veleuilitu u Rijeci
Voditelj studija informatike pri Veleuilitu u Rijeci
Veleuilite u Rijeci, Trpimirova 2,
+385 51 32 13 00
e-mail: ured@veleri.hr
http:/www.veleri.hr
106
CASEmobile
CASEmobile
107
SAETAK:
Prepoznavanje slikovnih uzoraka se do sada obavljalo iskljuivo koristei ili sloena i skupa programska rjeenja i
ureaje (optike itae). Mobilni ureaji razvili su se do mjere u kojoj ih je mogue iskoristiti za takve obrade, ali algoritmi
i sustavi koji to rade u realnom vremenu su rijetki. Ovaj rad opisuje razvoj algoritma u sklopu PEAS sustava, kojim je
omogueno prepoznavanje uzoraka na listi za odgovore (eng. scorecard) koristei mobilne ureaje. Pri tome emo
prikazati teorijske osnove prepoznavanja slikovnih uzoraka, implementaciju algoritma pomou OpenCV i JavaCV
biblioteka te praktina iskustva u takvom pristupu.
ABSTRACT:
Image pattern recognition has been so far carried out almost exclusively using sophisticated and expensive software
solutions and devices. Mobile devices have evolved to the extent that they can be used for such purpose, but the
algorithms and systems that provide such functionalities in real time are rare. This paper describes the development of
an algorithm within PEAS system, which enables the identification of answers in scorecard paper sheet using mobile
devices. Thereby we will show the theoretical basis of the image pattern recognition, implementation of the algorithm
using the OpenCV library and JavaCV, and the practical experience in such an approach.
1. INTRODUCTION
Today, image processing has found use in many
aspects of ICT technologies. But, until recently, this task
was mainly reserved for desktop computers,
workstations, server computers, due to its high
hardware requirements. However hardware and
software capabilities of todays mobile device are
increasing rapidly, which among other things results in
image processing becoming more and more available
on those devices as well. Since the mobile devices are
compact and highly portable, new possibilities are
opening from many aspects, including the image
processing one. Such possibilities include computer
vision, virtual reality, augmented reality, pattern
recognition etc., finding its application in entertainment
industry, health, security, government, biometrics,
tourism, education...
One of the possibilities for utilizing image processing is
its application in overall educational process. This paper
shows the attempt to utilize mobile devices and image
processing capabilities to improve evaluation process in
education, as a part of PEAS (Personal Exam
Assistant) project. PEAS tries to automate and speed
up the process of exam evaluation in educational
institutions, thereby realizing benefits for both teacher
and students. A significant part of PEAS system is a
mobile application whose role is to take a picture of
scorecard sheet, identify the marked answers and send
them to server system for evaluation.
The central issue in this mobile part of PEAS system
was the identification of marked answers on scorecard
sheet in native mobile application. In order to achieve
this functionality, we aimed to develop algorithm for
distinctive marked rectangle detection from the mixed
grid of marked and unmarked rectangles.
108
CASEmobile
Written Language
in
support
OpenCV
[13]
C++
Java
(JavaCV),
.NET
(EmguCV),
Python,
MATLAB,
C++,
C
C++
C++
N/A
Flash
FastCV
[16]
N/A
C++
LTI-Lib
[17]
C++
C++
VXL
[18]
C++
C++
Aforge
[19]
C#
C#
CImg
[14]
Ccv
[15]
OS support
License
Windows,
Android,
Maemo,
FreeBSD,
OpenBSD, iOS,
BlackBerry 10,
Linux, OS X
BSD
Linux, Solaris,
CeCILL
OS X
license
Linux, OS X,
LGPL
Windows
Windows,
OS X, Linux,
FastCV
Android,
License
Windows Phone Agreement
8
GNU Lesser
Linux, Windows
General
Public
Windows, Linux,
VXL License
Solaris
Windows,
Windows Phone
LGPL v3
CASEmobile
of-the-art computer vision and machine learning
algorithms. These algorithms can be used to detect and
recognize faces, identify objects, classify human actions
in videos, track camera movements, track moving
objects, extract 3D models of objects, produce 3D point
clouds from stereo cameras, stitch images together to
produce a high resolution image of an entire scene, find
similar images from an image database, remove red
eyes from images taken using flash, follow eye
movements, recognize scenery and establish markers
to overlay it with augmented reality, etc.
OpenCV is written natively in C++, but it has several
wrappers which expose OpenCV functions in different
languages and different platforms. Some of them are
EmguCV for .NET C#, JavaCV for Java, OpenCV for
Android SDK etc. OpenCV is very large open source
project, with more than 13.000 commits on GitHub,
committed by more than 200 contributors. Except
individual contributors, Corporate contributors such as
Intel Inc. and Google Inc. are also involved in OpenCV
development [20].
There are several reasons why we decided to use
OpenCV:
Support for mobile platforms only OpenCV,
FastCV and Aforge explicitly state support for
mobile operating systems, while only OpenCV and
FastCV support Android.
Licensing OpenCV has more liberal licensing
policy (BSD) than FastCV (FastCV License
Agreement).
Community: OpenCV has significantly larger
communit with more than 47 000 community users
and over 7 000 000 downloads.
Contributors: OpenCV is actively maintained by
more than 200 contributors, both individuals and
companies.
After weve selected OpenCV, it was then a matter of
choice wether we will use OpenCV with C++ (Android
NDK) or with Java (JavaCV wrapper). We have chosen
JavaCV mainly because it was much easier to configure
the whole project to work with JavaCV, and the syntax
was more familiar to us, since Java is used for Android
development.
3. ALGORITHM
109
cvFindContours
Description
int cvFindContours(CvArr*
image, CvMemStorage*
storage, CvSeq**
first_contour, int
header_size, int mode, int
method, CvPoint offset)
Source
Open CV
getPerspectiveTrans
form
cvWarpPerspective
Mat
getPerspectiveTransform(In
putArray src, InputArray dst)
Open CV
Calculates a perspective
transform from four pairs of
the corresponding points
Void
cvWarpPerspective(const
CvArr* src, CvArr* dst, const
CvMat* map_matrix, int
flags, CvScalar fillval)
Open CV
Applies a perspective
transformation to an image
getLinesFromImage
List<Line>
getLinesFromImage(IplImag
e src, int cannyTreshold);
Our
getCornerPoints
List<Point>
getCornerPoints(IplImage
src,List<Line> lines, double
minTreshold)
Ours
getAverageColor
analyzeArea
int
getAverageColor(IplImage
img, int x, int y, int width, int
height, int padding)
Ours
Ours
110
CASEmobile
Figure 5
Two more values are required: the distance from the
upper-left corner of one square to upper-left corner of
the first square to the right c, and the distance from the
upper-corner of one square to upper-corner of the first
square below d. Using aforementioned values, the exact
positions and areas of all square fields are calculated.
Once all square fields are known we simply iterate
through questions and answers and check whether the
square representing an answer is marked or not. A
simple pseudo-code representation of the algorithm is
stated below:
FOR each question
averagecolor=getAverageColor
FOR each answer
isMarked=analyzeArea(area,averageColor)
if isMarked is true
answer is marked
else
answer is not marked
CASEmobile
be dark, and detection wont be so efficient). In second
step, average color is calculated, and compared with
each square in step three.
111
Function getAverageColor
Input: Area to analyze, padding
Include padding into area
avgValue = 0
FOR each pixel in area
curValue = RGB value of current pixel
avgValue = avgValue + curValue
counter = counter + 1
avgValue = avgValue / count
return avgValue
Function analyzeArea
Input:
Area to analyze, threshold
colorValue=calculate average color
if colorValue < threshold
return true
else
return false
Figure 9 Validation of
marked answers
Figure 10 Result
presentation
4. DISCUSION
The image processing and computer vision combined
with mobile devices is still a new field. That said, there
are certain technical and other issues that should be
taken into consideration. For example, we have
witnessed that only a part of image processing
frameworks are suitable to be used on mobile platforms.
While most of them are developed in C++ programming
language, few of them offer wrappers which ease the
use of frameworks in mobile applications developed in
other languages such as Java or C#.
The wars of incompatible mobile platforms are taking
their toll here as well. To our best knowledge, OpenCV
came the farthest to support multiple platforms. But it is
at least very questionable if the same image processing
framework could be used to develop native mobile
application for all major mobile platforms. Also, when
choosing appropriate framework for our initial algorithm
implementation on Android mobile platform, we
witnessed a lack of proper API documentation in some
frameworks, which really makes the use and
configuration of framework difficult.
Figure 8 Processing
captured image
https://bitbucket.org/dmacan23/aes_ieee
112
CASEmobile
5. CONCLUSION
This paper summarizes our efforts in developing
algorithm for detecting answered questions on
scorecard paper sheet, using image processing on
mobile devices. Image processing and computer vision
is an exciting field in computer industry, which becomes
even more exciting when combined with mobile devices.
As we already stated, applications of these two
technologies combined are numerous and possible in
different areas of industry, education, government
tourism etc. We believe this field is yet going to show its
full potential.
In algorithm implementation we used popular OpenCV
framework through its JavaCV wrapper, since we found
it to be fast, widespread, well documented and crossplatform framework. However, we also identified several
issues and challenges when developing image
processing in mobile applications. Also, we plan to
improve our algorithm in several aspects: neutralizing
shading, lighting, bad contrast, and reflection negative
impacts; optimizing performance; delivering more
responsive, real-time validation of marked answers.
The developed algorithm is implemented in fully
functional Android mobile application which we
demonstrated in Testing example section.
Also, we identified few interesting topics for future
research on image processing mobile applications:
feature and performance comparison of available
frameworks; difference in performance between
wrappers and C/C++ implementation; native mobile vs
web
applications;
cross-platform
development;
optimization of image processing algorithms.
References:
1
M. Petrou, Image processing: the fundamentals, 2nd ed. Chichester, U.K: Wiley, 2010.
Place IKEA furniture in your home with augmented reality - YouTube. [Online]. Available:
http://www.youtube.com/watch?v=vDNzTasuYEw. [Accessed: 17-May-2014].
Creative Cloud now includes Creative Suite Master Collection and Design Premium features. [Online]. Available:
http://www.adobe.com/products/cs6.html?promoid=JOLIS. [Accessed: 17-May-2014].
Eric Chu, Jim He, and Andrew Spencer, OpenCV and TYZX: Video Surveillance for Tracking. [Online]. Available:
http://prod.sandia.gov/techlib/access-control.cgi/2008/085776.pdf. [Accessed: 17-May-2014].
Kim-Sung Jie and Ming Liu, Computer Vision based Real-Time Traffic Monitoring System. [Online]. Available:
http://eng.monash.edu.au/civil/assets/document/research/centres/its/confs-workshops/archive/liu-tram.pdf.
[Accessed: 17-May-2014].
10
Drowning detection, pool surveillance with Poseidon. [Online]. Available: http://www.poseidontech.com/us/system.html. [Accessed: 17-May-2014].
11
12
OpenCV vs VXL vs LTI: Performance Test | AI Shack. [Online]. Available: http://www.aishack.in/2010/07/opencvvs-vxl-vs-lti-performance-test/. [Accessed: 15-May-2014].
13
14
The CImg Library - C++ Template Image Processing Toolkit. [Online]. Available:
http://cimg.sourceforge.net/reference/group__cimg__faq.html#ssf12. [Accessed: 16-May-2014].
15
16
Computer Vision (FastCV) - Mobile Technologies - Qualcomm Developer Network. [Online]. Available:
https://developer.qualcomm.com/mobile-development/add-advanced-features/computer-vision-fastcv. [Accessed:
16-May-2014].
CASEmobile
113
17
18
VXL - C++ Libraries for Computer Vision. [Online]. Available: http://vxl.sourceforge.net/. [Accessed: 16-May-2014].
19
20
21
Information on authors:
Alen Huskanovi
e-mail: ahuskano@foi.hr
Alen Huskanovi is a regular student of the third year of undergraduate study Information Systems at the Faculty of
Organization and Informatics in Varazdin. He has participated in various national and international competitions, among
which stands out IEEEmadC international competition for the design of mobile applications where he won first prize.
Actively working on the system PEAS with whom he came to Croatian finals of Microsoft Imagine Cup. He is primarily
engaged in the development of applications for the Android operating system.
David Ante Macan
e-mail: amacan@foi.hr
David Ante Macan is a third year undergraduate student of Information Systems at Faculty of Organization and
Informatics. He has participated in various competitions, including the Croatian Microsoft Imagine Cup finals, won the best
design award at IEEEmadC contest, won the third place at Infinum student Hackathon 2014, etc. His main area of interest
is mobile development, especially Android. He is actively working on several projects, including the Personal Exam
Assistant (PEAS) project at Faculty of Organization and Informatics. He is also a member of IEEE Institute and is one of
the student coordinators and founders of the Laboratory for mobile technologies (MT Lab) at Faculty of Organization and
Informatics.
Zoran Antolovi
e-mail: zantolov@foi.hr
Zoran Antolovi is a third year undergraduate student of Information Systems at Faculty of Organization and Informatics,
University of Zagreb. Primarily interested in web development and design, he participated in various projects, such as
Microsoft Imagine Cup (finals 2014), Best Code Challenge 04 (top 10 2014), first place at Infinum Student Hackathon
2014, first place in Best design category at IEEEmadC international competition with PEAS mobile application. With other
students, he has participated in Nestala djeca (missing childrens) project, developing entire web application and web
services for mobile application.
Boris Toma
e-mail: boris.tomas@foi.hr
Boris Toma, M.A. is a Junior researcher and Teaching Assistant at the Faculty of Organization and Informatics,
University of Zagreb where he works at the Department of Information System Development. Boris' assignments at the
Faculty are laboratory sessions delivered on the courses Geography Information Systems and Software Engineering.
Fields of interest are: software development, mobile technologies, geoinformatics, bioinformatics, artificial intelligence,
application marketing, Internet marketing. During his work career he worked on several projects in various positions. Boris
is currently a doctoral student at the Faculty of Organization and Informatics, University of Zagreb. For his academic
achievements he received Faculty Dean's award and University Rector's award.
Marko Mija
e-mail: mmijac@foi.hr
Marko Mija, as of July 2011 works at the Faculty of Organization and Informatics in Varadin as a project KI Expert
2012, project MEDINFO associate, and as a teaching assistant on courses related to software engineering and
information systems. Prior to his current employment he worked as a developer of intranet production planning system at
Boxmark Leather d.o.o. He is interested in web, desktop and mobile applications development in various platforms and
technologies.
Faculty of Organization and Informatics
Pavlinska 2
42000 Varadin
tel: +385 42 390 853
fax: +385 42 213 413
114
CASEmobile
CASEmobile
115
SAETAK:
to je zajedniko, a po emu se razlikuju novi alati za razvoj aplikacija: Windows App Studio, TouchDevelop, Project
Siena i CodeAnywhere?
Zajedniko je to to svi alati (osim zadnje spomenutog CodeAnywhere) omoguavaju razvoj Windows Phone ili Windows
8/8.1/RT aplikacija na tabletima, a mogu ih koristiti i ljudi koji nisu razvojni inenjeri. Svi alati koriste raunalni oblak kako
bi omoguili dvije stvari: dostupnost razvojne okoline s (gotovo) bilo kojeg ureaja, s bilo koje lokacije prvenstveno na
tabletima i velikim oslanjanjem na raunalni oblak to za pohranu programskog koda, to kao alat za izvravanje i
debugging. Veina njih odlino koristi novo suelje upravljano dodirom (touch) ili olovkom (stylus), dok samo
CodeAnywhere se koncentrira vie na tipkovnicu i pisanje pravog koda. App Studio omoguuje generiranje izvornog
programskog koda po programskom predloku MVVM, pa ga razvojni inenjeri mogu dalje koristiti u Visual Studio-u, dok
TouchDevelop generira skriptu koja se moe pokrenuti na webu. Rezultati ovakvog naina izrade aplikacija su efektne i
brzo napravljene aplikacije upravljane dodirom, koje moete publicirati u trgovine aplikacija.
Kljune rijei: Windows App Studio, TouchDevelop, Project Siena, CodeAnywhere
ABSTRACT:
What is common and what is different about new tools for application development: Microsoft App Studio,
TouchDevelop, Project Siena and CodeAnywhere?
The common factor is that all tools (except for the last mentioned CodeAnywhere) enable the development of Windows
Phone and Windows 8/8.1/RT applications on tablets, and can be used by people who are not developers. All tools use
cloud computing to enable two things: the availability of development environments on (almost) any device from any
location, primarily on tablets and heavy reliance on cloud computing - to store program code and as a tool for executing
and debugging. Most of them has used new touch-controlled interface (touch) or pen (stylus), while only CodeAnywhere
concentrate more on the keyboard and writing "real code". App Studio allows you to generate source code that follows
MVVM programming pattern, so it can be further developed using Visual Studio, while TouchDevelop generates a script
that can be run on the web. Results of this approach to application developing are effective and quickly made apps
controlled by touch, which can be published to app stores.
Keywords: Windows App Studio, TouchDevelop, Project Siena, CodeAnywhere
1. INTRODUCTION
In recent years we have witnessed the overwhelming
success of smartphones and tablet devices, as well as
the rapid development of mobile platforms. Today we
have some excellent mobile operating systems like iOS,
Android and Windows Phone, as well as a multitude of
excellent smartphone devices available in the market at
affordable prices. In addition to smartphones, we have
tablets, which are also very popular and use the same
platform as the smartphones. These platforms count
billions of users who own a smart device and use apps
daily and is increasingly replaced PC devices that falls
into the background. Mobile devices are first choice and,
in less developed countries, possibly the only computing
devices which virtually all people will own and carry with
them all the times. [2]
Most people wants to make their own apps, but does
not have proper skills and knowledge for that. They are
not prone to source code writing and making an app in
that way, instead of that they are used to nice, touch
friendly user interface and find it convenient to build an
app by dragging a building blocks just like playing a
video game.
116
CASEmobile
3. PROJECT SIENA
CASEmobile
Ever-easier app
generated rules
building
with
contextually
4. TOUCHDEVELOP
TouchDevelophttp://en.wikipedia.org/wiki/TouchDevelop
cite_note-1 is
an interactive
development
environment and a visual programming language being
developed at Microsoft Research. TouchDevelop is a
development environment for mobile and Web apps that
runs on phones, tablets, PCs, and even giant
touchscreens, and enables you to create fun games and
useful tools regardless of your working environment. It
lets you create apps on iPad, iPhone, Android, PC, Mac
and Windows Phone. [8]
In the TouchDevelop programming environment you
write scripts by tapping on the screen. You do not need
a separate PC or keyboard. Its programming language
and code editor have been built from scratch around the
idea that all code is entered via a touchscreen, without a
keyboard.
117
5. CODEANYWHERE
Codeanywhere is a multi-platform cloud based code
editor that enables you to write code and collaborate no
matter where you are or what device you have with you.
Codeanywhere, a self-proclaimed Google Docs for
coders, wants to become the defacto standard for code
development on the go and enables you to write code
and fix bugs in the cloud. It comes really handy in a
situations where you do not want to bring your
programming device with you, instead of that you can
access your projects and code on the go, and from
virtually anywhere using this cloud solution.
Codeanywhere is a text, code and markup editor that
has been redesigned and reengineered to be light, fast,
and mobile-friendly. It enables you to connect to your
FTP, SFTP Servers, Dropbox or Github account and
easily manipulate your resources, folders or files just
with the swipe of your finger. It also enables you to
share and collaborate on projects or just a single file,
from wherever you are, and to quickly edit code with
special keyboard that has been customized for
developers on the go. Codeanywhere makes
developers forget what device they are working on and
let them concentrate on getting work done on any
device like iPad, iPhone, Android or the desktop. [1]
Codeanywhere offers iOS, Android, Blackberry and
Windows Store apps in addition to a web option. Some
of the main features include:
Code Editor
Image Viewer
FTP Client
SSH
Dropbox/GitHub Integration
6. CONCLUSION
Figure 13 - TouchDevelop programming environment
Scripts can perform various tasks similar to regular
apps. Any TouchDevelop user can install, run, edit, and
publish scripts. You can share scripts with other people
by publishing them to the TouchDevelop script bazaar,
by submitting them as an app to the Windows Store or
Windows Phone Store, or by sharing them as crossplatform HTML5 Web Apps. [4]
TouchDevelop uses the latest web technologies that
can run in most modern web browsers to bring a cloudconnected, touch-friendly app creation environment to
every device, and it also works offline. It enables users
to program their mobile devices directly on the devices.
TouchDevelop scripts are written and run in the
TouchDevelop IDE, which can be installed on either a
Windows Phone or a web browser for other platforms
such as Android and iOS. To ease programming on
mobile devices, the IDE provides a semi-structured
code editor, which presents users with a small number
of possible choices (e.g., different types of statement) at
each step. In this manner, the users build the skeleton
of the script via touching to select choices, leaving only
variable names and expressions for typing. [6]
In addition to its use as a tool for creating application
programs, TouchDevelop has been used to teach
118
CASEmobile
References:
1
I. Curi and D. Adamec, Development of web applications adaptive to different screen sizes (Responsive Web
Apps), in Razvoj poslovnih i informacijskih sustava CASE 25, Zagreb, 2013.
S.Somasegar, Project Siena Beta 2: Enabling business users to create apps connected to enterprise services, web
and social, 2014. [Online] Available: http://blogs.technet.com/b/projectsiena/archive/2014/03/24/project-siena-beta2.aspx. [Accessed: 26-May-2014].
Sihan Li, Tao Xie, and Nikolai Tillmann, A Comprehensive Field Study of End-User Programming on Mobile Devices,
in Proc. IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC 2013), September 2013.
Windows App Studio How To. [Online] Available: http://appstudio.windows.com/Home/HowTo. [Accessed: 26-May2014].
Information on authors:
Ivan Curi, mag.inf.
e-mail: icuric@citus.hr
Ivan Curi is program manager in CITUS Ltd. and master of informatics in fields of information and software engineering.
He has gained practical knowledge managing complete lifecycle of several important projects like Conference@Net web
system for organizing conference and events, and C@N Motion - interactive multimedia kiosk that allows for managing
content using hand gestures at distance, through Microsoft Kinect device. Development areas he is intensively engaged
are development of Kinect application, ASP.NET MVC framework for web apps development and multiplatform
development of mobile apps. Ivan is EUCIP and Microsoft certified, author of several professional papers in the field of
information systems development and speaker on several conferences, like Mobility Day, MS WinDays, MS NetWork,
KulenDayz, CASE.
Tomislav Bronzin, mag.ing.el.
e-mail: tbronzin@citus.hr
Tomislav Bronzin is Microsoft Most Valuable Professional and founder of CITUS, Microsoft Silver Partner Company that is
specialized in software development, consulting and training. His specialty is development of distributed applications,
focusing on Windows Mobile and Unified Communication. Tomislav is trainer and speaker at Microsoft conferences like
Microsoft TechEd Europe, DevDays, PASS Europe, DevReach, WinDays, Sinergija, Vizija etc. He is teaching at several
universities and mentoring student teams for Imagine Cup Championship. Tomislav is INETA Europe Vice President and
organizer of http://www.mobilityday.com conference. He is author and one of the 4 MVP's and MCT's that are teaching
atwww.developersbootcamp.com based
on
his
experience
as
Solution
Architect
for
projects
like www.protectatwork.com. Protect@Work is distributed application based on most recent technologies like windows 8,
mobile (all platforms) & cloud computing. Tomislav has been Microsoft Regional Director for 10 years (2003-2013).
CITUS Ltd.
Dragutina Golika 63
10000 Zagreb
e-mail: helpdesk@citus.hr
web: www.citus.hr
tel.: +385 1 3667 120
CASEmobile
119
SAETAK
Rad prikazuje mogunosti koritenja Google Cloud Messaging (GCM) servisa za Android platformu, te koji omoguuje
developerima da pomou web servisa alju notifikacije i podatke instaliranim aplikacijama, na pametnim i mobilnim
ureajima ili tabletima. GCM pritom vodi brigu o stanju u kojem se mobilni ureaj nalazi, a asinkrona komunikacija je
mogua i u suprotnom smjeru, to jest od mobilne aplikacije prema servisu. GCM raspolae s mnogo korisnih znaajki
poput send to sync i senddata mogunosti, podrke za multicast poruke, rada u sluaju mirovanja, uporabu
perzistentne veze (upotreba XMPP-a), upstream slanja poruka i sinkronizacije obavijesti na veem broju mobilnih
ureaja. Takoer ova usluga se moe iskoristiti za lociranje ukradenih telefona, daljinsko podeavanje telefona, slanje
poruka prilikom postizanja odreene razine u igrama itd. Ukratko, usluga GCM je odlian nain za programere da
upravljanju s provjerenim aplikacijama, ali sa sobom nosi i odreene nedostatke jer je u zadnje vrijeme postala predmet
raunalnog kriminala.
ABSTRACT
This article presents the possibility of using Google Cloud Messaging (GCM) service for the Android platform. GCM
provides programmers and developers the possibility to send notifications and data to smart phones or tablets installed
applications, by means of using the Web services. It also takes care of the state in which the mobile device, and gives a
possibility of asynchronous communication in the opposite direction from mobile application to the service. GCM has
many useful features such as: Send to Sync and Send data capabilities, support for multicast messages, delay while
idle, the use of persistent connections (by using XMPP), the upstream messaging and synchronization notification across
multiple android devices. Also, this service can be very useful for locating stolen phones, remote adjustment of the
mobile device sending a messages when user reach a certain level in the game, and so on. Shortly, the GCM is a great
way for Android developers to manage their applications, but it also has its disadvantages and it recently became the
subject of cyber-attacks.
1. INTRODUCTION
Google cloud messaging (GCM) for the Android
platform is a service that provides applications
programmers and developers to communicate with
applications installed on smart phones, tablets, Chrome
120
CASEmobile
CASEmobile
extras to broadcast receiver. App then extracts raw data
from this intent and processes the data. The app server
sends a message to GCM servers. The described
processes make the life-cycle of GCM which is shown in
Figure 2:
121
122
CASEmobile
<receiver
android:name=".GcmReceiver"
android:permission="com.google.android.
c2dm.permission.SEND"
>
<intent-filter>
<action android:name="com.google.
android.c2dm.intent.RECEIVE" />
<category android:name="com.
case26.gcmdemo" />
</intent-filter>
</receiver>
<service android:name=
".GcmIntentService" />
Code 1 Enabling send messages
Broadcast receiver performs operations automatically
when service starts with operations. The following code
snippet starts GcmService with the method
startWakefulService()inside the
GcmReceiver class:
// Explicitly specify that GcmService
will handle the intent.
ComponentName comp=new
ComponentName(context.getPackageName()
,GcmService.class.getName());
// Start the service, keeping the device
awake while it is launching.
startWakefulService(context,
(intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
Code 2 Starting GCM Service
Client app cannot receive messages before it is
registered with the GCM servers. To achieve this,
developers must use class that extends the
GoogleCloudMessaging class with AsyncTask
object so receiving process can be performed in the
background. AsyncTask class enables easy use of
the UI thread and performing background operations.
Usually, registration should occur in the onCreate()
method in main activity or using a dialog if we want to
give the user a choice about receiving GCM messages.
It is necessary to include values of variables
Sender_ID and Application_ID given by Google
Developers Console. Once the registration ID is
retrieved it is stored locally on the device
(SharedPreferences) and sent to 3rd party server. It
is recommended to use HTTP connection so developers
can have an immediate answer if the registration went
well or not. The following code snippet shows short
registration process, described previously:
if(gcm == null){
gcm=GoogleCloudMessaging.
getInstance(context);
}
regID=gcm.register(Globals.
GCM_SENDER_ID);
// Send the registration ID to 3rd part
server server via HTTP
sendRegistrationIdToBackend();
// PersisttheregID no need to
registeragain
storeRegistrationId(context, regid);
Code 3 Registers the app with GCM server
asynchronously
If the registration went well with no errors as the
feedback of Figure 4 on the screen of demo application
will be show the following:
CASEmobile
com.case26.gcmdemo.ECHO ");
String id =Integer.toString
(msgId.incrementAndGet());
gcm.send(SENDER_ID +"@gcm.
googleapis.com", id, data);
msg="Sent message"; }catch
(IOException ex){
msg="Error :"+ex.getMessage();
}
return msg;
}
}
Code 5 Upstream a GCM message up to the 3rd party
server
123
124
CASEmobile
5. CONLUSION
This paper briefly introduced Google Cloud Messaging
for Android (GCM) which is defined as service that
allows developers to send data from 3rd party server to
their users' Android-powered devices, and also to
receive messages from devices on the same
connection. The GCM service handles all aspects of
queuing and delivery to the target Android application.
Key concepts of GCM are the components which make
the architecture of GCM and the credentials used for
access authentication in different stages of GCM.
Components include client app that runs on Android
device, 3rd-party app server and GCM connection
server. Credentials are the IDs and tokens used in
different stages of GCM (Sender ID, application ID,
registration ID, google user account and sender auth
token). GCM has many useful features such as: Send
to Sync and Send data capabilities, support for
multicast messages, delay while idle, and the use of
persistent connections (by using XMPP), the upstream
messaging and synchronization notification across
multiple android devices etc. The new CCS API for
GCM messages has made sending messages faster
than the HTTP API, but with the added complexity of an
asynchronous process. GCM is a great way for Android
developers to manage the communication with their
applications and users, but it also has important
disadvantages that should be taken in consideration.
References:
1
Android Developers, 2014a. GCM Overview [WWW Document]. Google Cloud Messaging - Overview. URL
http://developer.android.com/google/gcm/gcm.html (accessed 5.9.14).
Android Developers, 2014b. Implementing GCM Client [WWW Document]. Implementing GCM Client. URL
http://developer.android.com/google/gcm/client.html (accessed 5.9.14).
Android Developers, 2014c. Implementing GCM Server [WWW Document]. Implementing GCM Server. URL
http://developer.android.com/google/gcm/server.html#choose (accessed 5.12.14).
Cambell, A., 2013. Google Cloud Messaging: Cloud Connection Server Tutorial [WWW Document]. CapTech
consulting. URL http://captechconsulting.com/blog/antoine-campbell/google-cloud-messaging-cloud-connectionserver-tutorial (accessed 5.9.14).
CASEmobile
125
Chebyshev, V., Unuchek, R., 2013. Mobile Malware Evolution: 2013 - Securelist [WWW Document]. URL
http://www.securelist.com/en/analysis/204792326/Mobile_Malware_Evolution_2013?print_mode=1 (accessed
5.19.14).
freelancersnepal, 2014. Google Cloud Messaging (GCM) in Android using PHP Server. Freelancersnepal.
Google Developers, 2013. Google I/O 2013 [WWW Document]. Google I/O 2013. URL
https://developers.google.com/events/io/ (accessed 5.26.14).
HMKCode, 2014. Android Google Cloud Messaging Tutorial. Android Google Cloud Messaging Tutorial.
PushBots, 2012. PushBots: communicate with your mobile app users in minutes [WWW Document]. PushBots. URL
https://pushbots.com (accessed 5.26.14).
Information on authors:
Zoran Kos B.Sc
e-mail: zoran.kos@foi.hr
Zoran Kos is 2nd year student of Information and Programming engineering of Faculty of Organization and Informatics in
Varadin. Main interests are programming web, desktop and mobile application, new IT trends like cloud computing and
mobility, making and presenting business models for startup projects. While developing new apps he focused on front-end
development. He already has few smaller but successful projects behind him.
Zoran is the main contributor to this paper. He wrote the first version of the text and did coding of the presented examples.
Zlatko Stapi, PhD.
e-mail: zlatko.stapic@foi.hr
Faculty of Organization and Informatics
Pavlinska 2, 42000 Varadin, Tel: +385 42 390 820, Fax: +385 42 213 413
Zlatko Stapi, PhD., works at the Information Systems Development Department at Faculty of Organization and Informatics
in Varadin. He obtained his PhD in computer sciences from University of Alcal (Spain) and in information sciences from
University of Zagreb (Croatia) in cotutelled doctorate program. His scientific and research interests include software- and
mobile applications development methodologies. He participated in more than 15 scientific and professional projects and
published more than 30 scientific and professional papers. Currently he leads the Laboratory for Development and Transfer
of Mobile Technologies (FOI MT-Lab). Zlatko is putting a special focus in inclusion of students in his scientific and
professional activities. The published papers, projects, awards and other relevant information can be found on his personal
website: http://www.foi.unizg.hr/djelatnici/zlatko.stapic.
Zlatkos contributions to this paper are only of corrective nature. He mentored student Zoran Kos in defining the body, the
structure and the style of the paper. After the first version of the paper is written, he proof-read the text and made
necessary changes to make the text more focused and readable.