Title: Developing Mobile Applications
1Developing Mobile Applications
- Mark Green
- School of Creative Media
2Introduction
- Have looked at some of the tools and techniques
used to develop mobile applications - Will now look at more of the details
- Fill in some of the details that we didnt cover
earlier - Provide a complete picture of application
development
3WARNING
- Some parts of this presentation have a lot of
technical information - Will go into some of the technical details
- Dont worry about following everything
- Get the general idea of how things are done, what
the basic process is - Know enough to talk about it intelligently
4Active Content
- Earlier we talked about forms, could collect
information from user - Browser sent information to web server
- Web server then generated a response based on the
users input - Talked briefly about CGI, the server needs to run
a program to produce a new web page
5Active Content
- Look at the details of how this is done
- Want to create web pages that have dynamic
content - Respond to user input
- Generate content based on database (search
engines, eCommerce sites, etc) - Generate content based on browser (WAP 1, WAP 2,
standard PC, etc)
6Active Content
- The old way of doing this was based on writing
programs - A C or Java program would retrieve information
sent by browser - It would then generate the new page by writing
all of the html from within the program - Not easy to do, and hard to change page layout
7Active Content
- Active content is a way of avoiding most of the
programming - A collection of similar techniques, such as ASP
and JSP - All based on the same basic idea, just some of
the details are different - Allow content designers to design most of the
page without needing to program
8Active Content
- Takes the opposite approach to CGI
- Instead of writing a program to generate html,
put parts of the program into the web page - Browser doesnt know the difference, it uses the
same techniques for CGI and active content - No need to change the browser, all changes are in
the server
9Active Content
- The basic idea is very simple
- Most of the web page is done in standard html or
xhtml - This is the same as developing a standard web
page - The parts of the page that need to be changed are
handled by a small script that generates the html
10Active Content
- When a browser asks for an active page the
following things happen - The server finds the page
- It copies the standard html directly to the
browser - To generate the dynamic parts of the page it runs
the scripts, sends the output from the scripts to
the browser - The server needs to do more work, but the browser
just sees standard html
11Active Content
- Basically the same as handling a standard web
page - The only difference is the web server runs the
scripts to generate the dynamic parts of the web
page - Active content doesnt use .html or .htm, instead
is uses .asp or .jsp, so the server knows its an
active page
12Active Content
- Most active content systems allow you to select
the scripting language you want to use - The most common scripting languages are
JavaScript and Visual Basic script - Perl and Python are also quite common, mainly
used with Apache (the most common web server)
13Active Content
- Active content is a reasonably good approach to
developing dynamic web pages - Web designers can do most of the page design
using tools the are familiar with - May need a programmers help to do some of the
scripting, but once this is done they can keep
working on the page
14Active Content
- There are some problems with this approach
- The source for the web pages can be quite long
and hard to follow, changes may not be that easy - Scripting language may not be able to do
everything - May not be the most efficient approach
15Summary
- Active content allows us to produce dynamic web
pages - Handled completely on the server side, no changes
to the browser - Embed scripts in the html for the web page,
execute by server before sending to browser - General approach, can be used in standard
applications as well
16Summary
Standard Web Page
Find Page
Page Request
Browser
Web Server
HTML Page
HTML Page
HTML Page
Active Content
Run Script
Find Page
Page Request
Browser
Web Server
Active Page
HTML Page
HTML Script
17Details
- There are many versions of active content
- They all work in basically the same way, only
differ in some of the details - Version depends upon the web server that you are
using - Most servers only support one type of active
content, so determine the web server you will be
using before you start developing active content
18ASP
- The particular version of active content we will
look at is ASP (Active Server Pages) - This is a Microsoft product and is part of their
IIS web server - Since we run IIS as our web server, this is the
natural choice for our examples - The example discussed here will run on web sites
hosted at SCM, so you can try it out
19ASP
- ASP supports a wide range of scripting languages,
the documentation says over 20 - The main ones are Visual Basic script and
JavaScript - We will use Visual Basic script in our examples,
since its the standard language used with ASP
20ASP
- The script and the html content are mixed in the
same file, so how do we separate them? - Script commands are enclosed in the special tags
lt and gt - Anything between these two tags is assumed to be
script commands by the web server, and it will
try to run them
21ASP
- How does the web server know which scripting
language to use? - We tell it by including a line like this at the
beginning of the file - lt_at_ LanguageVBScript gt
- This line tells the web server that we are using
Visual Basic script as the scripting language
22Example One
- To see how this works we will start with a very
simple example - We will produce an ASP page that stores a
greeting in a variable, and then includes this
greeting in the resulting web page - We use two lines of script, one to set the
variable and the other to display the variable
23Example One
lt_at_ LanguageVBScript gt lthtmlgt ltheadgt lttitlegtExam
ple 1lt/titlegt lt/headgt ltbodygt lt Greeting "Hello
world!" gt lt Greetinggt lt/bodygt lt/htmlgt
24Example One
- There are three lines of interest in this example
- The first line informs the web server of the
scripting language that we are using - Later we set the variable Greeting to the string
we are going to display - Finally we print the value of Greeting in the web
page
25Example One
- To print the value of Greeting we use the
following - lt Greetinggt
- a scripting tag that starts with takes the
value after it and adds it to the web page being
constructed - One of the main things we will do is add things
to web pages, so this short cut is handy
26Example Two
- Our next example is a bit more sophisticated, we
will print the greeting 10 times - We do this with a FOR statement that surrounds
the line the adds the greeting to the page - Note in this case we dont have an at the
beginning, since we dont want the FOR added to
the web page
27Example Two
lt_at_ LanguageVBScript gt lthtmlgt ltheadgt lttitlegtExam
ple 2lt/titlegt lt/headgt ltbodygt lt Greeting "Hello
world!" gt ltFOR i 1 TO 10 gt lt
Greetinggt ltNEXTgt lt/bodygt lt/htmlgt
28Example Two
29ASP
- This example illustrates the two things that we
want to do with scripting - Add something to the web page that is being
constructed - Perform some computation that is part of the
application, or assists with constructing the web
page - Not all script commands add to the web page, but
they can be important parts of the application
30More Details
- How do we make all of this work with the mobile
phone simulator? - In order to retrieve web pages from real web
sites you need to have the WAP Gateway Simulator
running - The simulator redirects your http requests to a
real web server - This is similar to what happens with real mobile
phones
31Objects
- The web server provides a number of objects that
we can use in our scripts - Two of the most important ones are
- Request this object has the information sent
from the browser when requesting the page, this
includes the form input - Response this object contains the information
that we are sending to the browser
32Objects
- One of the most important response functions is
write - This function adds its parameter to the web page
that we are building - It does basically the same thing as lt , but it
is easier to put in a longer script - To see how this works we will rewrite the second
example to use this function
33Example Three
lt_at_ LanguageVBScript gt lthtmlgt ltheadgt lttitlegtExam
ple 3lt/titlegt lt/headgt ltbodygt lt Greeting "Hello
world!" gt ltFOR i 1 TO 10 response.write
Greeting NEXTgt lt/bodygt lt/htmlgt
34Form Input
- One of the most important applications of ASP is
processing form input - In our previous web examples we produced a number
of forms, but had no way of processing the
information collected - With ASP we can collect that information and use
it later in our application
35Example Four
36Example Four
- This web page allows us to enter a name and
several other pieces of information - The name is sent to the browser when we press the
submit button - We would like to use this name in subsequent web
pages, like the following example
37Example Four
38Form Input
- The form function in the request object can be
used to retrieve form input - The parameter to this function is the name of the
form item - Remember each item on a form has a unique name,
this name is used to retrieve the value of the
item - Lets look at the form first
39Example Four - Form
ltform action"example4.asp" method"post"gt Name
ltinput type"text" name"name" title"Name"
size"10" value"Mark"/gt ltbr/gt ltinput
type"radio" name"status" value"single"
title"single" checked"checked"/gt Single
ltbr/gt ltinput type"radio" name"status"
value"married" title"married" /gt Married
ltbr/gt ltinput type"checkbox" name"now"
title"now" checked"checked"/gt Now
ltbr/gt ltinput type"checkbox" name"today"
title"today"/gt Today ltbr/gt ltinput
type"checkbox" name"tomorrow"
title"tomorrow"/gt Tomorrow ltbr/gt ltinput
type"submit"/gt lt/formgt lt/bodygt
40Example Four
- This form starts with a text entry box
- The name of this box is name
- When the form is submitted, this property will
have the name that the user entered - To retrieve this name from the form we can use
- request.form(name)
41Example Four - ASP
lt?xml version"1.0" encoding"utf-8"?gt lt!DOCTYPE
html PUBLIC "-//WAPFORUM//DTD XHTML Mobile
1.0//EN" "http//www.wapforum.org/DTD/xhtm
l-mobile10.dtd" gt lthtml xmlns"http//www.w3.org/
1999/xhtml"gt ltheadgt lttitlegtForm
Examplelt/titlegt lt/headgt ltbodygt
lth1gt Response lt/h1gt ltpgt Thank you
for your input lt request.form("name") gt lt
Session("userName") request.form("name") gt
lt/pgt lt/bodygt lt/htmlgt
42Example Four
- In the ASP page we retrieve the name and add it
to the web page, this just gives some feedback to
the user - But what if we want to use this name on other web
pages, say later in the session? - The session object helps us with this
- Each session (a visit to the web site by a single
user) has its own session object
43Sessions
- On the first page request a session id and a
session object are created - The session id is part of a cookie that is sent
to the browser - All the following requests will have this cookie,
so we know the session the request belongs to - The session object lasts until the end of the
session
44Sessions
- Each session can have its own set of variables
- In this example we are using the variable
userName to contain the name of the user - We set the value of this variable in the
following way - Session(userName) request.form(name)
45Sessions
- In any of the subsequent web pages we can add the
users name to the page in the following way - lt Session(userName) gt
- A session can have any number of variables and we
are free to give the variables any name we like - If we have lots of visitors sessions can take up
a lot of memory in the server
46Sessions
- How do we know when a session is over?
- This is hard, browsers dont tell us when they
are leaving our web site, so we have no way of
knowing when the user leaves - ASP handles this by assuming a session has ended
if there have been no page requests for 20
minutes - When the session ends the session object is
destroyed
47Saving Data
- Sessions allow us to save data during a session,
but what about for longer periods of time? - The application object allows all the users
running the same application to share data - This object works the same way as the session
object, we can create our own variables and
assign names to them
48Saving Data
- The application object is destroyed when the web
server stops running, data stored in it isnt
permanent - Also the web administrator must set up the
application for you, the web server doesnt do it
automatically - This might be useful for simple online games or
chat rooms
49Saving Data
- Can also use a database to store data
- Can connect to a database from an ASP page, do
all of the standard database operations - Retrieve and add data to the database, etc
- This is the best solution if there is a lot of
data, or a lot of users - Needs some knowledge of database systems
50Saving Data
- If the data is relatively simple it can be saved
in a text file - Not good for a large amount of data or if
accessed frequently - To see how this works we will build a simple
guest book for our mobile service - This will use a file to store the names of the
people who have visited our site
51Guest Book
- Our guest book is relatively simple, we just
store names - Normally some comments on the web site would also
be saved, but text is hard to enter on mobile
devices, so we keep it simple - Would also be hard to display long comments on a
mobile phone
52Guest Book
- There are two things that we need
- The first is the form used to collect the names
- And the second is storing the names in the guest
book file - This will involve what looks like two pages to
the user, but will really just be one page on the
web server
53Guest Book
54Guest Book
55Guest Book
- The guestbook.asp file is divided into two parts
- The first part displays the form and the list of
names in the guest book - The second part stores the name from the form
into the guest book file - There is a header at the start of the page that
declares some variables
56Guest Book
Dim objFSO ' FileSystemObject Variable Dim
objFile ' File Object Variable Dim strFile '
String variable to store the path / file we write
to strFile Server.MapPath("guestbook.txt") Resp
onse.expires -1
57Guest Book
- The first three lines declare the variables used
in the script - The next line gets the complete path to the
guestbook.txt file - Server.MapPath adds the directory for the web
page to the name of the file - The last line ensures that the page isnt cached
in the phone, otherwise we cant get back to the
first part of the page
58Guest Book
- Next we need to determine if we need to post the
form - How can we tell?
- If the request as a non-empty value for the name
the user must have already entered a name, so we
dont need to post the form - A simple if will handle this
- If Request.Form("name") "" Then
59Guest Book
lth3gtSign Our Guestbooklt/h3gt ltform
action"guestbook.asp" method"post"gt lttablegt lt
trgt ltth align"right"gtNamelt/tdgt lttdgtltinput
type"text" name"name" size"15"gtlt/inputgtlt/tdgt
lt/trgt lt/tablegt ltinput type"submit" value"Sign
Guestbook!"gtlt/inputgt lt/formgt
60Guest Book
- The form for the guest book is quite straight
forward - After displaying the form we need to add the
names in the guest book - To do this we open the guestbook.txt file
- Read the file one line at a time and add each
line to the page we are constructing
61Guest Book
' Create an instance of the FileSystemObject Set
objFSO Server.CreateObject("Scripting.FileSyste
mObject") ' Open the TextFile (FileName,
ForReading, AllowCreation) Set objFile
objFSO.OpenTextFile(strFile, 1, True) Do While
Not objFile.AtEndOfStream response.write
objFile.ReadLine vbCrLf Loop Set objFile
Nothing Set objFSO Nothing
62Guest Book
- To read the file we first need to create a file
system object - We then use this object to open the text file
with the names in it - We then loop through the file, sending it one
line at a time to the web page - Finally we set the two object to nothing so they
will be closed
63Guest Book
- In the second part the file is opened using
basically the same technique - The name is then added to the file, but when we
do this we add html formatting, so we can just
copy the line directly to the web page - We also ensure that the name is properly encoded
for html
64Guest Book
' Create an instance of the FileSystemObject Set
objFSO Server.CreateObject("Scripting.FileSyste
mObject") ' Open the TextFile (FileName,
ForAppending, AllowCreation) Set objFile
objFSO.OpenTextFile(strFile, 8,
True) objFile.Write "ltstronggt" objFile.Write
Server.HTMLEncode(Request.Form("name")) objFile.W
rite "lt/stronggtltbr/gt " objFile.WriteLine "" '
Close the file and dispose of our
objects objFile.Close Set objFile
Nothing Set objFSO Nothing
65Guest Book
- The final thing we need to do is inform the user
that his or her name has been added - Also provide a link for going back to the guest
book
- lth3gtYour comments have been written to the
file!lt/h3gt - lta href"guestbook.asp"gtBack to the guestbooklt/agt
66ASP
- There are a number of other things that can be
done with ASP - For example its possible to send mail from an ASP
page, collect the information for the email from
a form - It is also possible to redirect the browser to
another page, or include content based on the
type of browser or user input
67Resources
- There are a number of web sites that have
information on ASP - One of the better sites is
- www.asp101.com
68Ring Tones
- With almost everyone having a mobile phone people
want some way to customize their phone, make it
different - Can change physical appearance by adding covers,
etc - One of the most popular customization is ring
tones, something that be heard and is obvious
69Ring Tones
- Now big business, one of the most profitable
mobile data services - Becoming a multi B industry, to the outsider
really doesnt look like it, but - Many people have phones, many can add ring tones
easy to do and understand - Each ring tone costs around 15
- Carrier makes 1 - 3 off of each ring tone
download
70Ring Tones
71Ring Tones
72Ring Tones
- Music industry looking at ring tones as
replacement for singles and radio - Old model
- A few singles produced from each album
- Singles played on radio, often before album
released - Requests and sales generate hit status
- Used to generate sales for the album
73Ring Tones
- Radio industry in trouble, with Internet hard to
measure, sales of singles has disappeared, no 45
rpm records - But, can easily measure number of ring tone
downloads - With increasing audio quality, ring tones could
sound as good as radio - Record industry seriously considering them
74Ring Tones
- Important considerations
- Song are relatively short, 2 or 3 minutes
- Ideal mobile content, easy to consume on the road
- Popular for a short period of time, phone has
limited storage, can be discarded when next hit
comes along - Download both song and ring tone based on song,
what a package!
75Technology
- Several technologies for ring tones have been
developed over the years - Get more complex as phones gain more capabilities
- Early ring tones were monophonic (one note at a
time) - Sent to the phone over SMS, so they couldnt be
very long
76Monophonic
- Encoding of the ring tone is quite simple, in
some ways it resembles a very simple version of
Midi - A small set of instructions, the common ones are
- Tempo
- Note
- Scale
- Pause
77Monophonic
- Notes are specified as their position within the
octave, number between 0 and 12 - Durations specified in terms of standard musical
notation, not in terms of seconds - Scale command used to change the octave used
- Pause is used to produce a rest
- Can define repeating patterns
78Technology
- Most phones now have polyphonic (more than one
note at a time) ring tones - Still need to worry about amount of memory
required to store ring tones, so cant do sampled
sounds - Need a more compact format
- This opens up a lot of possibilities, can have
much more sophisticated sounds
79Technology
- Midi is one of the standards used for polyphonic
ring tones - Reasonably compact representation, only a few
bytes per note - Well known format
- Many composers are familiar with it, can easily
produce content - Many composition tools are already available,
dont need to create new ones
80Technology
- Problem different phones have different
capabilities - Size of ring tones, this is obvious and easy to
control - Level of polyphony, number of notes that can be
played at the same time, this is the real problem - PC Midi synthesizers can play at least 64 notes
at the same time, not the case with phones
81Technology
- First polyphonic phones could only play 4 notes
at a time - Second generation phones could play 16 notes at a
time - Some current phones can play 24 or more notes at
the same time - Nice to see the evolution of capabilities, but
this causes a problem
82Technology
- If we want to support the widest range of phones,
restrict to 4 note polyphony - But, this wastes the capabilities of other
phones, we could produce much better ring tones
for these phones - If we aim for more polyphony it could sound bad
on low end phones - Wont be able to play all the notes
83SP-Midi
- Would like our ring tones to sound good on all
phones - Dont want to produce separate versions for each
type of phone - May not be possible to determine phone
capabilities before download - Scalable Polyphonic Midi is one solution to this
problem
84SP-Midi
- If I compose a ring tone assuming 16 level
polyphony and someone plays it on a phone with 4
level polyphony there will be problems - Phone can only play 4 notes at a time, but the
ring tone could need 16 - If we are already playing 4 notes and the ring
tone asks for a fifth note what will happen?
85SP-Midi
- Could do one of two things
- Could select one of the current notes, stop
playing it and start playing the new note - Ignore the new note and keep playing the current
4 notes - Both of these solutions could cause problems,
depending upon the role of the new note - Need to know how important it is
86SP-Midi
- If the new note is part of the melody, want to
stop one of the current notes and play the new
one - If the new note isnt as important as the current
notes, then want to keep playing them - Dont want to stop an important melody note for
one that isnt as important
87SP-Midi
- The phone doesnt know which notes are important,
it has no musical knowledge - Phone is likely to play the wrong notes, ring
tone will sound bad - SP-Midi provides a solution to this problem
- It gives the composer several ways of indicating
the notes that should be played on less capable
phones
88SP-Midi
- Priority scheme is based on channels
- Recall a Midi channel is like an instrument, all
the notes on the same channel played by the same
instrument - Can have several simultaneous notes on the same
channel - First, each channel is assigned a priority by the
composer
89SP-Midi
- Composer puts the most important notes in the
channel with the highest priority - For example, the melody would be placed in the
highest priority channel - The least important parts of the song would be
placed in the channels with the lowest priorities - Composer must carefully design the song so the
most important parts are played
90SP-Midi
- This solves part of the problem
- The phone will always play the most important
notes, but it could still sound bad - If a low priority note is playing and a more
important one comes along, the lower priority
note will immediately stop playing - This can be quite noticeable, it would be better
if the lower priority note didnt start
91SP-Midi
- We need some way of saying dont play these
channels, even if at some point there are
resources for them - The MIP (Maximum Instantaneous Polyphony) Midi
message is used to solve this problem - Matches the channels to the polyphony level of
the phone
92SP-Midi
- For each polyphony level the MIP message gives
the set of channels that can be played - A 4 note phone can then pick the set of channels
that will play at most 4 notes at the same time - The phone will ignore all of the other channels,
so the ring tone will sound reasonable on any
phone
93SP-Midi
- SP-Midi ring tones can either be delivered by MMS
or WAP - With MMS the phone sends an SMS message to the
server requesting a particular ring tone - The server responds with an MMS message
containing the ring tone - The phone adds the ring tone to its list
94SP-Midi
- In the case of WAP delivery, the user browses to
the web page with the ring tones - Selecting a link will download a ring tone using
a standard WAP response - Similar to a normal web page download
- Ring tone can then be played and added to the
list of ring tones for the phone
95Technology
- Now that phones have more memory its possible to
use sampled ring tones - This is quite recent and only a small number of
phones support it - True Tone ring tones are based on the AMR-WB
audio format - This format was originally designed for speech,
but can be used for music
96True Tone
- AMR-WB requires 1-3 kBytes per second of sound
- Most 2.5G services restricted downloads to
between 30 and 100 kBytes - The maximum is about a minute of good quality
sound, but could be as little as 10 seconds - This is not a problem with 3G phones
97True Tone
- Why use True Tone ring tones
- Can have a much wider range of sounds
- Can use existing sounds/music that is already is
a sampled format - Easy to produce by converting existing sound
files - Can do novelty ring tones, like people talking or
sound effects
98True Tone
- Can be downloaded using either MMS or WAP, the
same as SP-Midi ring tones - Fairly new, and not a very large market yet so
they are not very popular - Relatively slow download on 2.5G, better on 3G,
but they might define a different set of
standards for ring tones
99Composing Ring Tones
- Its a mobile phone, not a high end home stereo
system! - Phones have a small speaker, not very good audio
quality - Only have good quality when headphones are used
- Stay in the narrow frequency range used for voice
communications
100Composing Ring Tones
- Avoid high and low frequencies
- Use instruments that have a solid sound, not a
weak one - Phones often used in noisy environments, the ring
must be heard! - Need to have enough volume in the ring tone, no
quiet sweet melodies - Be a bit (a lot??) annoying
101Composing Ring Tones
- Remember that a ring tone repeats
- The phone doesnt ring just once, it can ring
several times - The end of the ring tone must flow into its start
- Better to use a short riff than a longer
sequence, it will repeat better
102Composing Ring Tones
- There are several tricks that can be done with
SP-Midi ring tones - Volume can be increased by repeating a channel,
particularly if the channel is played by a weak
instrument - This is easy to do in a sequencer, just duplicate
the track - Repeating more than once probably wont help much
103Composing Ring Tones
- Duplicating tracks can be used for several other
effects - Using a small time delay will produce an echo
like effect - This will give the ring tone more depth and
partially compensate for small speakers - Slightly detuning the second track gives an
interesting, if not annoying effect
104Composing Ring Tones
- Remember to try the ring tones on real phones
- What sounds good on your computer may not sound
good on a phone, computers have better speakers
and sound cards - Some ring tone composing software can simulate
phone speakers, giving the composer some idea of
what it will sound like on a phone
105DRM
- Digital Rights Management protecting your
content from pirates - If you can download content for your phone,
whats to stop people from pirating it, making
illegal copies - Set up their own web site for ring tones based on
copied content - Major concern in the content industry
106DRM
- The content industry was too late for the
Internet, pirating well established before they
knew about the Internet - Dont want to be left behind with mobile media
- Content industry now playing an active role in
media distribution technology before it is
released
107DRM
- Piracy is probably not as large a threat for
mobile media - The technology makes piracy more difficult and
less profitable - Download cost is relatively low, so there isnt
much of a profit margin for pirates, their costs
will be similar to the developers - More risky, easier to get caught
108Mobile vs. Internet
- Small number of carriers
- Pirates in competition with carriers
- Pirates have negative impact on revenue
- Pirates are relatively easy to block
- Large number of carriers
- No competition between pirates and carriers
- Pirates have a positive impact on revenue
- Pirates are very hard to block
109DRM
- Unlike the internet, pirates are in competition
with carriers - Carriers get a portion of the revenue from
content, if content is pirated carrier loses this
revenue - With very few carriers its quite easy to block a
pirate, dont allow requests to their web site
110DRM
- Distribution over the air not possible for
pirates - This leaves burning CDs and downloading from
customers computer - Since most content downloads are around 15,
pirates will need to charge around 5 or 6 to
get sales, customers wont pay 25 for the
pirated version - No profit margin
111DRM
- Unlike PCs, mobile phones are hard to hack, but
not impossible - Only a few manufacturers, cannot be custom built
- Cannot install your own operating software, done
by manufacturer - Much tighter control over what can be done on the
phone
112DRM
- The OMA (Open Mobile Alliance) has defined three
methods of DRM, only the first method is widely
used - Forward-lock prevents content from being
forwarded to another phone - A user can download the content and play the
content - The content can be sent to another phone, but
that phone cannot view the content
113DRM
- On download the content is encrypted with a key
that is unique to the phone - Only the phone that it was downloaded to has the
key, so it can only be viewed on that phone - The content is only stored in the encrypted form,
it is never in plain form - This works for all types of content, both
streaming and download
114DRM
- There is one hole in this approach, for Java
applications the installation package isnt
encrypted - The encryption happens after the application is
installed - A user can forward the installation package to
another phone, and the application could be
potentially installed there
115DRM
- There are several ways around this, including
getting a key before the package can be installed - Combined Delivery both the content and the
rules and keys for accessing the content are
downloaded together - Different rules can be applied to different parts
of the content
116DRM
- User could be able to preview the content without
paying, but would need to obtain a key to view
the entire content - More flexible than forward-lock, can give
different levels of access to different parts of
the content - Forward-lock is all or nothing, cant give
selective access
117DRM
- Separate Delivery separates the content from the
keys and access rights, they are downloaded as
two separate packages - The most secure and flexible of the three methods
- User must have both parts to access the content,
the content part can be freely distributed, but
cannot be accessed without the second part
118DRM
- Since the access rights are separate they can be
time dependent, for example view once, or view
for a week - The content developer can rely on multiple
channels to distribute the content, even pirates - They control distribution of the access rights, a
much smaller download
119DRM
- This is not a consumer friendly as the other
approaches - Forward-lock is available now on newer phones,
but the other two have not been widely deployed
yet - Free tools available for adding forward-lock to
content, can be done now with very little work
120MMS
- So far treated SMS and MMS as basically the same,
but this really isnt the case - There are two main differences
- Message transfer mechanism
- Message content
- We are mainly interested in message content, but
will briefly look at transfer as well
121Message Transfer
- Unlike an SMS a MMS message is not delivered
immediately to a phone - Instead the phone is sent a message notification,
telling the phone that a message is waiting - The message notification contains a URL that
tells the phone how to retrieve the message
122Message Transfer
- If the user wants the message, they can tell the
phone to retrieve it - The user can also ignore the message, this can
save money since the messages could be large - Message retrieval is usually over http, but other
protocols could be used
123Message Transfer
- Similarly when you send an MMS, the whole message
goes to the MMSC, but only the notification goes
to the person you sent it to - They can then decide to download your MMS or
ignore it - A receive notification may not mean that the
person has viewed the message, only the
notification
124Message Content
- An MMS message can have a single media item, a
picture from the phones camera - This is typically the case when you send an MMS
from your phone - In other cases it can have multiple items, in
this case there needs to be presentation
information as well
125Message Content
- A message produced by a service will have
multiple items, for example text, image and
sound, in the same message - If there are multiple images, or videos, where do
we put them on the screen? - What is the timing of the individual components?
- This is handled by the presentation part of the
message
126Presentation
- An MMS message consists of multiple parts
- The presentation component
- The individual media items
- SMIL, Synchronized Multimedia Integration
Language is used for the presentation component - A standard multimedia language, not restricted to
phones
127SMIL
- SMIL description divided into two parts
- Head the screen layout and transitions, the
spatial part of the presentation - Body the timing and duration of the individual
media pieces, the temporal part of the
presentation - The head divides the screen into a number of
regions, regions can overlap, define a stacking
order
128SMIL
- Region size and position can be specified in
pixels, or percentage of the screen size - Can specify both the size and position of a
region - Transitions can be used at the beginning or end
of a media item - Transitions usually applied to text and images,
dont work with video
129SMIL
- The body specifies the items to be displayed,
give name of media and region where its displayed - Also give timing information, can have a duration
for each item, and a start time - Can also have in and out transitions for each item
130SMIL
- With multiple items can be displayed in parallel
of sequentially - Grouping items are used for this
- In a ltpargt group all the items are displayed in
parallel - In a ltseqgt group they are displayed one after the
other - Can put a ltpargt in a ltseqgt and visa versa
131SMIL
- SMIL is an XML based language, so it looks like
HTML - In the lab we will look at the software that can
be used to create MMS messages and look at some
examples