What’s new for shortcuts and widgets in Android O

(Last Updated On: 2017-09-19)

Why use shortcuts and widgets?

One of our favorite features in Android O is the ability to pin shortcuts and widgets for your app onto the launcher through deep linking.
可以通过deep linking将应用的快捷方式和小部件固定到桌面上是Android O上最受欢迎的特性功能之一

Shortcuts let users quickly start a specific task, while widgets give users instant access to specific actions and information from your app. Users want to get things done, and get things done fast – shortcuts and widgets are a way to help them and to increase user engagement with your content.

To pin a shortcut or widget, users long press your app’s icon for options and drag and drop the selected item to a location of their choice.

Dynamic / static shortcuts
Pinned shortcuts

Adding shortcuts and widgets from within your app


The API has a new flow for adding shortcuts and widgets from within your app. The new method uses a modal dialog, deprecating the old method of using a broadcast, which will not work on O devices.
新的API将通过新的流程来添加快捷方式和小部件到你的app,新的方式将使用一个对话框来实现,弃用了以往使用广播的方式,意味在Android O的设备上将不能使用广播来添加。


That’s not all. We’ve made improvements to the user interface and experience. In the old experience, there was no app icon on the shortcut, so users had no idea which app the shortcut was from. Marking shortcuts with the app icon provides better branding while protecting users from potential malware.
还有就是,我们改进了用户界面和体验。 在以往的体验中,快捷方式上没有应用程序图标,因此用户不知道快捷方式是哪个应用程序。 使用应用图标标记快捷方式可以提供更好的识别,同时保护用户免受潜在的恶意软件攻击。

Old shortcut
New shortcut

There is also a new option to add a specialized activity to help users create shortcuts. The activity is complete with custom options and confirmation.
还可以通过一个新选项来添加专门的activity来帮助用户创建快捷方式。 该activity包含了自定义选项和确认。

With these new additions and improvements, users will be more likely to use your shortcuts and widgets, leading to more meaningful and impactful engagement with your app and happier, more productive users.


To learn more, head over to the shortcuts and widgets page on the Android Developers website.


邮箱地址不会被公开。 必填项已用*标注

解决 : *
18 − 11 =