gpt4 book ai didi

video - 在 j2me 开发中是否可以调用 native 播放器并播放视频?

转载 作者:行者123 更新时间:2023-11-28 21:41:43 24 4
gpt4 key购买 nike

我想为我的应用程序调用/打开 native 播放器。我必须打开 native 视频播放器并使用该视频播放器播放我的视频。所以请告诉我是否可以这样做?如果可能的话,我必须使用哪个代码片段。有一件事是我在 j2me 中而不是在 Qt SDK 中开发我的应用程序。

最佳答案

MIDlet 类有一个名为 platformRequest() 的方法,但不能保证它在许多设备上都能正常工作,其中 URL 是参数。例如打开带参数URL的原生浏览器,就是真正的绝对URL,如“http://stackoverflow.com”

 public void openBrowser(String URL) {
try {
mainMIDlet.platformRequest(URL);
} catch (ConnectionNotFoundException e) {
// error
}
}

If the URL specified is of the form tel:+558112345678, as specified in RFC2806, then the platform MUST interpret this as a request to initiate a voice call.

Devices MAY choose to support additional URL schemes beyond the requirements listed above.

更多信息请参阅 API JSR 118: http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html

提示

使用方法 getAppProperty(MIDlet 类)或(System 类):

public final String getAppProperty(String key)

发现 URL(参数)的值,例如:

String platform = System.getProperty("microedition.platform");

请记住,每个制造商都有不同类型的特定参数和组合。

关于video - 在 j2me 开发中是否可以调用 native 播放器并播放视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10007965/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com