Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

onDestroy callback 2 weeks 15 hours ago #15507

  • harkuk1
  • harkuk1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Thank you received: 0
Need a onDestroy callback whenever the RadeePdf Activity is destroyed

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

onDestroy callback 2 weeks 13 hours ago #15508

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1050
  • Thank you received: 64
dear user,
we did not get your mean.
you know, Activity class for Android can Override method onDestroy().
example codes:
@Override
protected void onDestroy() {
    RadaeePluginCallback.getInstance().willCloseReader();

    if (m_controller != null)
        m_controller.onDestroy();
    if (m_doc != null) {
        m_view.PDFClose();
        m_doc.Close();
        m_doc = null;
    }
    if (m_asset_stream != null) {
        m_asset_stream.close();
        m_asset_stream = null;
    }
    if (m_http_stream != null) {
        m_http_stream.close();
        m_http_stream = null;
    }
    Global.RemoveTmp();
    super.onDestroy();

    RadaeePluginCallback.getInstance().didCloseReader();
}

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

onDestroy callback 1 week 6 days ago #15509

  • harkuk2
  • harkuk2's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Okay soo whenever i open a pdf onCreate function is called so i am performing some task and also when I kill the pdf onDestroy method is not being called I need to perform some operation on these 2 methods Like invoke a method from android to react native but onDestroy is not getting called whenever i kill the pdf from the Recent Apps. I checked this method but it is not being called when i kill. The method is called when i press the back button. 

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

onDestroy callback 1 week 6 days ago #15510

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 627
  • Thank you received: 52
Dear harkuk2, I suggest also to look at this:

developer.android.com/reference/android/...vity#onDestroy%28%29
 

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

  • Page:
  • 1
Powered by Kunena Forum