table of Contents
1. Preparation
Create a new demo ready to implement the push function
Two, configuration push
Check unipush in the manifest to
add push permission to
enter the configuration page
Before doing so, please confirm that you have real-name authentication
Three, configuration information
3.1, get android signature
https://ask.dcloud.net.cn/article/35777
Win10 signatures need to be written to files, and administrator rights are required
cd C:\Program Files\Java\jdk1.8.0_181\bin
Enter the bin directory of jdk, you can view it from the system variables.
keytool -genkey -alias android.keystore -keyalg RSA -validity 20000 -keystore test.keystore
Generate a signature named test
In this case, just copy the command given by the system and execute it.
Note that administrator rights are required here.
After completion, two keystore files will be generated, and the old suffix is a backup file.
You can use the following command to view:
keytool -list -v -keystore test.keystore
Enter keystore password: //Enter the password and press Enter
The following format information will be output:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: test
Creation date: 2019-10-28
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN
Issuer: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN
Serial number: 7dd12840
Valid from: Fri Jul 26 20:52:56 CST 2019 until: Sun Jul 02 20:52:56 CST 2119
Certificate fingerprints:
MD5: F9:F6:C8:1F:DB:AB:50:14:7D:6F:2C:4F:CE:E6:0A:A5
SHA1: BB:AC:E2:2F:97:3B:18:02:E7:D6:69:A3:7A:28:EF:D2:3F:A3:68:E7
SHA256: 24:11:7D:E7:36:12:BC:FE:AF:2A:6A:24:BD:04:4F:2E:33:E5:2D:41:96:5F:50:4D:74:17:7F:4F:E2:55:EB:26
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
Where SHA1 is required
3.2, configure push information
The package name needs to be remembered
Four, monitor push
Use h5+ api for monitoring
http://www.html5plus.org/doc/zh_cn/push.html
Five, package execution
The package name and alias must be consistent in the front.
Wait for the package to be
completed and change the package base to
run to the device
Six, test push
Send a push on the official website
Note that you need to open notification permissions