Sharing debug logs
With v10.2.0, Helpshift SDK enables sharing internal logs via mail when the app runs in debug mode. This will help us collect logs faster by sending them over directly from the device.
You can share the SDK debug logs with us via the following steps:
We will post a notification in the notification bar of the device when the following conditions are met.
- The application is built in debug mode.
enableLoggingflag is set to
true. Refer here for the configuration.
The title of the notification is
The SDK will post this notification as soon as it is initialized. Refer here for initialization steps.
Reproduce the issue you are facing with the SDK.
On clicking this notification, we open an app chooser menu to share the logs.
Select a mail app from the given apps.
The mail app should default to
firstname.lastname@example.org the recipient.
Send the mail without changing its contents.
In case the issue is related to app crash:
- Launch the app again.
- You should see the same notification again in the notification bar.
- Click on the notification to share the logs.
We do not collect or store logs when the app is in release/production mode.
Moved to AndroidX ( 10.3.0 and above versions )
Helpshift SDK X has completely moved to AndroidX from
10.3.0. If client app is using legacy libraries then SDK X will not compile.
Using AndroidX support libraries ( 10.2.X and below versions )
Helpshift SDK X uses legacy Android support libraries. If you want to use AndroidX libraries in your application, please follow these steps to make Helpshift SDK compatible with AndroidX:
- Set targetSdkVersion of your project to >= 28.
- Add following lines in gradle.properties file.
Jetifier is a tool which migrates support-library-dependent libraries to rely on the equivalent AndroidX packages.
If you want to use standalone jetifier tool mentioned here, Please follow these steps -
To install Jetifier, download this zip file and extract it. Your device must have Java version 1.8 installed.
To process a library, pass the path to the current library and the path to the output file that the tool should create
For Example -
./jetifier-standalone -i <source-library> -o <output-library>
Invalid language code causing CORS error
If you are unable to load chat screen and find this error in console or android logcat,
Access to XMLHttpRequest at 'https://api.helpshift.com/websdk/……' from origin
'https://…...webchat.helpshift.com' has been blocked by CORS policy: Request
header field accept-language is not allowed by Access-Control-Allow-Headers in
preflight response. -- From line 0 of https://……...webchat.helpshift.com/latest/
this could be because of an invalid language code passed to Helpshift SDK. To resolve the issue you can use
Helpshift.setLanguage(String language) API to pass the valid language code to Helpshift SDK.
Valid language code values can only contain characters
0-9, A-Z, a-z, space or *,-.;=.
For more details, refer here.
Unable to get Push notification
If you are unable to get push notifications from Helpshift, verify that you have followed the proper steps from our developer documentation mentioned here Notifications.
Still, if you are not getting notifications, then check the following.
- You have to enable the Cloud messaging API (legacy) from Firebase console and provided the Server key inside it in your dashboard as mentioned here Notifications.
Notifications not showing in the notification bar
With Android 13, the end user needs to give permissions for the app to be able to post notifications.
If your app has targeted Android 13 (API Level 33), then this might be a cause for notifications to not work.
If you want your app to be able to post notifications then you need to ask for the Notification permissions. Refer to the Android documentation for further reference.
Helpshift SDK will not be asking for notification permissions. It depends on the application for it.
Handling attachments not supported by browsers on device
- When the user clicks on an attachment in a conversation, the SDK tries to open it in the browser by default since we try to open it directly from the CDN Url.
- If the browser is not able to open the file, it downloads the files on the device.
- You can add handling in your app to open or consume such files by providing the user an option to open the file in your app when the user tries to open the downloaded file.
- Refer to intent filters here for more information on handling system wide open file actions by the user.