Skip to content

The huawei push for cordova, hms sdk version, now only support android.

License

Notifications You must be signed in to change notification settings

ryanlin1986/cordova-huawei-push

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-huawei-push

The huawei push for cordova, hms sdk version, now only support android.

Install

cordova plugin add cordova-hms-push

Open the root project level build.gradle, ensure the following settings added

buildscript { repositories { maven { url 'http://developer.huawei.com/repo/' } } dependencies { classpath 'com.huawei.agconnect:agcp:1.0.0.300' } }

How to use

Init the hms connection

cordova.plugins.hmspush.init();

Token Registered

document.addEventListener('hmspush.tokenRegistered', function (event) {
    console.log(event.token)
}.bind(this), false);

You can get the token value by event.token

About

The huawei push for cordova, hms sdk version, now only support android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%