Sobes.tech
Junior — Middle

Using the data transfer mechanism when creating a fragment, can you set the data volume up to 15 megabytes?

sobes.tech AI

Answer from AI

Data transfer between fragments in Android is usually done via a Bundle, which has a size limit of about 1 MB. Attempting to pass 15 MB will result in a TransactionTooLargeException error. Therefore, passing such large data volumes through fragment arguments is not recommended. Instead, it is better to use a shared ViewModel, a database, files, or other data storage and exchange mechanisms.