Arvutiteaduse instituut
  1. Kursused
  2. 2018/19 sügis
  3. Mobiilirakenduste loomine (MTAT.03.262)
EN
Logi sisse

Mobiilirakenduste loomine 2018/19 sügis

  • Main
  • Lectures
  • Homeworks & Home Assignments
  • Projects
  • Links
  • Task submission

Homework 5 - Mobile Web Services

Create an application that can both act as a mobile sensor host and discover other hosts.

Server-side

  • When the application starts, a CoAP server should be started and advertised using mDNS (1 pt)
    • Advertise using a fixed service name, e.g. sensor_service
  • The CoAP server should provide 2 resources (value updated every time the real value changes):
    • The device's battery level (1 pt)
    • The device's GPS location (1 pt)
    • Tip: You can use the setValue() method of BasicCoapResource to update the returned value.

Client-side

  • Clicking a button will initiate mDNS service discovery (1 pt)
  • If discovery resolves a service with the fixed name, it should do the following (1 pt):
    • Send CoAP requests to both of the above CoAP resources and display the returned values on the screen.
    • Stop service discovery so it can be started again later using the button

Optional: try discovering the server of your friend's phone! It should work, as long as the devices are on the same network and the server's port is not blocked by the firewall. In eduroam/ut-public you may run into problems due to firewalls and addressing, easiest option is to use the phone's hotspot

  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused