0
hie私はjde 4.5を使用しています。私のアプリを通してカメラを使いたいです。 私はコードを書いて、ランタイムexcepetionを得る非イベントスレッドによってcaaled Pushmodelscreen それの問題を教えてください?カメラの起動に問題がありますか?
ます。public voidスタートカメラ()
{
try {
// Create a player for the Blackberry's camera
Player player= Manager.createPlayer("capture://video");
// Set the player to the REALIZED state (see Player javadoc)
player.realize();
// Grab the video control and set it to the current display
_videoControl = (VideoControl)player.getControl("VideoControl");
if (_videoControl != null)
{
// Create the video field as a GUI primitive (as opposed to a
// direct video, which can only be used on platforms with
// LCDUI support.)
_videoField = (Field) _videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
_videoControl.setDisplayFullScreen(true);
_videoControl.setVisible(true);
}
player.start();
if(_videoField!=null)
{
add(_videoField);
}
}キャッチ(例外e){// TODO :扱う例外 Dialog.alert(e.getMessage());
アミット
「イベントなしスレッドによるプッシュモデムスクリーン」 このエラーは、通常、画面をプッシュする前にポップアップ画面または「Dialog.alert」を表示する必要がある場合に発生します。 – Prasham