Posted yesteryear David Brazdil together with Nicolas Geoffray, Software Engineers
In Android, nosotros assist immensely well-nigh providing the best sense to our users together with our developers. With each OS release, novel features enable you lot to supply amazing experiences for users; however, nosotros noticed that some app developers cause got been using non-SDK interfaces, which leads to increased crashes for users together with emergency rollouts for developers. We desire to create amend together with require your assist to ensure that Android is stable amongst each novel OS.
Three months ago, nosotros announced our plans to start restricting the usage of non-SDK interfaces inwards Android P. We know these restrictions tin move behave upon your unloosen workflow, together with nosotros desire to brand certain you lot cause got the tools to break usage of non-SDK interfaces, equally good equally fourth dimension inwards your planning for adjusting to the novel policies together with for giving us feedback.
In the Developer Preview together with Beta 1, nosotros cause got provided ways for you lot to encounter the behave upon of these restrictions on your app. In the Developer Preview, purpose of restricted APIs demo upwardly inwards logs together with toast messages, together with inwards Beta 1, nosotros provided a StrictMode policy that allows you lot to programmatically break these restrictions together with create your ain logging. For example:
We sympathise at that spot tin move live multiple reasons apps desire to purpose non-SDK interfaces, together with ensuring your app volition proceed to operate inwards Android P is of import to us. Many of you lot cause got explained your purpose cases through our issue tracker (thank you!), together with for most of these requests, nosotros cause got lifted the restrictions on specific non-SDK interfaces for Android P yesteryear adding them to the greylist. In addition, our squad has conducted static analysis on millions of apps together with processed thousands of automated reports from internal together with external beta testers. Through this analysis, nosotros cause got identified additional non-SDK interfaces that apps rely on together with added them to the greylist. For everything on the greylist, nosotros volition live investigating world SDK alternatives for hereafter releases. However, it's possible nosotros may cause got missed some non-SDK interface uses, together with hence nosotros cause got made the bulk of them available for apps whose target SDK is Android Oreo or below.
In summary, apps running on Android P volition live dependent area to restricted usage of non-SDK interfaces. If you lot are targeting Android P, the greylist shows the non-SDK interfaces that volition silent live available, piece all other non-SDK interfaces volition non live accessible. If you lot are targeting Android Oreo or below, most restrictions volition non apply, but you lot volition teach logcat warnings if you lot are accessing non-SDK interfaces that are non inwards the greylist (note that users don't encounter such warnings).
Try out our novel Beta ii release together with purpose StrictMode to break your non-SDK interfaces usage. You should await Beta ii to closely tally what the lastly unloosen volition implement for restricting non-SDK interface usages. Also, delight accept a aspect at our novel FAQ, which nosotros promise volition respond whatever questions you lot cause got roughly the feature. If not, let us know!