huawei-push-notification

How to get access token for Huawei Api for sending push to device?

£可爱£侵袭症+ 提交于 2021-02-11 14:23:10
问题 I need to send push to Huawei device, which have app with Huawei Push Kit integrated. To do this I need accessToken. How to receive it? I've already create developer account and create project for app. 回答1: You need to do POST request to https://oauth-login.cloud.huawei.com/oauth2/v3/token Add header Content-Type: application/x-www-form-urlencoded Add params: grant_type=client_credentials client_id=CLIENT_ID_FROM_DEV_CONSOLE client_secret=CLIENT_SECRET_FROM_DEV_CONSOLE Request using curl:

How to get access token for Huawei Api for sending push to device?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 14:20:29
问题 I need to send push to Huawei device, which have app with Huawei Push Kit integrated. To do this I need accessToken. How to receive it? I've already create developer account and create project for app. 回答1: You need to do POST request to https://oauth-login.cloud.huawei.com/oauth2/v3/token Add header Content-Type: application/x-www-form-urlencoded Add params: grant_type=client_credentials client_id=CLIENT_ID_FROM_DEV_CONSOLE client_secret=CLIENT_SECRET_FROM_DEV_CONSOLE Request using curl:

Why HMS PushKit needs android.permission.REQUEST_INSTALL_PACKAGES

戏子无情 提交于 2021-02-11 12:33:50
问题 Recently I've added HMS PushKit SDK with this gradle code: implementation "com.huawei.hms:push:5.0.4.302" After That I've noticed that my application added to the list of apps with access to install apps from unknown source (special permission). I checked the AndroidManifest.xml file of one of this library's dependency ( com.huawei.hms.base.availableupdate ) and saw that it has this special permission: <!-- If it is Android 8.0, the targetSdkVersion of the application compilation

How to send push to Huawei device using Huawei Push Kit API?

别等时光非礼了梦想. 提交于 2021-02-05 09:00:21
问题 I want to send push from server to Huawei device with Huawei Push Kit integrated. I have deviceToken from device, but when I try so send push message using API I receive error: 80300002: No permission to send message to these tmIDs 回答1: This error can be caused be wrong AppId , used in API url path. AppId can be found in console so: App Gallery Connect -> My projects -> YOUR_PROJECT -> Project settings . On this screen AppId is Application ID , which can be found above SHA-256 of your signing

How to send push to Huawei device using Huawei Push Kit API?

天涯浪子 提交于 2021-02-05 08:59:45
问题 I want to send push from server to Huawei device with Huawei Push Kit integrated. I have deviceToken from device, but when I try so send push message using API I receive error: 80300002: No permission to send message to these tmIDs 回答1: This error can be caused be wrong AppId , used in API url path. AppId can be found in console so: App Gallery Connect -> My projects -> YOUR_PROJECT -> Project settings . On this screen AppId is Application ID , which can be found above SHA-256 of your signing