PackageManager # installPackage does not work for Android N

When using build tools version 24 and an Android device with an N-image (npd56n), I cannot install the package using PackageManager # installPackage.

When the URI file:is passed to the method using the scheme , -3 is returned, I assume this is INSTALL_FAILED_INVALID_URI .

When the URI created with FileProvider ( content:) is passed to the method, an exception is thrown:

Caused by: java.lang.UnsupportedOperationException: Only file:// URIs are supported                                                                    

Any ideas?

+4
source share
1 answer

installPackage in PackageManager deprecated on N

0
source

All Articles