Pra que usar a Mobile Sensor API..

Boa tarde..

Aqui no blog a gente já falou algumas vezes sobre a Mobile Sensor API, um pacote opcional presente na Java ME - MIDP, que permite a recuperação de dados de sensores internos ou externos ao aparelho celular. Bem, infelizmente esta API não está presente em um número razoável de aparelho. Porém, pelo menos para o aparelho Nokia 3220’s Xpress-on™ Fun Shell, existe uma solução. Navegando pelas ondas da internet, encontrei o texto “Security settings required to access tilt sensor on the Nokia 3220 Xpress-on Fun Shell cover“.

Na sequência, deixo aqui o overview da matéria:
You can access the tilt sensor on the Nokia 3220’s Xpress-on™ Fun Shell cover by creating a DatagramConnection to the cover. Note that SecurityException is thrown if an additional permission is not used in the MIDlet’s JAD file. The MIDlet should be also signed to the Trusted 3rd Party Domain

E também, a description:
The DatagramConnection to the Fun Shell cover can be created as follows: “coverConnection = (DatagramConnection) Connector.open (”lcif://GAME/joystick/1.0″);”. To make this work, an additional permission needs to be added to the MIDlet’s JAD file: “javax.microedition.io.Connector.lcif” and the MIDlet should be signed. Otherwise SecurityException is thrown.


Achei super interessante saber disso, apesar de não encontrar muitos Nokia 3220 no Brasil, mas aí já é outro problema.

Att.
Ping

Envie seu comentário

Nome (required)

E-mail (não será publicado) (required)

Site

Commentário