Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 17:29, 24 October 2007.

Como tocar um beep no MIDP 1.0 sem o uso de API adicional

From Forum Nokia Wiki

Original: How to play a beep in MIDP 1.0 without other API

Se você está desenvolvimento aplicações em MIDP 1.0 para aparelhos mais antigos, você não tem acesso a APIs adicionais (como Nokia UI API e MMAPI), você não tem acesso a nenhuma opção de multimídia.

Mas, com este truque, você pode tentar 'alertar' (usando um 'beep') o usuário. Você não tem controle de como o 'beep' funcionará, ou se o 'beep' funcionará. Mas, você pode tentar fazer isso, pois é 100% MIPD 1.0 compatível.

O truque é usar a class AlertType para chamar o som que a UI do aparelho usa quando chama um alerta do mesmo tipo, por exemplo, quando ocorre um erro.

Assim, o código é:

AlertType.ERROR.playSound(Display.getDisplay(this));
Related Discussions
Thread Thread Starter Forum Replies Last Post
Starting a MIDlet from another MIDlet derdasser Mobile Java General 3 2004-09-15 19:10
How to set Light n vibarate for nokia 6600 ?? stp_chen Mobile Java General 6 2005-09-22 14:50
Nokia UI vs MIDP 2.0 elomar Mobile Java General 1 2003-03-24 10:03
Record sound and playback dakz Mobile Java Media (Graphics & Sounds) 20 2008-06-26 10:29
Filling an Image with transparent pixels? skelleher Mobile Java Media (Graphics & Sounds) 10 2003-07-23 22:17
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX