【Using English】41 - Core App Quality of Android

This blog is the Chinese translation of Google doc Core app quality;

Android users expect high-quality apps. App quality directly influences the long-term success of your app—in terms of installs, user rating and reviews, engagement, and user retention.

Android用户期待高质量的应用。应用的质量直接影响到您的应用是否能取得长期成功,包括安装,用户评分和评价,用户参与度与用户留存率。

This page helps you assess the core aspects of quality in your app, through a compact set of quality criteria and associated tests. All Android apps should meet these criteria.

通过一套简明的质量标准和相关测试,这个页面可以帮助你评估应用质量最核心的方面,所有的Android应用都应该符合这些标准。

Before publishing your apps, test them against these criteria to ensure that they function well on many devices, meets Android standards for navigation and design, and are prepared for promotional opportunities in the Google Play store. Your testing will go well beyond what's described here—the purpose of this document is to specify the essential quality characteristics all apps should display, so that you can cover them in your test plans.

发布应用之前,用过这些标准来测试您的应用,以确保应用功能可以正常运行在多个设备上,确保应用符合Android导航和设计标准,同时为在谷歌Play商店推广做好准备。您的测试范围大可以超过这里的内容,因为本文档的目的是所有应用都应该具备的基本质量特征,因此您可以在测试计划中包括这些内容。

If you're creating apps for other Android devices, such as tablets or TV, there are additional quality guidelines you should consider.

如果您在为平板电报或者电视等其他Android设备开发应用,您需要考虑另外一份质量指南

Visual design and user interaction


视觉设计和用户交互

These criteria ensure that your app provides standard Android visual design and interaction patterns where appropriate, for a consistent and intuitive user experience.

这些标准可以确保您的应用程序提供了标准的Android视觉设计和适当的交互模式,以实现始终如一的直观用户体验。

Area ID Description Tests
Standard design UX-B1 The app follows Android Design guidelines and uses common UI patterns and icons:
1. The app does not redefine the expected function of a system icon (such as the Back button).
2. The app does not replace a system icon with a completely different icon if it triggers the standard UI behavior.
3. If the app provides a customized version of a standard system icon, the icon strongly resembles the system icon and triggers the standard system behavior.
4. The app does not redefine or misuse Android UI patterns, such that icons or behaviors could be misleading or confusing to users.
CR-all
Navigation UX-N1 The app supports standard system Back button navigation and does not make use of any custom, on-screen "Back button" prompts. CR-3
UX-N2 All dialogs are dismissible using the Back button. CR-3
UX-N3 Pressing the Home button at any point navigates to the Home screen of the device. CR-1
Notifications UX-S1 Notifications follow Android Design guidelines. In particular:
1. Multiple notifications are stacked into a single notification object, where possible.
2. Notifications are persistent only if related to ongoing events (such as music playback or a phone call).
3. Notifications do not contain advertising or content unrelated to the core function of the app, unless the user has opted in.
CR-11
UX-S2 The app uses notifications only to:
1. Indicate a change in context relating to the user personally (such as an incoming message), or
2. Expose information/controls relating to an ongoing event (such as music playback or a phone call).
CR-11
领域 ID 描述 测试
标准设计 UX-B1 应用遵循Android设计准则,并使用常用的用户界面模式和图标。
1. 应用不能重新定义系统图标(比如"返回"按钮)的预期功能。
2. 如果系统图标触发了标准的界面行为,则不可以使用完全不同的图标代替系统图标。
3. 如果应用提供了系统图标的自定义版本,那么图标要与系统图标高度相似,且能够触发标准的系统行为。
4. 应用不能重新定义或者漏掉Android界面模式,造成图标或行为造成对用户的误导或困惑。
--
导航 UX-N1 应用要支持标准的系统返回导航,且不能做任何屏幕内的自定义返回提示。 --
UX-N2 所有对话框均可使用返回按钮关闭 --
UX-N3 任何情况,点击主页按钮都要回到设备的主页面 --
通知 UX-S1 通知遵循Android设计规则,特别是:
1. 如果可以,多条通知放入同一个通知对象中。
2. 只有关联了进行中的事件(如后台播放音乐或打电话),通知才能持续保留。
3. 除非用户主动选择,通知不能包含广告或者与应用核心功能无关的内容。
--
UX-S2 应用只出于以下目的使用通知:
1. 指出与用户相关的上下文更改(例如收到消息)
2. 显示与进行中的活动相关的信息/控件(例如后台播放音乐或打电话)
--

Functionality


These criteria ensure that your app provides the expected functional behavior, with the appropriate level of permissions.

这些标准确保您的应用以合适的权限等级提供了用户期待的功能行为。

Area ID Description Tests
Permissions FN-P1 The app requests only the absolute minimum permissions that it needs to support core functionality. SC-4
FN-P2 The app does not request permissions to access sensitive data (such as Contacts or the System Log) or services that can cost the user money (such as the Dialer or SMS), unless related to a core capability of the app. SC-4
Install location FN-L1 The app functions normally when installed on SD card (if supported by app).

Supporting installation to SD card is recommended for most large apps (10MB+). See the App Install Location developer guide for information about which types of apps should support installation to SD card.
SD-1
Audio FN-A1 Audio does not play when the screen is off, unless this is a core feature (for example, the app is a music player). CR-7
FN-A2 Audio does not play behind the lock screen, unless this is a core feature. CR-8
FN-A3 Audio does not play on the home screen or over another app, unless this is a core feature. CR-1, CR-2
FN-A4 Audio resumes when the app returns to the foreground, or indicates to the user that playback is in a paused state. CR-1, CR-8
UI and Graphics FN-U1 The app supports both landscape and portrait orientations (if possible).

Orientations expose largely the same features and actions and preserve functional parity. Minor changes in content or views are acceptable.
CR-5
FN-U2 The app uses the whole screen in both orientations and does not letterbox to account for orientation changes.Minor letterboxing to compensate for small variations in screen geometry is acceptable. CR-5
FN-U3 The app correctly handles rapid transitions between display orientations without rendering problems. CR-5
User/app state FN-S1 The app should not leave any services running when the app is in the background, unless related to a core capability of the app.

For example, the app should not leave services running to maintain a network connection for notifications, to maintain a Bluetooth connection, or to keep the GPS powered-on.
CR-6
FN-S2 The app correctly preserves and restores user or app state.

The app preserves user or app state when leaving the foreground and prevents accidental data loss due to back-navigation and other state changes. When returning to the foreground, the app must restore the preserved state and any significant stateful transaction that was pending, such as changes to editable fields, game progress, menus, videos, and other sections of the app or game.

1. When the app is resumed from the Recents app switcher, the app returns the user to the exact state in which it was last used.

2. When the app is resumed after the device wakes from sleep (locked) state, the app returns the user to the exact state in which it was last used.

3. When the app is relaunched from Home or All Apps, the app restores the app state as closely as possible to the previous state.

4. On Back keypresses, the app gives the user the option of saving any app or user state that would otherwise be lost on back-navigation.
CR-1, CR-3, CR-5
领域 ID 描述 测试
权限 FN-P1 应用程序只能申请支持核心功能的最低级别的必要权限。 --
FN-P2 除非与应用的核心能力相关,应用不能申请涉及到用户敏感数据的权限(例如通讯录或系统日志), 也不能使用产生费用的服务(例如拨号器或者发送短信)。 --
安装位置 FN-L1 如果应用支持,那么应用需要在安装在SD卡的时候正常运行:

推荐所有提及较大的应用(大于等于10MB)支持安装到SD卡。可以在应用安装位置开发指南中查看哪种应用应该支持安装到SD卡
--
音频 FN-A1 屏幕关闭后不能播放音乐,除非是应用的核心功能(如音乐播放器) --
FN-A2 屏幕锁定后不能播放音频,除非是核心功能 --
FN-A3 在主屏幕或者其他应用运行时不能播放音频,除非是核心功能 --
FN-A4 当应用回到前台时,音频需要恢复播放或者提示用户音频播放被暂停了 --
界面和图形 FN-U1 如果可以,应用需要支持横屏和竖屏:

两个方向提供大致相同的特性和操作,并保持相同的功能,在内容和显示上小的差别是可以接受的
--
FN-U2 两个方向应用都需要占满屏幕,不能因为方向切换而产生黑边(我靠,letterbox居然能翻译成"黑边"), 可以接受为补偿屏幕几何图形的细微差别而产生细小的黑边。 --
FN-U3 应用正确地处理了方向的快速切换,而不会产生问题 --
用户/应用状态 FN-S1 如果不是与应用的核心能力有关,应用不应该在处于后台时运行服务。

例如,应用不应该为了运行服务而进行如下行为:为接收通知而保持网络连接,保持蓝牙连接或GPS开启
--
FN-S2 应用正确地保留和恢复用户和应用的状态。

应用离开前台时保留用户或者应用状态,防止由于返回导航或其他状态改变导致的意外数据丢失。当应用返回前台时,必须回复保存的状态和其他任何待处理的重要状态性事务。例如对可编辑字段的更改,游戏进度,菜单,视频以及其他应用和游戏的其他部分:

1. 当应用通过最近应用切换器恢复时,应用能精准地返回用户上次使用时的状态。

2. 当应用从休眠(锁定屏幕)状态恢复时,应用能精准地返回用户上次使用时的状态。

3. 当应用在主屏幕或者所有应用被重新启动时,应用要尽可能地恢复离之前状态最近的状态。

4. 当点击返回键时,应用给用户提供保存所有状态的选项,否则这些数据会在返回导航中丢失。
--

Compatibility, performance and stability


兼容性,性能和稳定性

These criteria ensure that apps provide the compatibility, performance, stability, and responsiveness expected by users.

这些规则确保应用提供了很好的兼容性,性能和稳定性,同时也有用户期待的响应。

Area ID Description Tests
Stability PS-S1 The app does not crash, force close, freeze, or otherwise function abnormally on any targeted device. CR-all, SD-1, HA-1
Performance PS-P1 The app loads quickly or provides onscreen feedback to the user (a progress indicator or similar cue) if the app takes longer than two seconds to load. CR-all, SD-1
PS-P2 With StrictMode enabled (see StrictMode Testing, below), no red flashes (performance warnings from StrictMode) are visible when exercising the app, including during game play, animations and UI transitions, and any other part of the app. PM-1
SDK PS-T1 The app runs on the latest public version of the Android platform without crashing or loss of core function. CR-0
PS-T2 The app targets the latest SDK by setting the targetSdk value to minimize the use of any platform-provided compatibility fallbacks. SP-1
PS-T3 The app is built with the latest SDK by setting the compileSdk value. SD-1
Battery PS-B1 The app supports power management features in Android 6.0+ (Doze and App Standby) properly. In the case where core functionality is disrupted by power management, only qualified apps may request an exemption. BA-1
Media PS-M1 Music and video playback is smooth, without crackle, stutter, or other artifacts, during normal app use and load. CR-all, SD-1, HA-1
Visual quality PS-V1 The app displays graphics, text, images, and other UI elements without noticeable distortion, blurring, or pixelation.

1. The app provides high-quality graphics for all targeted screen sizes and form factors.
2. No aliasing at the edges of menus, buttons, and other UI elements is visible.
CR-all
PS-V2 The app displays text and text blocks in an acceptable manner.

1. Composition is acceptable in all supported form factors.
2. No cut-off letters or words are visible.
3. No improper word wraps within buttons or icons are visible.
4. Sufficient spacing between text and surrounding elements.
--

Here

领域 ID 描述 测试
兼容性 PS-S1 应用不能在适配的设备上崩溃,强制关闭,冻结或出现其他功能异常。 --
性能 PS-P1 应用需要快速加载,当加载时间超过2秒时,应用提供屏幕反馈(如进度条显示器或者类似提示) --
PS-P2 当开启严格遵守标准模式时, 在玩游戏,动画、UI过渡或者应用的其他部分时,指示灯不出现红色的闪烁(严格模式的性能警告)。 --
SDK PS-T1 应用运行在最新公开版本的Android平台上运行,不会出现崩溃或功能缺失。 --
PS-T2 应用通过设置targetSDK来适配最新的SDK版本,以减少平台提供的任何兼容性回退。 --
PS-T3 应用通过设置compileSdk的值来用最新的SDK版本打包。 --
电池 PS-B1 在Android6.0及以上的系统版本上,应用很好地支持了电池管理功能(低耗电模式和应用待机模式)。当应用的核心功能被电池管理中断,只有符合条件的应用才能申请豁免。
多媒体 PS-M1 在正常使用或加载应用期间,音乐和视频的播放应该顺畅,没有中断,卡壳或其他异常声音。 --
视觉质量 PS-V1 应用显示的图形,文字,图片以及其他界面元素不能出现可感知的变形,模糊或像素颗粒感。

1. 对于所有适配的屏幕尺寸和机型(form factors居然翻译为“机型”),应用要提供高品质的图像。
2. 菜单的边缘,按钮以及其他界面元素没有明显的走样(what does “走样” means?)。
--
PS-V2 应用以可接受的习惯显示文字和文字块:

1. 构图在所有机型上均可接受。
2. 字母和单词不可以出现视觉毛边(这里官网翻译成“文字丢失”,我觉得不对,丢失了还要visible,不合逻辑。)。
3. 按钮或图标内的文字没有不当的换行。
4. 文字和周围元素间要有足够的空间。
--

Security


These criteria ensure that apps handle user data and personal information safely.

In addition to this checklist, applications published on the Google Play Store must also follow the User Data policies to protect users' privacy.

这些规则确保了应用安全地处理了用户的数据和个人信息。

除了这个检查清单之外,为了保护用户隐私,发布在Google Play商店的应用必须遵守用户数据政策。

Area ID Description Tests
Data SC-D1 All private data is stored in the app's internal storage. SC-1
SC-D2 All data from external storage is verified before being accessed. SC-2
SC-D3 All intents and broadcasts follow secure best practices.

1. Intents are explicit if the destination application is known.
2. Intents enforce and use appropriate permissions.
3. Intents that contain data and payload are verified before use.
SC-D4 No personal or sensitive user data is logged to the system or app-specific log. SC-10
App Components SC-P1 Only application components that share data with other apps, or components that should be invoked by other apps, are exported.

This includes activities, services, broadcast receivers, and especially content providers.

Always set the android:exported attribute explicitly, regardless of whether or not you export any of your application's components.
SC-5
SC-P2 All application components that share content with other apps define (and enforce) appropriate permissions. This includes activities, services, broadcast receivers, and especially content providers. SC-4
SC-P3 All content providers that share content between your apps use android:protectionLevel="signature". SC-3
Networking SC-N1 All network traffic is sent over SSL. SC-9
SC-N2 Application declares a network security configuration.
SC-N3 If the application uses Google Play services, the security provider is initialized at application startup.
Libraries SC-U1 All libraries, SDKs, and dependencies are up to date.
WebViews SC-W1 JavaScript is disabled in all WebViews (unless required). SC-6
SC-W2 WebViews only load whitelisted content if possible. SC-8
SC-W3 WebViews do not use addJavaScriptInterface() with untrusted content.

On Android M and above, HTML message channels can be used instead.
SC-7
Execution SC-E1 The app does not dynamically load code from outside the app's APK.
Cryptography SC-C1 The app uses strong, platform-provided cryptographic algorithms and does not implement custom algorithms.
SC-C2 The app uses a properly secure random number generator, in particular to initialize cryptographic keys.
领域 ID 描述 测试
数据 SC-D1 所有的私有信息都要存储在内部存储空间。 --
SC-D2 所有的外部数据在访问前都要验证 --
SC-D3 所有的意图和广播的使用要遵循安全性的最佳实践:

1. 如果目标应用已知,则使用显示意图。
2. 意图强制执行并使用相应权限
--
SC-D4 在系统日志或应用特定的日志中,没有个人或敏感用户数据被记录。 --
应用组件 SC-P1 只有应用程序组件需要向其他应用分享内容或者被其他应用调用时,才可以设置为导出。

包括活动,服务,广播接受器,尤其是内容提供者。

必须设置属性android:exported,无论是否导出应用组件。
--
SC-P2 所有向其他应用分享内容的应用组件要定义(且强制执行)相应的权限。包括活动,服务,广播接受器,尤其是内容提供者. --
SC-P3 在您的应用间分享内容的所有内容提供者都需要使用属性:android:protectionLevel="signature"
网络 SC-N1 所有的网络流量均通过SSL进行发送。 --
SC-N2 应用程序声明网络安全的配置文件。 --
SC-N3 如果应用程序使用Google Play服务,则安全提供程序在应用打开时初始化。 --
SC-U1 所有的库,SDK,依赖均保持最新状态
WebView SC-W1 在所有的WebView中,JavaScript停用(除非另外要求)。 --
SC-W2 如果可能的话,WebView只加载白名单中的内容。 --
SC-W3 WebView不能在不受信任的内容中使用addJavaScriptInterface()方法.

在Android M和更高版本中,可以使用HTML消息通道。
--
执行 SC-E1 应用不可以动态加载APK之外的代码
加密 SC-C1 应用可使用平台提供的强大加密算法,不能实现之定义算法。
SC-C2 应用使用合适的安全随机数生成器,来初始化密钥。

Google Play

These criteria ensure that your apps are ready to publish on Google Play.
这些规则确保您已经做好准备发布到Google Play商店。

Area ID Description Tests
Policies GP-P1 The app strictly adheres to the terms of the Google Play Developer Content Policyand does not offer inappropriate content, does not use the intellectual property or brand of others, and so on. GP-all
GP-P2 The app maturity level is set appropriately, based on the Content Rating Guidelines. GP-1
GP-P3 The app supports power management features in Android 6.0+ (Doze and App Standby) properly. In the case where core functionality is disrupted by power management, only qualified apps may request an exemption. See Support for other use cases in Doze and App Standby. GP-4
App Details Page GP-D1 The app’s feature graphic follows the guidelines outlined in this blog post. Make sure that:

1. The app listing includes a high-quality feature graphic.
2. The feature graphic does not contain device images, screenshots, or small text that will be illegible when scaled down and displayed on the smallest screen size that your app is targeting.
3. The feature graphic does not resemble an advertisement.
GP-1, GP-2
GP-D2 The app’s screenshots and videos do not show or reference non-Android devices. GP-1
GP-D3 The app’s screenshots or videos do not represent the content and experience of your app in a misleading way.
User Support GP-X1 Common user-reported bugs in the Reviews tab of the Google Play page are addressed if they are reproducible and occur on many different devices. If a bug occurs on only a few devices, you should still address it if those devices are particularly popular or new. GP-1
领域 ID 描述 测试
政策 GP-P1 应用要严格遵守Google Play开发者内容政策的条款,且不允许提供不适当的内容,不允许使用别人的知识产权和商标,等等。 --
GP-P2 根据内容分级准则,合理设置应用的成熟度. --
GP-P3 在Android 6以及上系统,应用要正确地支持电源管理特性(低电量模式和应用待机模式)。一旦核心功能被电源管理中断,只有符合条件的应用可以得到豁免。请查看其他使用场景的支持的低电量模式与应用待机模式。 --
应用详情页 GP-D1 应用的置顶大图必须遵守博客中列出的准则,确保以下几点:

1. 应用陈列了包括高质量的置顶大图的图像。
2. 应用的置顶大图不应该包含设备图片,屏幕截图以及在适配的最小屏幕设备上显示时难以辨认的文字。
3. 置顶大图看起来不能像广告。
--
GP-D2 应用的屏幕截图和视频不能展示非Android设备。 --
GP-D3 应用的屏幕截图和视频不能以误导性的方式展示内容和经验。 --
应用支持 GP-X1 在Google Play商店页面的“评价”标签中常见的用户反馈bug,如果它是重复性的且在很多设备上发生,这个问题要需要定位和解决。如果一个bug只是在一小部分设备上出现,但是这些设备非常流行或者是新设备,那么问题也需要被定位和解决。

Setting up a test environment

To assess the quality of your app, you need to set up a suitable hardware or emulator environment for testing.

为了评估应用的质量,您需要搭建一套硬件或者模拟器环境用来测试。

The ideal test environment would include a small number of actual hardware devices that represent key form factors and hardware/software combinations currently available to consumers. It's not necessary to test on every device that's on the market — rather, you should focus on a small number of representative devices, even using one or two devices per form factor.

form factor ==> 机型
理想的测试环境包括少量的真机,这些真机代表着消费者可用的主要机型和软硬件组合。您不必测试市面上的所有设备,而是关注在最优代表性的少量设备上,甚至每个机型只用一到两台设备。

If you are not able to obtain actual hardware devices for testing, you should set up emulated devices (AVDs) to represent the most common form factors and hardware/software combinations.

如果您没有办法获得真机来测试,您需要搭建模拟器的测试环境来代表大多数的机型和软硬件组合。

To go beyond basic testing, you can add more devices, more form factors, or new hardware/software combinations to your test environment. You can also increase the number or complexity of tests and quality criteria.

如果想要比基础的测试更加深入一点,您需要在测试环境中添加更多的设备、更多的机型或者新的软硬件组合。您也可以增加复杂测试和高质量规则的数量。

Test procedures

测试流程

These test procedures help you discover various types of quality issues in your app. You can combine the tests or integrate groups of tests together in your own test plans. See the sections above for references that associate criteria with these test procedures.

这些测试流程将帮助您发现应用中的不同类型的质量问题。您可以在您的测试计划中组合各项测试或综合运用各组测试。请查看以下部分参考与这些测试流程相关的规则。

Type Test Description
Core Suite CR-0 Navigate to all parts of the app — all screens, dialogs, settings, and all user flows.

If the application allows for editing or content creation, game play, or media playback, make sure to enter those flows to create or modify content.

While exercising the app, introduce transient changes in network connectivity, battery function, GPS or location availability, system load, and so on.
CR-1 From each app screen, press the device's Home key, then re-launch the app from the All Apps screen.
CR-2 From each app screen, switch to another running app and then return to the app under test using the Recents app switcher.
CR-3 From each app screen (and dialogs), press the Back button.
CR-5 From each app screen, rotate the device between landscape and portrait orientation at least three times.
CR-6 Switch to another app to send the test app into the background. Go to Settings and check whether the test app has any services running while in the background. In Android 4.0 and higher, go to the Apps screen and find the app in the "Running" tab.
CR-7 Press the power button to put the device to sleep, then press the power button again to wake the screen.
CR-8 Set the device to lock when the power button is pressed. Press the power button to put the device to sleep, then press the power button again to wake the screen, then unlock the device.
CR-9 For devices that have slide-out keyboards, slide the keyboard in and out at least once. For devices that have keyboard docks, attach the device to the keyboard dock.
CR-10 For devices that have an external display port, plug-in the external display.
CR-11 Trigger and observe in the notifications drawer all types of notifications that the app can display. Expand notifications where applicable (Android 4.1 and higher), and tap all actions offered.
Install on SD Card SD-1 Repeat Core Suite with the app installed to a device’s SD card (if supported by app).To move the app to SD card, you can use Settings > App Info > Move to SD Card.
Hardware acceleration HA-1 Repeat Core Suite with hardware acceleration enabled.

To force-enable hardware acceleration (where supported by device), add hardware-accelerated="true" to the <application> in the app manifest and recompile.
Performance and Stability SP-1 Review the Android manifest file and build configuration to ensure that the application is built against the latest available SDK (targetSdk and compileSdk).
Performance Monitoring PM-1 Repeat Core Suite with StrictMode profiling enabled as described below.Pay close attention to garbage collection and its impact on the user experience.
Battery BA-1 Repeat Core Suite across Doze and App Standby cycles.

Pay close attention to alarms, timers, notifications, syncs, and so on. See Testing with Doze and App Standby for requirements and guidelines.
Security SC-1 Review all data stored in external storage.
SC-2 Review how data loaded from external storage is handled and processed.
SC-3 Review all content providers defined in the Android manifest file for appropriate protectionLevel.
SC-4 Review all permissions that your app requires, in the manifest file, at runtime and in the app settings (Settings > App Info) on the device.
SC-5 Review all application components defined in the Android manifest file for the appropriate export state. The export property must be set explicitly for all components.
SC-6 Review the app's Network Security configuration, ensuring that no lint checks on the configuration fail.
SC-7 For each WebView, navigate to a page that requires JavaScript.
SC-8 For each WebView, attempt to navigate to sites and content that are outside of your control.
SC-9 Declare a Network Security Configuration that disables cleartext traffic then execute the app.
SC-10 Run the application and exercise all core functionality, while observing the device log. No private user information should be logged.
Google Play GP-1 Sign into the Google Play Developer Console to review your developer profile, app description, screenshots, feature graphic, content rating and user feedback.
GP-2 Download your feature graphic and screenshots and scale them down to match the display sizes on the devices and form factors you are targeting.
GP-3 Review all graphical assets, media, text, code libraries, and other content packaged in the app or expansion file download.
GP-4 Review Support for other use cases in Doze and App Standby.
Payments GP-4 Navigate to all screens of your app and enter all in-app purchase flows.
类型 测试 描述
合适套件 CR-0 适用于应用的所有部分--所有的屏幕,弹窗,设置,和所有的用户流程。

1. 如果应用程序允许编辑或者生成内容,玩游戏,媒体播放,确保应用中添加这些流程来创造或修改内容。

2. 在使用应用时,对于网络连接,电池功能,地理位置机器可用性等到变化,要非常迅速地相应和处理。
CR-1 在每个应用界面,点击设备的“主屏幕”键,然后从所有应用中重新启动应用
CR-2 在每个应用界面,切换到另一个运行中的应用,使用最近应用切换器返回本应用
CR-3 在每个应用界面(和弹窗),点击返回键
CR-5 在每个应用界面,旋转屏幕,切换屏幕方向至少三次。
CR-6 切换到另一个应用中使测试应用置为后台状态。到“设置”中查看测试一种是否有任何后台运行的服务。在Android4.0及以上版本,到多应用的屏幕在“运行中”标签下查看。
CR-7 点击电源按钮使设备休眠,再次点击电源按钮唤醒屏幕。
CR-8 点击电源按钮时,设置设备为锁定状态。点击电源按钮让设备处于休眠状态,然后再次点击电源按钮环境屏幕,然后解锁设备。
CR-9 对于带有滑动键盘的设备,将键盘滑进滑出至少一次;对于带有键盘底座的设备,将设备连接到键盘底座。
CR-10 对于带有外部显示端口的设备,请插入外部显示器。
CR-11 在通知式抽屉式通知栏中,触发和观察应用可以展示的所有通知类型。如果使用(Android4.1以及更高版本),展开通知并点击提供的所有操作。
安装到SD卡 SD-1 应用安装到SD中(如果支持),重复核心套件中的操作。把应用转移到SD卡中,你可以这样操作:设置>应用信息>Move to SD Card.
硬件加速 HA-1 开启硬件加速,重复核心套件的操作: 为了在支持的设备中强制开启硬件加速,在清单文件中的<application>节点中设置属性hardware-accelerated=true,然后重新编译.
性能和稳定性 SP-1 浏览清单文件,确保打包的配置中使用了可用的最新本SDK(targetSDK和compileSDK)打包应用。
性能监控 PM-1 按照如下所述的方式开启严格模式,并重复核心套件的操作:

密切注意垃圾回收机制,因为这会影响用户体验。
电池 BA-1 对于低耗电模式和应用休眠模式下重复核心套件的操作。

密切关注闹钟,计时器,通知,同步等等。查看如何测试低耗电模式与应用休眠模式来获得需求和指南。
安全 SC-1 查看外部存储空间中存储的所有数据。
SC-2 查看加载外部数据是如何被处理的。
SC-3 查看所有定义在Android清单文件中的内容提供者都被设置为合适的安全等级
SC-4 在清单文件中,在运行时,以及设备的设置中(设置>应用信息),查看应用请求的权限。
SC-5 查看清单文件中所有应用组件是否设置为可导出。所有的组件都要严格地设置为导出属性
SC-6 查看应用的网络安全配置,确保配置失败时不执行Lint检查。
SC-7 对于每一个WebView,导航到一个需要JavaScript的页面。
SC-8 对于每一个WebView,尝试导航到不受控制的站点和内容。
SC-9 声明禁止明文传输的网络安全配置,然后运行应用。
SC-10 运行应用程序,执行所有的核心功能。同时观察设备的日志,确保用户的个人信息不应该被记录。
Google Play GP-1 登陆Google Play开发者控制台,查看开发者信息,应用描述信息,屏幕截图,置顶大图以及用户反馈。
GP-2 下载您的置顶大图和屏幕截图,缩放它们来匹配到您适配的所有设备和机型。
GP-3 查看所有的图像附件,多媒体,文字 代码库,和打包在应用内的其他内容,以及额外下载的文件。
GP-4 查看在低电耗模式和应用待机模式下对其他用例的支持
支付 GP-4 导航到应用的所有屏幕,并进入应用内购买流程。

Testing with StrictMode

使用严格模式测试

For performance testing, we recommend enabling [StrictMode](https://developer.android.com/reference/android/os/StrictMode.html) in your app and using it to catch operations on the main thread and other threads that could affect performance, network accesses, file reads/writes, and so on.

对于性能测试,我们推荐应用开启严格模式,用户捕获主线程和其他线程中产生的影响性能,网络访问,文件读写等的操作。

You can set up a monitoring policy per thread using [StrictMode.ThreadPolicy.Builder](https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder.html) and enable all supported monitoring in the ThreadPolicy using [detectAll()](https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder.html#detectAll()).

您可以使用StrictMode.ThreadPolicy.Builder在每一个线程都设置监控政策,也可以使用detactAll()方法在ThreadPolicy中开始所有支持的监控。

Make sure to enable visual notification of policy violations for the ThreadPolicy using [penaltyFlashScreen()](https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder.html#penaltyFlashScreen()).

请确保用penaltyFlashScreen ()在开启方法在ThreadPolicy中开启了违反政策的视觉通知。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,530评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 86,403评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,120评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,770评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,758评论 5 367
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,649评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,021评论 3 398
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,675评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,931评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,659评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,751评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,410评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,004评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,969评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,203评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,042评论 2 350
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,493评论 2 343

推荐阅读更多精彩内容