Institute of Computer Science
  1. Courses
  2. 2018/19 fall
  3. Mobile Application Development (MTAT.03.262)
ET
Log in

Mobile Application Development 2018/19 fall

  • 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

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment