HMS-Core/hms-codelabs

Why HMS PushKit needs android.permission.REQUEST_INSTALL_PACKAGES

TurKurT656 opened this issue · 3 comments

I've tried this sample and I encountered a problem:
Why HMS PushKit needs android.permission.REQUEST_INSTALL_PACKAGES

<uses-permission  android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

This permission is used to update the HMS Core and push kit APK. Push kit strongly depends on the HMS Core and push kit APK. If this permission is not granted, applications may fail to be installed, and causing upgrade failures of the HMS and push kit`s APK.

Therefore, this permission is mandatory.

@Mike-mei Thanks for the answer. So some stores reject application because of this permission (I'm not sure if GP also rejects the app). So what we can do about this?

And also if we remove this permission from our manifest, can it cause to crash in our app because of upgrade failure?

If you remove this permission, it will not be affected on Huawei phones.but the HMS Core APK may not be installed on non-Huawei phones.

''can it cause to crash in our app because of upgrade failure?''
-- no,only will make the application cannot be automatically upgraded.