简体   繁体   English

使用SDK开发手机(Java)还是不开发?

[英]Develop on mobile phones(Java), using SDK or not?

Recently I have to develop on mobile phones using Java and I am planning to do the development on the following brands: 最近我必须使用Java开发手机,我计划在以下品牌上进行开发:

Nokia 诺基亚

Samsung 三星

SonyEricsson 索尼爱立信

Motorola 摩托罗拉

LG LG

I've browsed the "developer site" of each company and looks like they all have provided their own SDKs for J2ME development. 我浏览了每家公司的“开发者网站”,看起来他们都为J2ME开发提供了自己的SDK。

I am really new to this field and I have a few questions: 我对这个领域很陌生,我有几个问题:

  1. Since they all support Java platform, why do we need additional Java SDKs? 由于它们都支持Java平台,为什么我们需要额外的Java SDK?

  2. What can I benefit from the SDKs? 我可以从SDK中受益匪浅?

  3. What determines whether I should use the SDKs or not? 是什么决定我是否应该使用SDK?

It all depends on how complex the application your want to develop will be. 这一切都取决于您希望开发的应用程序的复杂程度。

Developing a basic application to run on that many different handsets is doable but complexity will increase exponentially with each advanced feature you add, especially if you want to target existing, old and upcoming devices. 开发一个基本应用程序以在许多不同的手机上运行是可行的,但复杂性将随着您添加的每个高级功能呈指数级增长,特别是如果您想要定位现有的,旧的和即将推出的设备。

What you also need to consider is that each manufacturer can support several operating systems and platforms. 您还需要考虑的是,每个制造商都可以支持多种操作系统和平台。

Nokia has Series40 (3rd and 5th editions), Series60 (2nd, 3rd and 5th editions), Series80. 诺基亚拥有Seri​​es40(第3和第5版),Series60(第2版,第3版和第5版),Series80。

Samsung has at least 2 major versions of their own platform and the last 2 editions of Series60 三星拥有自己平台的至少2个主要版本和Series60的最后2个版本

SonyEricsson has 3 major versions of their JP8 platform (and JP7 too), Series60 5th edition, UIQ 2.x and UIQ 3.x SonyEricsson有他们的JP8平台的3个主要版本(以及JP7),Series60第5版,UIQ 2.x和UIQ 3.x

Series80, Series60, UIQ 2.x and UIQ 3.x are based on the Symbian operating system. Series80,Series60,UIQ 2.x和UIQ 3.x基于Symbian操作系统。 Different versions of Symbian OS have used different JVMs and several companies have contributed JSR implementations. 不同版本的Symbian OS使用了不同的JVM,并且有几家公司提供了JSR实现。

Motorola has at least 2 major versions of their own platform and a couple UIQ devices 摩托罗拉至少有两个主要版本的自己的平台和几个UIQ设备

1 - Since they all support Java platform, why do we need additional Java SDKs? 1 - 由于它们都支持Java平台,为什么我们需要额外的Java SDK?

The major problem of J2ME is fragmentation. J2ME的主要问题是碎片化。 For a variety of reasons (both good and bad, both technical and commercial), the Java promise of "Write Once, Run Anywhere" is largely considered utterly unfulfilled in the mobile industry. 出于各种原因(无论是好的还是坏的,无论是技术还是商业),“一次编写,随处运行”的Java承诺在移动行业中被认为完全没有实现。

Many functionalities need to be coded in a platform-specific way if you want the same code to work on many platforms at once. 如果您希望同一代码同时在许多平台上运行,则需要以特定于平台的方式对许多功能进行编码。

Many J2ME platforms also add non-standard APIs, properties, configurations, "bugs"... 许多J2ME平台还添加了非标准的API,属性,配置,“bug”......

Most importantly, manufacturer SDKs are supposed to allow things like on-device debugging or MIDlet deployment over USB. 最重要的是,制造商SDK应该允许通过USB进行设备上调试或MIDlet部署。 They provide basic or extended tools that help on-device testing because that is an area where a generic WTK should typically be lacking. 它们提供了基本或扩展的工具,可以帮助进行设备上的测试,因为这是一个通常缺乏通用WTK的领域。

2 - What can I benefit from the SDKs? 2 - 我可以从SDK中获益吗?

Very probably, yes. 很可能,是的。 Ok, so, most of them will only run on a Windows desktop computer but the SDKs themselves should be free. 好的,所以,它们中的大多数只能在Windows桌面计算机上运行,​​但SDK本身应该是免费的。

3 - What determines whether I should use the SDKs or not? 3 - 是什么决定我是否应该使用SDK?

Start with the WTK. 从WTK开始。 When you realize you're trying to do something that is specific to the handset manufacturer, get the corresponding SDK. 当您意识到您正在尝试执行特定于手机制造商的操作时,请获取相应的SDK。

One example: The WTK PDAPDemo sample application contains a rudimentary filesystem browser. 一个示例:WTK PDAPDemo示例应用程序包含一个基本的文件系统浏览器。 It displays widely different results on different platforms. 它在不同平台上显示出截然不同的结果。

As suggested by Pavel Alexeev, DeviceAnywhere is a great tool, assuming you have a proper test budget. 正如Pavel Alexeev所建议的那样,DeviceAnywhere是一个很好的工具,假设你有一个合适的测试预算。 Nokia also offers something similar but that is obviously limited to Nokia handsets. 诺基亚也提供类似的东西,但显然仅限于诺基亚手机。

Benefit from vendor-specific SDKs is only if you want to use vendor-specific APIs. 只有在您希望使用特定于供应商的API时,才能从特定于供应商的SDK中获益。 In most cases Sun WTK would be enough. 在大多数情况下,Sun WTK就足够了。

As for testing purposes, I would not suggest to rely on emulators. 至于测试目的,我不建议依赖仿真器。 You better try on-device testing. 您最好尝试在设备上进行测试。 Nokia and Samsung provide remove device access for recent devices. 诺基亚和三星为最新设备提供移除设备访问权限。 And you can also try deviceanywhere . 你也可以尝试设备

I would do most of my development with the regular old Sun..err...Oracle Java WTK, and then if you need to do some testing, get the emulators/SDK's from those companies. 我会使用常规的旧版本... Oracle Java WTK进行大部分开发,然后如果您需要进行一些测试,请从这些公司获取模拟器/ SDK。 Other than that I'd mostly avoid them though. 除此之外,我主要是避开它们。

Built in camera functionality typically differs between different brands of phone and the API's provided can be very helpful when trying to do anything more advanced than take a simple snapshot. 内置摄像头功能通常在不同品牌的手机之间有所不同,并且在尝试执行比拍摄简单快照更高级的任何操作时,提供的API非常有用。 SonyEricsson phones for example will allow you to display a camera feed through a VideoCamera directly to a canvas which is very fast but does not not allow you to control how frequently the feed is drawn to the screen. 例如,SonyEricsson手机将允许您通过VideoCamera将摄像机直接显示到画布,该画布速度非常快,但不允许您控制馈送到屏幕的频率。 In order to draw graphics on top of the video feed without excessive flickering you need to add the OVERLAY flag (1<<8) to the VideoCamera's initDisplayMode() call, not all brands support the additional flag. 为了在视频源之上绘制图形而不会过度闪烁,您需要将OVERLAY标志(1 << 8)添加到VideoCamera的initDisplayMode()调用中,并非所有品牌都支持附加标志。

For .NET guys - there is a Ubiq Mobile framework . 对于.NET人员 - 有一个Ubiq Mobile框架 Ubiq Mobile apps work on Android, iOS, Windows Phone and Java-based phones and tablets . Ubiq Mobile应用程序适用于Android,iOS,Windows Phone 和基于Java的手机和平板电脑 This is rapid cross-platform development with .NET with cloud-based architecture. 这是.NET与基于云的架构的快速跨平台开发。 Getting started article: How to create simple UbiqMobile application with video . 入门文章: 如何使用视频 创建简单的UbiqMobile应用程序

My opinion is "QuickRecipesOnSymbianOS" is correct. 我的观点是“QuickRecipesOnSymbianOS”是正确的。 It is very easy, simple and technical answer. 这是非常简单,简单和技术的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM