Rajapintatoteutus visuaaliselle lisäinformaatio-ominaisuudelle
Salmenautio, Nikolas (2024)
Salmenautio, Nikolas
2024
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2024110727577
https://urn.fi/URN:NBN:fi:amk-2024110727577
Tiivistelmä
Opinnäytetyön tavoitteena oli luoda rajapinta, jonka kautta laitekohtainen lisäinformaatio-ominaisuus saataisiin laajempaan käyttöön. Rajapinnan tarkoitus on olla helppokäyttöinen, jotta ominaisuus saadaan tulevaisuudessa osaksi muita sovelluskokonaisuuksia. Lisäksi luotiin web-sovellus, jota käytettiin rajapinnan testaamiseen.
Rajapinnan pohjana käytettiin Androidin taustapalveluominaisuutta. Palvelun sisällä käytettiin NanoHTTPD-kirjastoa, joka vastaa pyynnöistä rajapintaan. Laitekohtaisen ominaisuuden käyttö suunniteltiin sekä toteutettiin kahdella eri lähestymistavalla. Palvelun jatkuva toiminta varmistettiin kuuntelemalla käyttöjärjestelmän viestejä uudelleenkäynnistymisen varalta. Androidin toiminta sekä arkkitehtuuri olivat monin tavoin keskiössä opinnäytetyössä.
Työn tuloksena oli toimiva rajapinta. Rajapinnan toiminta on jatkuvaa, ja sen kautta laitekohtaisen ominaisuuden käyttäminen on kontrolloitua. Rajapinnan käyttöönotto toimintaympäristössä osoittautui haastavaksi. Pääongelma oli Android-käyttöjärjestelmän vaikea etäohjattavuus. Tämä ongelma olisi syytä ratkaista tulevaisuudessa. The aim of the thesis was to create an application programming interface through which a device-specific additional information feature would be made more widely available. The purpose of the interface is to be easily accessible so that the feature can be integrated into other application solutions in the future. In addition, a web application was created that was used to test the interface.
The interface was based on the Android service feature. The NanoHTTPD library was used within the service, which responds to requests to the interface. The use of the device-specific feature was planned and implemented using two different approaches. The continuous operation of the service was ensured by listening to messages from the operating system in case of a restart. The operation and architecture of Android were in many ways at the center of the thesis.
The result of the work was a functional interface. The operation of the interface is continuous, and through it the use of the device-specific feature is controlled. Implementing the interface in the operating environment proved to be challenging. The main problem was the difficult remote controllability of the Android operating system. This problem should be solved in the future.
Rajapinnan pohjana käytettiin Androidin taustapalveluominaisuutta. Palvelun sisällä käytettiin NanoHTTPD-kirjastoa, joka vastaa pyynnöistä rajapintaan. Laitekohtaisen ominaisuuden käyttö suunniteltiin sekä toteutettiin kahdella eri lähestymistavalla. Palvelun jatkuva toiminta varmistettiin kuuntelemalla käyttöjärjestelmän viestejä uudelleenkäynnistymisen varalta. Androidin toiminta sekä arkkitehtuuri olivat monin tavoin keskiössä opinnäytetyössä.
Työn tuloksena oli toimiva rajapinta. Rajapinnan toiminta on jatkuvaa, ja sen kautta laitekohtaisen ominaisuuden käyttäminen on kontrolloitua. Rajapinnan käyttöönotto toimintaympäristössä osoittautui haastavaksi. Pääongelma oli Android-käyttöjärjestelmän vaikea etäohjattavuus. Tämä ongelma olisi syytä ratkaista tulevaisuudessa.
The interface was based on the Android service feature. The NanoHTTPD library was used within the service, which responds to requests to the interface. The use of the device-specific feature was planned and implemented using two different approaches. The continuous operation of the service was ensured by listening to messages from the operating system in case of a restart. The operation and architecture of Android were in many ways at the center of the thesis.
The result of the work was a functional interface. The operation of the interface is continuous, and through it the use of the device-specific feature is controlled. Implementing the interface in the operating environment proved to be challenging. The main problem was the difficult remote controllability of the Android operating system. This problem should be solved in the future.