Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.

How to detect Radaee PDF close event

More
IP: 192.168.0.71 8 years 9 months ago #12474 by stacy_brenes
I am trying to detect when the user closes the PDF reader so that I can store the page he is on when he closes it.

I do not see any methods for this event in the plugins js file. I know we have the RadaeePDFPlugin.getPageNumber function, but I still need to be able to bind it to the closing of the PDF reader to get the last page the user reads.

Does this plugin have a method that I missed, or is there a way to manipulate the getPageNumber function so that I can get the page the user is on when he closes the PDF reader.

Thanks in advance,
-Stacy.
More
IP: 192.168.0.71 8 years 9 months ago #12482 by nermeen
You can use the following callbacks:
Android (com.radaee.cordova.RadaeePDFPlugin.java):
RadaeePDFPlugin.willCloseReader
iOS:
WillCloseReader in RadaeePDFPluginDelegate
More
IP: 192.168.0.71 8 years 9 months ago #12483 by stacy_brenes
Can you provide a working example of how to use the functions as callbacks?
I'm struggling with how to correctly call the RadaeePDFPlugin.willCloseReader() to be able to detect when the user closes the reader.
More
IP: 192.168.0.71 8 years 9 months ago #12485 by nermeen
It's a callback (listener) that will be fired immediately before the closure of the PDF, it's already implemented in the demo project.

You need to integrate your code inside this method (in the classes mentioned earlier)
More
IP: 192.168.0.71 8 years 8 months ago #12599 by stacy_brenes
it's already implemented in the demo project.
it's already implemented in the demo project.
'it's already implemented in the demo project' is there git repo I can clone the demo project from?
More
IP: 192.168.0.71 8 years 8 months ago #12603 by nermeen
You can get cordova plugin from RadaeePDF-Cordova Plugin
For example (Android), in RadaeePDFPlugin.java you can find that it implements RadaeePluginCallback.PDFReaderListener
Code:
public interface PDFReaderListener { void willShowReader(); void didShowReader(); void willCloseReader(); void didCloseReader(); void didChangePage(int pageno); void didSearchTerm(String query, boolean found); }
Time to create page: 0.417 seconds
Powered by Kunena Forum