Unofficial APIs will be blocked in Android P: We might gotten wind of this alteration a couple of weeks in the past, however now it is legitimate: Google will likely be proscribing get right of entry to to private APIs within the subsequent model of Android. Because of this in Android P and going ahead, APIs which can be unofficially supported in Android’s SDK will (in most cases) now not be to be had to builders to make use of of their apps.
The usage of unofficial APIs in an app is dangerous, as it may well once in a while motive sudden problems and result in insects and mistakes when a brand new unlock by accident adjustments how the API works. That is why Google in most cases recommends sticking to legitimate APIs within the Android SDK, as they are not likely to wreck with out caution with the discharge of a brand new Android model.
In fact, it isn’t like builders need to make use of undocumented APIs for no reason why: once in a while it is more straightforward to do issues the use of a non-SDK API than throughout the SDK, and in some circumstances there may be merely no SDK selection. That is why Google needs to make this transition slowly and cautiously. To start with, simplest the ones non-SDK APIs with low to no utilization will likely be blocked, with the intention to decrease the affect on builders. Most often, when a developer makes an attempt to get right of entry to this type of APIs, they’re going to merely see an error akin to NoSuchFieldException or NoSuchMethodException.
For scenarios by which the use of SDK APIs is imaginable however prone to be technically difficult, the use of undocumented APIs will nonetheless be allowed till an app is up to date to focus on the most recent API degree. Sooner or later, Google plans to develop those restrictions in long term platform variations, however slowly sufficient to offer builders plentiful time emigrate to legitimate APIs.
However what about the ones circumstances the place there simply is not any appropriate selection to a non-SDK API? Fortunately, Google‘s concept forward and has arrange some way for builders to request new APIs thru a malicious program tracker once they really feel that the present public APIs don’t seem to be sufficient. If all is going smartly, this alteration may just probably assist in making apps extra dependable and solid in the end.
Symbol Credit score: Michael Stern