HowTo: Register an application to use JPush services

Unofficial Content

To enable the JPush Notification Provider to send push notifications, we need to register our application in the Jiguang Developer Site to get the credentials required to use JPush services.

Step 1 - Get certificates

Get the certificates for each platform deployed.
Refer to:

Step 2 - Login

Go to Jiguang Developer Site, enter your user credentials and log in.
JPush - Step1 - Login

Step 3 - Create a new app

Select "Create a new application" option on the dashboard.
JPush - Step2 - CreateApp

Enter a name (required) and an icon (optional) for your application.
JPush - Step2 - EnterName

Step 4 - Get the credentials

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.
JPush - Step3 - Credentials

Step 5 - Configure platforms

Set the platform-specific configurations for Android and iOS in the Application Settings section (check picture above).

Android
You just need to set the application package name:
JPush - Step4 - Android

iOS

  • Upload Production certificate obtained in Step 1
  • Upload Development certificate obtained in Step 1 (optional)
  • Set "Certificate" as the Authentication Method

JPush - Step4 - iOSSet

Once the iOS configuration is set, the application settings will look like the following image:
JPush - Step4 - iOSConfigured

Troubleshooting

Register Failed with server error

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.

no value for onesignal_app_id is provided

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.