Foren

Liferay Mobile SDK

Pratik Banerjee, geändert vor 7 Jahren.

Liferay Mobile SDK

New Member Beiträge: 9 Beitrittsdatum: 12.01.16 Neueste Beiträge
I need to read the file content using Liferay Mobile SDK. But no such API seems to be present. The file is stored in Document And Media Library. DLFileEntryService of Mobile SDK has no methods to read the file content. Can any one please suggest how to read the file content.
thumbnail
Bruno Farache, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

Liferay Master Beiträge: 603 Beitrittsdatum: 14.05.07 Neueste Beiträge
Pratik,

The same question was made here.
Pratik Banerjee, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

New Member Beiträge: 9 Beitrittsdatum: 12.01.16 Neueste Beiträge
Hi Bruno,

Thanks for the link. But I need just to read the content of the file rather than downloading the same. Is that possible?
Is there any API to fetch the content as InputStream in Mobile SDK?

Actually I need to build a newsletter app using mobile SDK. The news contents will be fetched from the files present in Document and Media Library. Also need to fetch some images also. Please let me know some solution to go about it. I have been trying this since couple of days but no luck.
thumbnail
Bruno Farache, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

Liferay Master Beiträge: 603 Beitrittsdatum: 14.05.07 Neueste Beiträge
Pratik,

DownloadUtil accepts a FileProgressCallback instance, which allows you to intercept the received bytes and read the file's content.
Pratik Banerjee, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

New Member Beiträge: 9 Beitrittsdatum: 12.01.16 Neueste Beiträge
Thanks Bruno.

But how to initialise FileProgressCallback. Also is there good amount of examples of how to use various APIs of Mobile SDK? Google has very very limited help for mobile sdk.
thumbnail
Bruno Farache, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

Liferay Master Beiträge: 603 Beitrittsdatum: 14.05.07 Neueste Beiträge
Not sure what you mean, Pratik. You don't know how to instantiate an object in Java?
Pratik Banerjee, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

New Member Beiträge: 9 Beitrittsdatum: 12.01.16 Neueste Beiträge
Hi Bruno,

Not that. Definitely I know. I just want to get some good amount of example of various APIs of Mobile SDK.
thumbnail
Bruno Farache, geändert vor 7 Jahren.

RE: Liferay Mobile SDK

Liferay Master Beiträge: 603 Beitrittsdatum: 14.05.07 Neueste Beiträge
Have you checked the Mobile SDK documentation?

This test also uses FileProgressCallback, if you haven't tried to use yet.