Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solving "Package manager has died" RuntimeException

I have an Android app that should list all installed apps on a device (no root). I have tried both getInstalledApplications(0) and getInstalledPackages(0) methods of PackageManager, but on some devices, which do apparently have too many apps installed, I'm getting "Package manager has died" RuntimeException (I receive them via error reporting service of Google Play). This is due to a well-known limitation of 1MB per 1 call in IPC used internally by Android.

How to workaround this? I don't mind to request the long list by chunks, but I don't see any means for that. Only 2 abovementioned methods are available.

like image 851
Stan Avatar asked Jun 12 '14 12:06

Stan


1 Answers

The issue has been fixed since Android 5.1. You may find details in the Android issuetracker.

like image 130
Stan Avatar answered Sep 22 '22 03:09

Stan