Question

Not able to download attachments PDF in mobile Android
Hi,
We have a button with the following action in the "onclick" to download a PDF document: pega.ui.HarnessActions.doAttachmentSingleClick
We tested several devices :
- Galaxy S6 Android 7.0 > Download KO
- Galaxy J3 Android 5.1.1 > Download OK
- Nexus 5 Android 6.0.1 > Download OK
- Desktop Windows 10 > Download OK
I consulted the logs in the console of Google Chrome on my PC (with the USB debugging mode) of the mobile device.
I recoved the link used on mobile to download the document. This link doesn't work on Android but works on my PC.
In the Pega, I have used the tracer, there is no error.
I don't know where to look. Can you help us ?
Thanks
***Edited by Moderator Marissa to update categories***
-
Like (0)
-

Hi Nicolas,
Are you using the Pega Mobile Client or the browser? What version of Pega 7? And is your application offline-enabled?
- James

It'll be helpful if you can tell the platform version you're using. There have been major changes in 7.3 and 7.3.1 with regards to doAttachmentSingleClick api. On mobile browser we download attachments and on Hybrid Client they are shown in built-in Doc viewer.
Also, are you saying you're *not* able to download attachments only on Android 7 device?

Hi guys,
We use the mobile browser (Chrome or Safari).
The platform is : 7.2.2
And we have this problem on Android 7 Galaxy S6 (we don't have other Galaxy S6 phone for testing)
The download is started but no file is recovered.
We have too this problem on iPhone 6+ IOS 11.1. No action is launched.
Nicolas

Have you cross checked the parameters you're sending to doAttachmentSingleClick function with OOTB attachment widget found in Perform/Review harness? A sample here -
pega.ui.HarnessActions.doAttachmentSingleClick(' <Row#> ', ' Link-Attachment ', ' <Work id> ', ' <Link-Attachment ID> ', null, null, ' <Data-WorkAttach ID> ')
Also, it's worth checking if pop-up blocker is enabled on your devices. That may prevent downloads.

We use this :
onclick="pega.ui.HarnessActions.doAttachmentSingleClick('<p:r n=".pxListSubscript"/>', '<p:r n=".pxObjClass" />', '<p:r n=".pxInsName" />', '<p:r n=".pzInsKey" />', null, null, '<p:r n=".pxLinkedRefTo" />')"
For the Galaxy S6, we have notifications for the launch of the download. But no file is linked.

Nicolas,
Reviewing the thread, it does not seem that we have narrowed down the point of failure.
You have stated that Android 5 & 6 and Windows 10 work, but Android 7 and iOS 11.1 fail. This would point to something being an issue in the newer mobile OS's, or just with those two devices specifically. I would recommend investigating the associations between file type and application for those devices.
For Android 7 on Nexus you can easily reset all associations:
https://support.google.com/nexus/answer/6271667?hl=en
For iOS 11.1, the issue may be similar with either the Files or Drive app:
https://www.macrumors.com/2017/09/27/docx-files-opening-in-google-drive-on-ios/
I hope this helps.
- James

James,
I don't think it's a problem with associations. Because in Android, the dowload starts but don't work.
We don't use a application, we use pega in a browser (Safari, Chrome) on mobile. So we can't unistall the apps.
Nicolas