After searching new Android P features, I came across the non-SDK interfaces restriction. and my question is,
What is a non-SDK interface or an SDK interface? What is the difference between them? specially that makes non-SDK once better. Examples of popular SDK and non-SDK interfaces available for android.
P.S. I came across abstract answers differentiating between SDK and API interfaces but it didn't fulfill my questions :/
Non-SDK interfaces that are currently unrestricted and your app can use. Note however, that these interfaces are unsupported and subject to change without notice. Expect these interfaces to be conditionally blocked in future Android versions in a max-target-x list. SDK ( whitelist )
You must install Oracle JDK before installing Android Studio, so please don't start this step until you have completed Step 1 above. Download Android Studio from the following address: Android Studio Download Page.
The Android SDK is a software development kit that includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials.
Android Hidden APIs are classes, methods and resources that Google hides from you because of stability reason. These features are hidden because they may be changed on next API version. The internal APIs are located in package com.
Quoting the documentation:
Generally speaking, SDK interfaces are those ones found documented in the Android framework Package Index.
Not everything in the framework appears in the documentation. Classes, methods, fields, and such marked with @hide
in the source code are available at runtime but are not part of the SDK and do not appear in the documentation. These items can only be accessed by unconventional means, such as reflection.
That is what Android P is starting to ban.
For years, I have been advising developers not to access such things, because they are unreliable. Any Android device may not have the hidden stuff, due to changes based on the Android version or device manufacturer/ROM modder tweaks. Now, Google is going to enforce this advice more firmly, at least in some cases.
specially that makes non-SDK once better
They are not "better". However, they may offer access to certain features that are not available in the SDK, for one reason or another (e.g., API is not settled yet).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With