gyf-dev/Cactus

自定义Notification的时候可能会因为数据过大超过Intent的传输数据大小限制而报错

paozhuanyinyu opened this issue · 1 comments

Caused by: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 43025520 bytes
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1566)
at android.app.ContextImpl.startService(ContextImpl.java:1532)
at android.content.ContextWrapper.startService(ContextWrapper.java:613)
at com.gyf.cactus.ext.a.a(CactusExt.kt:308)
at com.gyf.cactus.ext.a.b(CactusExt.kt:193)
at com.gyf.cactus.service.CactusJobService.onStartJob(CactusJobService.kt:64)
at android.app.job.JobService$JobHandler.handleMessage(JobService.java:143)

Notification我用了自定义布局,布局不算太复杂,主要的原因可能是有一个网络获取的图片而且还会更新

从后台报错的数据统计来看,还有一个特点,全部是N系列的机型,7.0,7.1.1,7.1.2