游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

Developer分析Android新平台Honeycomb的优点和缺点

发布时间:2011-04-28 16:45:27 Tags:,

数周前,开发者曾预览了下个Android平台——Honeycomb(游戏邦注:即Android 3.0)。1个月后,Honeycomb SDK最终版本发布,随后首款Android 3.0设备摩托罗拉Xoom平板电脑面世。Developer.com研究了SDK、新工具和新设备,并对该平台的更新和改变发表看法,以下是游戏邦编译的相关内容。Developer.com在本文中同时顾及供用户和开发者使用的功能,但还是以开发者的角度来分析探讨。

Android 3.0的特色和API让人感到兴奋

Android 3.0包含了许多新特色和API,对有些内容我们感到特别兴奋和激动,因为他们的加入再次拓宽了可运行于平台上的应用类型。

Android Fragments

Fragment API让开发者更为简便地制作动态用户界面,更有效地使用屏幕实际使用面积。尽管最初主要将其当成平板电脑API,但Fragment API可用于简化所有用户界面的设计,在不同方向模式和屏幕尺寸间共享更多代码和布局,使之成为面向各种设备类型的必要API。

Android Honeycomb Logo

Android Loaders

下载显示于活动(游戏邦注:即“Activity”,是最基本的模块,在应用中每个单独的屏幕都是一个“活动”。)中的数据并且在配置改变时调控数据获取过程,这是所有开发者都必须处理的普遍问题。Honeycomb引进Loaders概念来解决这个难点,这种特别的新型Loader API可异步处理数据的重新获取,自动连接至之前的数据,因而开发者便无需再次访问。希望此API能够改善普通数据密集型屏幕的性能。

Android Action Bar

Google去年在Google I/O 2010大会上介绍过Action Bars概念。许多Android旗舰程序接受了该想法,将这种新用户界面样式运用到开发中。但现在Action Bar想法已融入平台中并呈现出许多新功能,包括下拉菜单、立时进入选择菜单和标签管理。希望能在程序中看到更多恰当使用Action Bar的简易一致的导航。

RenderScript

RenderScript系统将为C语言编辑图像和计算代码提供新方法,使之可在本地CPU或GPU上执行,增加不同CPU和GPU类型的兼容性。这个系统让人想起OpenCL或CUDA,在上述性能中关键的计算可能在GPU硬件上运行而加速则由CPU完成。尽管此计算能力通常用于图像设计和游戏的背景中,但也可以用于其它有趣的目的。

Android 3.0工具升级

Android 3.0发布后,许多工具得到升级。Graphical Layout设计器再次得到极大的改善,现在可以更为精确地显示布局在多种Android设备、屏幕和SDK版本上的预览。拖动部件并将他们准确放置也更加简单,无需采用XML编辑。然而它并非毫无瑕疵,开发者需要在XML中频繁调整用户界面控制。模拟器组件也得到提升,新增快照特色。快照让模拟器以开启状态存储,使用时重新加载即可,将启动时间缩短到几秒钟而不是数分钟。

摩托罗拉Xoom平板电脑

供Android Backward Compatibility使用的静态库

看到这里,或许大家会认为,这些特色都很不错,但如何在现有非Honeycomb系统设备上使用呢?幸运的是,Android开发团队刚刚发布了包含某些Honeycomb最受欢迎特色的静态库,这些内容可以用在Android 1.6至Android 2.3.3系统的应用上。现在,这个库中主要包含的两大特色是Fragment API和Loader API。就个人而言,Developer.com编辑希望Action Bar也能够公之于众。但是,Android团队发布此等静态库的潜台词值得赞赏,他们暗指现有版本甚至老版本Android系统及其用户并未被遗忘。

Honeycomb的些许不足之处

Honeycomb并不完美,给Android SDK带来的某些改变不受开发者欢迎。大家都想知道为什么这样改,改得比原来更差。

Honeycomb SDK的模拟器性能

Android模拟器性能从未好过,而且模拟器屏幕分辨率的增加使其显得更为突出。Honeycomb SDK中模拟器分辨率高达1280×800,最终的结果却是即便开发者使用相对高速的开发电脑,模拟器性能也只能好到查看某款应用程序的外观,审查运行情况根本无从谈起。而且即便只是观看应用程序的外观,也会面临许多问题。开发者根本没有如此耐心去等待这种让人放慢速度的工具,目前只好用真正的设备来调试应用。Android团队发现这个问题,声称会对其加以处理,Developer.com希望他们能够尽快改善模拟器的性能。

专用按键丢失

数年来,开发者和用户习惯甚至喜欢所有Android设备上都有的4个主要专用按键:后退、上下文菜单(游戏邦注:类似于PC上的右键菜单。)、搜索和桌面,现在这些都消失了。后退和桌面已被屏幕上的按键所取代。虽然底栏有个用于现有应用的上下文按钮,但上下文菜单也正渐渐被Action Bar菜单取代。搜索按钮也不见了,现在Action Bar上将显示搜索选项。这些变动会让用户界面设计想法发生改变。

尽管有辩解称从长远角度来看,这些改革属于进步,而且现在的设备或屏幕改变对按键并没有影响,但开发者和用户确实需要时间适应这种改变。因为现有设备上仍然存在上述按键,所以开发者随后可能还需要处理硬件和软件的冲突问题。

android-market

android-market

Android 3.0所失去的功能和应用

尽管研发团队做出承诺,但外界从未抱希望能看到完美的前向兼容性。(游戏邦注:Android开发者博客中写道:“虽然未配备最新软件系统的设备无法运行某些最新的应用,但Android拥有100%的前向兼容性,即为老版本系统编写的应用可以在最新版本系统上运行。”)而且,某些功能色不再出现于平台或核心应用上。比如,Android Market不再提供评论应用的途径。难道那些想得到评论的开发者要让他们的用户使用电脑登录Android Market吗?这难道不是开发团队的疏忽吗?

某些平台上的用户特色也发生改变。用户不能再创建文件夹来放置应用,在线文件夹不受此影响。为什么要取消这个功能呢?对用户来说,本地文件夹可以让我们更方便地使用程序,而开发者希望应用能够更贴近用户。用户失去了某些功能却没有看到增加类似新功能,此类改变让人们充满疑问,没有出问题为什么要改呢?

Android成长的烦恼

对Honeycomb的某些升级,即便Google自有应用也无法适应,比如Google Voice便无法正常使用,在Honeycomb设备的市场上也看不到这款应用了。有报告指出,那些尝试从侧面加载它的人发现软件运行失败。如果连Google自己的应用在不经修改的前提下都无法在新系统上正常使用,那么平台的前向兼容性便无从谈起。开发者也会怀疑并对平台的稳定性表示担忧,因为上述实例是否意味着其他应用也将崩溃呢?平台的不稳定性对用户和开发者来说都不利,尤其当它引起消极媒体的关注时。这会让人们认为,Honeycomb和Xoom匆忙面世仅仅是为了摆脱激烈竞争的困境吗?

Google Voice

Honeycomb能否支持小型手机

将来是否会出现基于Honeycomb的小屏幕设备,此类报道铺天盖地。最初看来还有些许可能性,但现在想来应该不会出现这种状况。少数Honeycomb功能通过静态库已经可以在手机上使用,小屏幕硬件面世时很可能已经又衍生出新系统,它们将从Android 2.3.3直接跳到Android冰淇淋三明治。(游戏邦注:此处为作者的调侃,“Honeycomb”原意为蜂窝,作者猜想下个系统可能称为Android冰淇淋三明治。)

总结

总而言之,Honeycomb上有许多令人振奋的新特色和功能,从各个方面改善平台的状况。当然,开发者、应用发布者和用户都需要时日调整以适应这些改变。并非所有人都喜欢或欣赏此类变革,但从长期来看,这些改变将确保Android在未来取得成功。系统将不断蚕食手机业市场份额,团队也会制作出其他引人关注且富有竞争力的平台。(本文为游戏邦/gamerboom.com编译,转载请注明来源:游戏邦)

Android 3.0 Honeycomb SDK: The Good, the Bad and the Missing

Several weeks ago, developers were treated to an early preview of the next Android platform: Honeycomb (Android 3.0). Almost a month later, the final Honeycomb SDK was released, followed by the first commercial Android 3.0 device: the Motorola Xoom tablet. We’ve had some time to look at the SDK, new tools, and the new device. Here are our first impressions of the platform updates and changes. We’ll cover user and developer items alike, but as always from the developer’s point of view.

Android 3.0 Features and APIs That Excited Us

Android 3.0 provides a variety of new features and APIs. We’re particularly excited about many of these, as their addition further expands the types of applications that are feasible on the platform.

Android Fragments

The Fragment API makes it far easier for developers to create dynamic user interfaces and use screen real estate more effectively. Although initially considered primarily a “tablet API,” the Fragment API can be used with all user interfaces to simplify design and share more code and layouts between different orientations and screen sizes, making it an essential API to use when targeting various device types.

Android Loaders

A common problem developers have to deal with is downloading data for display within an Activity and then managing this data acquisition process when the configuration changes. Honeycomb introduced the concept of Loaders to solve this problem. By handling the retrieval of data asynchronously and automatically reconnecting to the data to avoid querying it again, we can expect the special new Loader API to improve the performance of the average data intensive screen.

Android Action Bar

Google introduced the notion of Action Bars last year at Google I/O 2010. Several flagship Android applications incorporated the Action Bar concept, providing real world examples of this new user interface paradigm. Now, however, the Action Bar concept is built into the platform and have several new features, including drop-down menus , instant access to option menu items, and tab management. Look for more consistent and easier navigation in applications that use the Action Bar well.

RenderScript

RenderScript is a system that promises to provide a means of writing graphics and computational code in the C programming language and having it execute either on the native CPU or GPU, allowing for increased compatibility across multiple CPU and GPU types. This system reminds us of OpenCL or CUDA, in that performance critical computations may run on the GPU hardware and receive acceleration beyond what can be accomplished by the CPU. Although usually used in the context of graphics programming and games, the computational abilities could allow for other interesting uses.

Android 3.0 Tool Updates

Several tools were updated around the release of Android 3.0. The Graphical Layout designer has, once again, improved by leaps and bounds. It now shows a much more accurate preview of what a layout will look like on multiple Android devices, screens and SDK versions. It’s also easier to drag widgets over and place them accurately without resorting to XML editing. Still, it’s not perfect and we find ourselves in XML frequently to fine-tune user interface controls. The emulator has received an improvement in the form of the snapshots feature. Snapshots allow the state of the emulator to be stored upon exit and later reloaded, cutting the startup time down to just a few seconds from what was often a several minute boot cycle.

Static Libraries for Android Backward Compatibility

Perhaps right now you’re thinking: This is all great, but I need some of these features now, with existing devices that aren’t running Honeycomb. Well, you’re in luck! The Android team has just released a static library that contains some of the most sought-after Honeycomb features, making these features available for applications targeting Android 1.6 through Android 2.3.3. Right now, the primary two features this library encompasses include the Fragment API and the Loader API. Personally, we wish the Action Bar had been included from the start, too. However, the statement the Android team is implicitly making with this release is great. There’s an implicit dedication to existing versions of Android — even old ones. They — and their users — are not being left in the dust.

A Few Honeycomb Disappointments

As sweet as Honeycomb is, it’s not perfect. There are some changes to the Android SDK that we don’t particularly like and wonder why they changed — for the worse.

Honeycomb SDK Emulator Performance

The emulator performance for Android has never been particularly good. This is especially true as screen resolutions of the emulator have increased. With the Honeycomb SDK, we now see emulator resolutions as high as 1280×800. The end result is that even on our relatively speedy development machines, the emulator performance is only barely good enough to see what an app will look like, but not how it will likely behave. Even seeing how the application will appear takes some patience. We’re developers, we don’t have a lot of patience for tools that slow us down. Right now, we have resorted to primarily debugging our apps on the physical device. The Android team recognizes this problem and claims to be working on this issue. We wish them speed in improving the emulator performance.

Lost Dedicated Buttons

For years now, developers and users alike have gotten used to and even enjoyed the functionality of the four primary dedicated buttons found on all Android devices: Back, Context Menu, Search, and Home. These are gone now. Back and Home have been replaced by on screen buttons. The Context Menu is being replaced by an Action Bar menu, although there is a context button that appears on the bottom bar for existing applications. The Search button is also gone; search will now normally be found on the Action Bar. This is quite a shakeup from a user interface design perspective.

While these changes are arguably improvements for the long term — after all, the buttons will now be in the same place regardless of the device or screen orientation, these changes necessitate some retraining of developers and users alike. And since all of the existing devices still have those buttons, we also have a case of both hardware and software fragmentation that developers will have to deal with for some time to come.

Missing Android 3.0 Features and Apps

We’ve never expected perfect forward compatibility, despite the fact that it was promised. (See the Android Developer’s Blog, “While it’s true that devices without the latest software can’t run some of the latest apps, Android is 100% forward compatible — apps written properly for older versions also run on the newest versions.”) We can’t help but notice when features are no longer present at the platform level or at the “core” application level. For instance, new changes to the Android Market no longer provide a way to review apps. Are developers who ask for reviews supposed to send their users to the online Android Market? Was this just an oversight?

Some platform user features have also changed. Users can no longer create folders to hold applications as an organizational method. Live folders can still be created. Where did this feature go? As users, we relied on it to have apps closer at hand. As developers, we want my apps to be closer to the user. These types of changes — where we lose features but no comparable features are added instead — lead us to question, “Why fix it if it isn’t broken?”

Growing Pains for Android

Even Google’s own applications aren’t immune to some upgrade issues with regard to Honeycomb: for example, Google Voice no longer works. Google Voice is not present on the market for Honeycomb devices. Reports show that those who try to side-load it find that it crashes. If Google’s own apps don’t work without modifications, then the argument that the platform is truly forwards compatible doesn’t hold water, and leads to doubt and developer anxiety over the stability of the platform. Does this mean my apps will crash, too? Platform instability is not good for users or developers, especially when it attracts negative media attention. It makes us wonder: Was Honeycomb — and the Xoom — rushed to the market simply to get out there before the competition?

Honeycomb Supports Phones… or Not.

Reports have been all over the board on whether or not there will be smaller screen devices (aka phones) based upon Honeycomb. Initially, it seemed like there might have been a split in the operating systems but thankfully, this doesn’t seem to be the case. With many of the Honeycomb features already available on phones via the static library, it’s very possible that the next platform version will simply be available before the smaller screen hardware comes out and phones will skip from Android 2.3.3 to Android Ice Cream Sandwich (nom, nom).

Conclusion

All in all, Honeycomb delivers quite a lot of exciting new features and generally improves the platform in a variety of ways. Yes, with these improvements come changes, and developers, application publishers, and users alike are going to need some time to adjust. Not everyone likes or appreciates change, but in the long run, these changes help ensure the future success of Android as it continues to eat up market share and make the other competing platforms sit up and pay attention. (Source: Developer)


上一篇:

下一篇: