We already have some interesting news of features that will arrive with Android P , and now Google has announced a move that should lessen the instability problems of some applications. Today, in its official developer blog, Google announced that in the next version of the system, applications should no longer use interfaces that are not documented in the SDK.
Applications with non-SDK interfaces are at risk for user failures and require developer deployments. Therefore, these interfaces can no longer be used.
On Android N, Google restricted the set of symbols that C and C ++ codes could use. In this way, applications that use C ++ language depend on stable NDK interfaces, thus avoiding the failures caused by the dependency of non-NDK interfaces.
Now, from the next version of the robozinho green mobile system, Google will increase this practice by expanding these restrictions to also cover the Java language interfaces, which will lead developers to rely on stable SDK interfaces.
In practice, this means that some non-SDK methods and fields will be restricted so that developers can not access them. If they try, they will encounter errors like NoSuchFieldException or NoSuchMethodException. Dev must make sure that it is using only the officially documented parts of each class. That is, the dev should not plan to access methods or fields that are not listed in the SDK.
What about current apps?
There are current applications that use non-SDK interfaces and that do not have an alternative SDK to make the appropriate change. In these cases, Google asks the developer to contact us via the bug tracker.
In the upcoming Android developer preview, developers will still be able to run current applications that use non-SDK interfaces, but will see alerts about that.
That’s why devs should be aware and make sure your apps are okay when the Android developer preview is released. Google will be monitoring the use of non-SDK interfaces, and in cases where official SDK alternatives already exist for a replacement, the company will publish official guidelines on how to migrate.
For more details on the subject, check out the source link below.
See More At AndroidDump.