- Notifications
You must be signed in to change notification settings - Fork0
Sample app that shows the different notification services.
NotificationsYou must be signed in to change notification settings
alvareztech/android-notifications
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Sample app that shows the different notification services.
implementation'com.huawei.hms:push:5.0.2.300'
getToken failed, com.huawei.hms.common.ApiException: 907135702: certificate fingerprint empty
Solution: Add fingerprint to Huawei web console.
HMSSDK_HmsInstanceIdEx: TokenTask failed, ErrorCode: 800100000 getToken failed, com.huawei.hms.common.ApiException: 907122036: no right
Solution: Updateagconnect-services.json
configuration file.
POST https://oauth-login.cloud.huawei.com/oauth2/v3/tokenHost: oauth-login.cloud.huawei.comContent-Type: application/x-www-form-urlencoded
grant_type
:client_credentials
client_secret
: Your Client Secretclient_id
: Your Client ID
{"access_token":"CgB6e3x9pzAkPR...","expires_in":3600,"token_type":"Bearer"}
POST https://push-api.cloud.huawei.com/v1/[appid]/messages:sendAuthorization: Bearer CgB6e3x9pzAkPRPDoctuJ...
{"validate_only":false,"message": {"notification": {"title":"Title 1","body":"Body 1" },"android": {"notification": {"title":"Android Title 1","body":"Android Body 1","click_action": {"type":1,"intent":"#Intent;compo=com.rvr/.Activity;S.W=U;end" } } },"token": ["client_token_1","client_token_2" ] }}
{"code":"80000000","msg":"Success","requestId":"160209653167346065000206"}
About
Sample app that shows the different notification services.