| <html devsite> |
| <head> |
| <title>Personalized Settings</title> |
| <meta name="project_path" value="/_project.yaml" /> |
| <meta name="book_path" value="/_book.yaml" /> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <p> |
| The Android Settings app provides a list of suggestions to the users in Android 8.0. |
| These suggestions typically promote features of the phone, and they are customizable |
| (e.g., "Set Do Not Disturb schedule" or "Turn on Wi-Fi Calling"). This feature provides |
| ranking for suggestions, based on any contextual signal or the user's past interactions |
| with suggestions. |
| </p> |
| |
| <p> |
| The current default Android Open Source Project (AOSP) ranking model is based on |
| user's previous interactions with the suggestion, which is a simple linear model |
| trained with logistic regression to properly weight the interaction signals. The |
| default implementation uses suggestions shown, clicked or dismissed as |
| indicators along with the recency of these events to rank the suggestions and |
| increase the chance of predicting a user's interaction with these suggestions. |
| This model was built with a limited amount of logged user data. Device manufacturers |
| (OEMs) can develop their own ranking model based on any collected data and potentially |
| include contextual signals and calibrate the ranking. |
| </p> |
| |
| <h2 id="implementation">Implementation</h2> |
| |
| <p> |
| Find the default <code>packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionRanker.java</code> implementation in AOSP. |
| </p> |
| |
| <p> |
| This feature is guarded by a flag, <code>isSmartSuggestionEnabled</code>, which |
| is set to false by default. If enabled (set to true), the feature operates |
| without additional modification using the default AOSP implementation. OEMs can |
| either use the default implementation or introduce their own implementation to |
| enable this feature. |
| </p> |
| |
| <p> |
| OEMs may customize the feature by implementing <code>platform/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProvider.java |
| </code> feature and Overriding the file's <code>rankSuggestions</code> method. |
| This method gets two lists containing suggestion Tiles and the corresponding |
| suggestionIds. This method should reorder the tiles in the list only according |
| to the desired ranking score. The suggestionIds can be used to uniquely identify |
| suggestions and extract the required past information about the suggestion, |
| depending on the ranking implementation (e.g., recency of interaction with this |
| particular suggestion). |
| </p> |
| |
| <h2 id="validation">Validation</h2> |
| |
| <p> |
| Implementers can ensure their version of the feature works as intended by |
| writing their own unit tests similar to <code>packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionRankerTest.java</code> to verify the ranking. |
| </p> |
| |
| </body> |
| </html> |