In this video, we discuss the Bundle API Implementation under the hood. Bundle API uses ArrayMap to save data that developers mostly keep using put API (bundle.put*()). We found a new API in our exploration, which is called PersistableBundle. Both Bundle and PersistableBundle extend from the BaseBundle class, which is mainly responsible for ArrayMap. The bundle class also implements Parcelable and Cloneable APIs. Also, we found some confusing or unexpected method names like:
- toString() and toShortString()
- isEmpty() and isDefinitelyEmpty()
- clone() and deepCopy()
Note: I am not an expert in Android Platform API, so it is a considerable possibility my hunch is wrong about some specific code, but we can still enjoy it.
#opensourcesoftware #opensource #android #bundle
Негізгі бет Android Bundle API Implementation (Lines of Code are 1365 on 21 Nov 2022)
Пікірлер