You will find your License Code on WebEngage dashboard. Log in to your WebEngage dashboard and go to Account Setup section, as highlighted in the image below. Note that your License Code might start with tilde (
It is the value of manifest key:
To check whether the integration is successful or not, you can monitor debug logs from WebEngage SDK in Android Studio.
To enable debug mode, enable logs from WebEngage SDK during initialization as shown below.
WebEngageConfig webEngageConfig = new WebEngageConfig.Builder() .setDebugMode(true) .build(); WebEngage.engage(this.getApplicationContext(), webEngageConfig);
Now clean, build and launch your application, and set log level of Android Studio as Verbose with filter as
You should start seeing debug logs. If integration is successful, "WebEngage Successfully Initialized" will be logged. Else, "WebEngage Initialization Failed" will be logged along with error message.
Successful integration sample logs
Unsuccessful integration sample logs.
- Make sure that WebEngage SDK is successfully integrated.
- Make sure that you have entered the correct License Code while initializing the SDK from
onCreatecallback of your Application class.
- If there are any network issues (either from your device or from WebEngage servers) then "Event Logging failed, scheduling next sync" should be logged in your console. This indicates that events tracked in SDK are not being successfully reported to WebEngage servers. If your device has network access but you still do not see data being reflected on the dashboard, contact WebEngage support at firstname.lastname@example.org.
If you are seeing "Events successfully Logged to server, scheduling next sync" in your logs, then the events are being successfully reported to WebEngage servers and should be reflected on your dashboard within 2-3 mins. If you do not see data being reflected on the dashboard within 5 minutes, contact WebEngage support.
If push notification are not showing up on your device, there are few thing that you need to check.
- Make sure that your GCM/FCM Server Key is not restricted to only accept requests from certain IP addresses.
- If you have done automatic GCM integration then make sure that your device is successfully registering to GCM and you have entered correct GCM project number in your
AndroidManifest.xml. If you are seeing
GCM Register Error : SERVICE_NOT_AVAILABLEin your console logs, it means that the device is unable to register with GCM and hence will not receive push notifications. WebEngage SDK will retry for registration on next app launch. Also make sure that your application or any other SDK is not doing unregistration or re-registration (using different project number) with GCM, which can cause invalidation of registered token stored at WebEngage backend.
- Make sure that you wait for at least 10 minutes after installing your application as it take some time for the device to become push reachable after its first launch. "First launch" is any launch after installation.
- If testing on an emulator, try cleaning and rebuilding your project, and restarting ADB.
- Check that the device is set to show push notifications from this app under device Settings menu.
- Some devices (Xiaomi, Lenovo) do not show push notifications if you force kill the app. In such devices you need to grant extra permissions so that your app can restart in the background.
- If you have implemented push notification callbacks then make sure that you are not doing anything that might cause an
- Make sure that the user is not opted out from receiving push notifications from WebEngage.
- Make sure that the current status of your push notification campaign on dashboard is
Ended. If the status is
Failed, contact WebEngage support at email@example.com.
If GCM registration and messaging is handled by WebEngage SDK then you need to implement Lifecycle callbacks in order to receive GCM registration ID and messages.
For WebEngage SDK version < 1.8 make sure that:
- You have annotated your callback implementation class(es) with
- Your callback implementation class(es) resides inside your declared application package.
For WebEngage SDK version >= 1.8 and <= 1.9.7 make sure that:
- You are properly registering your callbacks to WebEngage SDK.
- Your app is holding a strong reference to your callback implementation.
For WebEngage SDK version >= 1.9.8 make sure that you are properly registering your callbacks to WebEngage SDK.
Whenever a GCM key is entered on WebEngage dashboard, it checks for its validity using standard Google API. If the key is found invalid then you will receive "Settings could not be saved" as shown below.
To fix this:
- Check for any other typo that might have occurred while pasting your GCM key on the dashboard.
- Clear IP whitelist, if any, that might be associated with this Server Key from your Google API console.
- Create a new Server Key and use this on dashboard.
Since the release of Lollipop (API 21), the material design style dictates that all non-alpha channels in notification icons be ignored. Therefore, the small notification icon will be rendered solid white if it is not transparent.
Hence, if you have provided a custom small icon during SDK initialisation as shown above, then you need to make sure that it is transparent.
So, what's next?
|Push troubleshooting guide|