The purpose of this article is to explain the necessary steps to register an application to use JPush services.
To enable the JPush Notification Provider to send push notifications, you need to register your application in the Jiguang Developer Site to get the credentials required to use JPush services.
Get the certificates for each platform deployed.
Refer to:
Go to Jiguang Developer Site, enter your user credentials and log in.
Select "Create a new application" option on the dashboard.
Enter a name (required) and an icon (optional) for your application.
Once the application is created, you already have the credentials needed to integrate the JPush services in your GeneXus-generated application. These credentials will be set through the environment properties App Key and Master Secret.
Set the platform-specific configurations for
Android and
Apple in the Application Settings section (check picture above).
Android
You just need to set the application package name:
Apple
- Upload Production certificate obtained in Step 1
- Upload Development certificate obtained in Step 1 (optional)
- Set "Certificate" as the Authentication Method
Once the iOS configuration is set, the application settings will look like the following image:
The following information is used to contact the provider
Notifications host: api.jpush.cn
Devices host: device.jpush.cn
base url: /v3/
protocol: https
Authorization: Basic
The following error appears:
E/JIGUANG-JCore: [ConnectingHelper] Register Failed with server error - code:1005
W/JIGUANG-JCore: [ConnectingHelper] Local error description: Your appKey and android package name are not matched. Please double check them according to Application you created on Portal.
As detailed by the warning, please check the Android Package Name property matches the Jiguang Platform configuration.
The following error occurs:
error: c:\models\sampleKB\Data\mobile\Huawei\TestPushNotifications\src\main\AndroidManifest.xml Error:
error: Attribute meta-data#onesignal_app_id@value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_app_id> is provided.
error: c:\models\sampleKB\Data\mobile\Huawei\TestPushNotifications\src\main\AndroidManifest.xml Error:
error: Attribute meta-data#onesignal_google_project_number@value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.
When using the Notifications Provider property to JPush and Huawei generation, make sure to turn off the UseHuaweiNotifications property.