"Native method not found" , clean the memory. - 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...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: "Native method not found" , clean the memory.

"Native method not found" , clean the memory. 3 years 11 months ago #7765

  • oemilk
  • oemilk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Hi.

As we know, "Global.init()" method calls a native library.
So it calls at first activity.

But I had called it before the rendering activity.
Because I need a bitmap which PDF file's first page.

Anyway, my question is that memory widget clean feature.
Start app >> open the PDF file >> Show PDF redering page >> Click the device HOME button
>> Clean a memory when do memory widget's. >> Restart app >> crash..

So I put the "Global.init()" method into a rendering activity.
But I has a problem.
"Global.init()" method called twice....

Do you have any solutions about this??
For example,
How can I check the library's activity?
or Close the native library??

11-17 14:19:11.874: E/ACRA(27358): ACRA caught a UnsatisfiedLinkError exception for com.access_company.android.docdrive. Building report.
11-17 14:19:14.997: E/ACRA(27358): com.access_company.android.docdrive fatal error : Native method not found: com.radaee.pdf.Document.open:(Ljava/lang/String;Ljava/lang/String;)I
11-17 14:19:14.997: E/ACRA(27358): java.lang.UnsatisfiedLinkError: Native method not found: com.radaee.pdf.Document.open:(Ljava/lang/String;Ljava/lang/String;)I
11-17 14:19:14.997: E/ACRA(27358): 	at com.radaee.pdf.Document.open(Native Method)
11-17 14:19:14.997: E/ACRA(27358): 	at com.radaee.pdf.Document.Open(Document.java:417)
11-17 14:19:14.997: E/ACRA(27358): 	at com.access_company.android.docdrive.pdf.activity.PDFReaderActivity.PDFReaderInit(PDFReaderActivity.java:235)
11-17 14:19:14.997: E/ACRA(27358): 	at com.access_company.android.docdrive.pdf.activity.PDFReaderActivity.access$8(PDFReaderActivity.java:231)
11-17 14:19:14.997: E/ACRA(27358): 	at com.access_company.android.docdrive.pdf.activity.PDFReaderActivity$1.handleMessage(PDFReaderActivity.java:106)
11-17 14:19:14.997: E/ACRA(27358): 	at android.os.Handler.dispatchMessage(Handler.java:102)
11-17 14:19:14.997: E/ACRA(27358): 	at android.os.Looper.loop(Looper.java:136)
11-17 14:19:14.997: E/ACRA(27358): 	at android.app.ActivityThread.main(ActivityThread.java:5103)
11-17 14:19:14.997: E/ACRA(27358): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-17 14:19:14.997: E/ACRA(27358): 	at java.lang.reflect.Method.invoke(Method.java:515)
11-17 14:19:14.997: E/ACRA(27358): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
11-17 14:19:14.997: E/ACRA(27358): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
11-17 14:19:14.997: E/ACRA(27358): 	at dalvik.system.NativeStart.main(Native Method)

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

"Native method not found" , clean the memory. 3 years 11 months ago #7773

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
you can declare a static boolean var, init as false.
each time need to invoke Global.Init(), check boolean value first.
if false, invoke Global.Init(), and set var as true.
if true, ignore invoke.

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

"Native method not found" , clean the memory. 3 years 11 months ago #7838

  • oemilk
  • oemilk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
Thank you.

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

  • Page:
  • 1
Powered by Kunena Forum