Programming a Mobile Device - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Programming a Mobile Device

Description:

As we have discussed previously there are a lot of devices ... looked at the definition by Schiller in his book 'Mobile Communications' which listed devices ... – PowerPoint PPT presentation

Number of Views:134
Avg rating:3.0/5.0
Slides: 27
Provided by: socSta
Category:

less

Transcript and Presenter's Notes

Title: Programming a Mobile Device


1
Programming a Mobile Device
  • Justin Champion
  • 3292 JJC1_at_staffs.ac.uk

2
Content
  • Programs for devices
  • What are devices
  • Considerations
  • Major Programming Languages
  • C
  • .NET
  • Java Micro Edition
  • Lab View
  • Distributing the program

3
Mobile - Devices
  • Mobile devices is a very generic name
  • As we have discussed previously there are a lot
    of devices which are a part of this
  • We have previously looked at the definition by
    Schiller in his book Mobile Communications
    which listed devices
  • Sensor
  • Fire Sensors
  • Embedded controllers
  • These monitor and control something like water
    levels
  • Pager
  • Paging device such as a text pager
  • Mobile phones
  • Personal digital assistant
  • The XDAs used in the tutorials
  • Pocket computer
  • Sony one opposite is an example of this
  • Laptop
  • Laptop Tablet PC

4
Mobile - Designs
  • Mobile and wireless Devices do come all shapes
    and sizes with differing functionality
  • These do need consideration when you are
    designing your application
  • There is little benefit writing a good game which
    is based on a PDA type screen
  • To find that the majority of your user base is
    using a smart phone screen

http//en.wikipedia.org/wiki/ImagePalm_tungsten.j
pg
http//www.mobileguerilla.com/articles/2006/01/04/
sony-ericsson-w810i.php
5
Mobile - Designs
  • The application needs to be either written in a
    generic format where it will work with the most
    device
  • Or specifically with a device in mind when you
    develop
  • Consider if you need a specific hardware key or a
    certain screen size to display your information
  • What will happen if the device does change
  • How will this effect your program
  • In the fast moving world of PDA type devices it
    is quite common to have multiple devices and user
    upgrading on a regular basis
  • Clive Chandler will talk about these
    considerations more in his lectures in a few
    weeks time
  • Hardware though can change and this may mean a
    complete rewrite of the software
  • Embedded controllers could be an example of this
    where they might have no OS

6
Mobile - Hardware
  • By the nature of being mobile devices they are
    usually restricted in the power requirements
  • These will effect the applications which you can
    write for these devices
  • There is nothing stopping you from writing a CPU
    intensive simulation for the device
  • It would be the wrong hardware for this and it
    would have an effect on how long the simulation
    runs for and would effect the life of the battery
  • This needs to be considered with a mobile device
  • If you need large amounts of memory or a powerful
    CPU but you still need portability you would look
    towards a laptop / tablet PC environment
  • These devices have more powerful processors and
    batteries

7
Mobile - Hardware
  • Within a PDA or phone type application business
    type applications are more suited
  • By business type application these are like
    electronic forms which a user completes
  • Limited needs in terms of displays
  • Very little memory requirements
  • Very limited CPU usage
  • To conserve the battery the processor will switch
    off when not needed or slow down its operations
  • As seen in the tutorial it can be difficult to
    enter data into the device
  • This also needs thought if this is needed and if
    a large amount of text is needed then again a
    Laptop could be the better device to write the
    program for
  • The PDA and Smartphone devices have the advantage
    though that they are portable
  • Users are able to carry them easily in there
    pocket
  • Meaning that this type of application is readily
    accessible to them
  • These devices are also relatively cheap to
    purchase and will give various methods of network
    connectivity depending on the model.

8
Languages
  • The languages which are used for programming
    desktops
  • C
  • Microsoft .NET
  • Java
  • LabView
  • With the use of these languages this means that
    the development time will be reduced
  • The alternative is that a programmers learns a
    new and specific language for that device
  • This will reduce the number of people which can
    write software for the devices
  • Increasing the value of any program and
    ultimately probably costing a company more in
    terms of training and the wages someone can
    request
  • For most important business applications the time
    that it takes to develop is very important

9
Languages Web Development
  • In addition to the programming languages which
    will be discussed
  • If the device has a permanent internet connection
    then there is a consideration of using WebPages
    to present and receive information
  • The page can be secured and displayed quite
    easily
  • A lot of the functionality which is used within
    the development environments is available to
    webpage users.
  • These are good at conveying information and
    completing form type applications
  • These are the majority of business type
    applications E-paper
  • Disadvantage
  • The device does need to be attached to the
    Internet during all of the work
  • This can be very expensive
  • If you are moving connections can be lost and you
    will most likely be issued a new IP address when
    you reconnect

10
Languages Web Development
  • The pages depending on the webpage element can be
    reformatted depending on device which is being
    communicated with
  • The device when requesting the webpage should
    send some information to the server about the
    capabilities of the device
  • The user agent will be more detailed than it is
    for a desktop machine telling the web server
    which device is communicating
  • This information can then be used to adapt the
    content for the user
  • The machine specifications will not be detailed
    but will tell the server which type of device is
    asking for information and then based on this the
    content will be adjusted
  • i.e. a certain screen size and capabilities for
    colors
  • If the device is not known then it a default set
    of setting is used

11
Languages Web Development
  • Example User Agent

Win XP Desktop User Agent
HTTP_USER_AGENT Mozilla/4.0 (compatible MSIE
7.0 Windows NT 5.1 .NET CLR 1.0.3705 .NET CLR
1.1.4322 InfoPath.1 .NET CLR 2.0.50727)
Pocket PC Device
HTTP_USER_AGENT Mozilla/4.0 (compatible MSIE
4.01 Windows CE PPC 240x320)
12
Languages C
  • C
  • This is a powerful object orientated language
    which interfaces directly with the OS
  • Or depending on the device if it does not use a
    OS with the hardware
  • Lots of manufacturers produce specific
    Application Program Interfaces (API) for the
    specific device to get decrease developer time
  • Here is the Link to the Nokia webpage
    http//forum.nokia.com/
  • There are a large number of C compilers
    availble to develop with
  • Most commonly you see C being used when
    programming within the Symbian environment
  • There is also a potential problem that a program
    which is written for one version of Symbian may
    not run on another version or at least have
    unexpected effects.
  • This again needs to be considered if the program
    is for a specific device
  • C gives you low level access and high power
    program, but these are not always required

13
Languages C
  • C
  • In the event of developing for a smaller device
    which is resource limited
  • By the terms resource limited this is looking
    towards the embedded controllers and the sensors
  • Potentially these program could be created in
    assembler but this would add additional
    development time
  • Developing a small and very efficient program in
    a language like C is the best solution
  • The program would be powerful and have very
    limited effect on the actual device in terms of
    its requirements
  • Device such as the embedded controllers or the
    sensor networks the software will be written in
    C to produce efficient programs

14
Languages .NET
  • .NET
  • .NET is a programming environment
  • The advantage being you can use any programming
    language and the code is transferred into a
    intermediate language
  • Common Intermediate Language (CIL)
  • Where the virtual machine changes to machine code
    for the OS to operate
  • The code is then run on the Common Language
    Runtime (CLR)
  • This will also take responsibility for
    controlling the program and preventing it from
    taking too much memory dealing with exceptions
    and arrays
  • This gives the language similar advantages to
    Java in terms that you can write the software
    once and then in theory at least run it anywhere
  • There are now version of .NET for other OSs
    beyond Windows
  • Mono - http//www.mono-project.com/Main_Page
  • DotGNU - http//dotgnu.org/

15
Languages .NET Mobile
  • Within the Field of Mobile devices there is a
    specific version of .NET
  • Compact Framework
  • This version has a subset of the commands which
    are available to the desktop version
  • The commands are simply reduced to the ones which
    you would regularly require on a mobile device
  • The environment is written around being used on a
    Mobile for Windows OS no matter which version
  • It can be run on Palm, Symbian, blackberry with
    the use of the APPforge software, which provides
    the APIs to allow the .NET programs to run on
    non windows OSs
  • Unlike the normal .NET environment there are
    restrictions on the languages which can be used
  • C
  • Visual Basic
  • On top of the normal installation you can install
    emulators for most of the Windows based devices
    to give a more realistic environment to work
    within

16
Languages .NET Mobile
  • The advantage of .NET is the fact that
    development time is reduced
  • the Common Language Runtime has to be installed
    on the device.
  • If it is not this will usual happen when you
    first install the application
  • Development times for mobile applications no
    matter which version are heavily reduced
  • By using the IDE which users are already using,
    allows for knowledge transfer
  • As long as the CLR is installed this will mean
    that an application can be written once and run
    on any of the supporting OSs
  • Still considering though the issues around
    usability and differing hardware

17
Languages .NET MicroFramework
  • An additional consideration to use
  • Is the Microsoft MicroFramework
  • This is an additional environment considered for
    embedded applications
  • Suitable for small devices, where we would
    normally have to use C or assembler
  • The programming language is based on C
  • The MicroFramework will integrate into the
    hardware and you make your calls direct to it.
  • There is no need for a operating system
    interpreting the instructions
  • This gives a very small memory footprint the same
    as assembler, but with the advantages of managed
    code and easy to write languages
  • Roughly 300 Kbytes for the framework
  • MicroFramework is not a real-time language though
  • If you need this you need to use a different
    language and suitable operating system

18
Languages Java
  • Java is a very popular language within the field
    of mobile and wireless communications
  • The same way that .NET does Java will generate a
    intermediate language which is OS and device
    independent
  • It will compile into byte code which will
    interpreted by the Java Virtual Machine (JVM)
  • From here it will be converted to machine code
    for which ever machine it is being used on
  • Java is based on C and C
  • As with .NET Java is a very popular language so
    this does reduce the development times
  • The language is available freely where anyone can
    download it and use this language
  • http//java.sun.com/
  • There are also a large number of IDEs to help
    develop the software
  • Both commercial and freeware

19
Languages Java ME
  • The same issue as with .NET although we are using
    a similar language to the desktop environment
  • Most of the functionality is not required
  • The devices which these programs are intended for
    are limited in resources
  • The programs also need to just have the
    functionality which is needed
  • The cut down version of Java used to be called
    J2ME and is now called Java Micro Edition
    (Java-ME)
  • The essential functionality which is required is
    still retained in this version
  • Java-ME though is intended for more than just
    Mobile devices
  • It is intended to be used in any scenario where
    limited resources are an issue
  • Smart Cards
  • TV set-top boxes
  • Mobile phones

20
Languages Java ME
  • Support for the language is very widespread
  • Java ME is the language which is supported on the
    nearly platforms
  • Unlike .NET which is supported mostly on Windows
    for Mobile
  • With additional software for other OSs
  • Java ME is supported on nearly all of the new
    devices and all of the OSs
  • Due to a disagreement with Microsoft originally
    windows for mobile did not support Java ME but
    this has now been resolved
  • In addition beyond the normal oss i.e.
    Symbian, Palm, Windows
  • Propriety OSs as well usually support Java
  • This gives the developers a very large
    development base for any application which is
    developed
  • A recent example is the Motorola Razor

http//www.cellforcash.com/cellular-phone-informat
ion/images/motorola-razr-v3-clamshell.jpg
21
Languages Java ME
  • The software allows for the development of all
    types of applications on a device
  • Write Once Run Anywhere
  • These could be games with the graphic libraries
    through to business type applications.
  • There are two basic levels of configuration
  • Connected Device Configuration (CDC)
  • Portable device but with more resources
  • i.e. 2mb of memory at least
  • Connected Limited Device Configuration (CLDC)
  • Low power devices resource limited
  • Within these there are a number of profiles which
    then give or take away functionality as it would
    be needed for an item
  • With companies producing specific APIs for there
    own devices

22
Languages Labview
  • National Instruments Labview
  • This is a graphical real-time language which can
    be used to create programs
  • Although it can create business type programs it
    is more suited to data input/output programs
  • There is a mobile version of the software which
    will only work on the Microsoft Pocket PC and
    Windows Mobile environment at the moment
  • This may change though in the future with more
    OSs being supported

23
Getting your program out there!
  • Once you have created it the program needs to be
    distributed to the devices
  • Web
  • Transfer from your desktop
  • Own website
  • Specialist Website
  • There are now lots of these if you go to Google
  • Direct transfer from the development environment
  • We have used this in the tutorials this is
    reasonable for developments which are limited but
    if a lot of users need a program this would not
    be
  • Over the air file transfer
  • Moving the executables from the one device to the
    next one
  • Bluetooth
  • InfraRed
  • Cellular

24
Getting your program out there!
  • There is currently a very large potential for the
    money which could be made from mobile devices
  • As in the Smart Phones and the PDAs
  • The embed controllers and other resource limited
    devices the programs are quite specialised and
    would be created for a specific project
  • By only charging a small amount for a game or
    applications
  • This increases the chances of someone just trying
    that software!
  • If they only pay a few pounds and it sounds good
    is it worth buying a magazine at 4 to see a
    review of it?
  • This is a large potential market place
  • Although this market place can not be exactly
    predicted all of the analysts in the field are
    predicting this to make large amounts of money
  • This is mostly pushed towards the games markets
  • At the moment card and puzzle games are the most
    popular (http//www.theregister.co.uk/2007/02/12/3
    g_games_just_for_fun/)
  • Beyond the games though there are specialist
    applications to help users
  • The market is really quite open for anyone to
    develop an application and market it
  • Prediction of a value of 3.5 Billion by 2010
    (http//www.cio-weblog.com/50226711/mobile_enterpr
    ise_application_market_will_reach_35_billion_by_20
    10_idc.php)

25
Mobile Applications
  • The market place and requirements for people who
    know what they are doing in this field will
    increase
  • Large numbers of companies are now moving across
    to providing mobile phones / PDAs for users
  • The next step is to provide data services to
    these devices to allow them to remain connected
    to the office for longer
  • This could be business people but also
  • Consider emergency services, normal people on the
    street wanting information or access to data
  • The wireless enabled heating system !
  • Simply put the market is not restricted
  • No one has come up with the killer application
    for mobile devices yet
  • There will probably never be one application.
  • Instead it will be a suite of software and like
    the desktop PC that each device can be customised
    exactly how YOU want it will be the Killer
    application

26
Conclusion
  • Looked at
  • Considerations for developments
  • Languages availble
  • How to distribute your application
Write a Comment
User Comments (0)
About PowerShow.com