How to detect Radaee PDF close event - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC: How to detect Radaee PDF close event

How to detect Radaee PDF close event 1 year 6 months ago #12474

  • stacy_brenes
  • stacy_brenes's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

How to detect Radaee PDF close event 1 year 6 months ago #12482

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
You can use the following callbacks:
Android (com.radaee.cordova.RadaeePDFPlugin.java):
RadaeePDFPlugin.willCloseReader
iOS:
WillCloseReader in RadaeePDFPluginDelegate

Please Log in or Create an account to join the conversation.

How to detect Radaee PDF close event 1 year 6 months ago #12483

  • stacy_brenes
  • stacy_brenes's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

How to detect Radaee PDF close event 1 year 6 months ago #12485

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
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)

Please Log in or Create an account to join the conversation.

How to detect Radaee PDF close event 1 year 4 months ago #12599

  • stacy_brenes
  • stacy_brenes's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

How to detect Radaee PDF close event 1 year 4 months ago #12603

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
You can get cordova plugin from RadaeePDF-Cordova Plugin
For example (Android), in RadaeePDFPlugin.java you can find that it implements RadaeePluginCallback.PDFReaderListener
public interface PDFReaderListener {
        void willShowReader();
        void didShowReader();
        void willCloseReader();
        void didCloseReader();
        void didChangePage(int pageno);
        void didSearchTerm(String query, boolean found);
    }

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum