Skip to content

Commit

Permalink
Add README for ParcelableList
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed May 26, 2021
1 parent 52e042d commit 0a2f3a6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion parcelablelist/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# ParcelableList

Parcelable list with splice support.
![Maven Central](https://img.shields.io/maven-central/v/dev.rikka.rikkax.parcelablelist/parcelablelist)

Binder has total 1MB buffer size across the process (64KB for each Binder thread).
When transferring a large list of Parcelable objects (e.g., `getInstalledPackages` with flags like `GET_ACTIVITIES`),
it's easy to exceed this limit (`TransactionTooLargeException`). Therefore, the framework has created `android.content.pm.ParceledListSlice` which split the list into multiple transactions.

This library has `ParcelableListSlice` and `StringListSlice` class which is similar to the framework classes.

There is also a base class, `BaseParcelableListSlice`, for extension to transfer non-Parcelable objects.

## Download

```groovy
dependencies {
implementation "dev.rikka.rikkax.parcelablelist:parcelablelist:1.0.0"
}
```

0 comments on commit 0a2f3a6

Please sign in to comment.