Android Question libpdfview2.so" not found

Baris Karadeniz

Active Member
Licensed User
I try to download pdf file with the codes below but I receive an log error given below;

java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/app.taksim/files/libpdfview2.so" not found

What is my fault?

B4X:
Sub WebView1_OverrideUrl (Url As String) As Boolean
   If Url.EndsWith(".pdf") Then
      Dim j As HttpJob
      j.Initialize("pdf", Me)
      j.Download(Url)
      Return True
   Else If Url.IndexOf("mailto:") > -1 Then 
     Dim Intent1 As Intent
     Intent1.Initialize(Intent1.ACTION_VIEW, Url)
     StartActivity(Intent1)
     Return True
   Else
     Return False
   End If
End Sub

Sub JobDone (Job As HttpJob)
    Activity.LoadLayout("Layout2")
End Sub
 

Baris Karadeniz

Active Member
Licensed User
I am sorry. Please FORGET the codes ABOVE. The correct codes are given below;

B4X:
Sub WebView1_OverrideUrl (Url As String) As Boolean
   If Url.EndsWith(".pdf") Then
      Dim j As HttpJob
      j.Initialize("pdf", Me)
      j.Download(Url)
      Activity.LoadLayout("Layout2")
      pdfv.init
      Activity.AddView(pdfv,0,0,-1,-1)
      pdfv.getpdf(Url)
      Return True
   Else If Url.IndexOf("mailto:") > -1 Then 
     Dim Intent1 As Intent
     Intent1.Initialize(Intent1.ACTION_VIEW, Url)
     StartActivity(Intent1)
     Return True
   Else
     Return False
   End If
End Sub

Sub JobDone (Job As HttpJob)
    Activity.LoadLayout("Layout2")
End Sub
 
Upvote 0

Baris Karadeniz

Active Member
Licensed User
Yes, I test with real device (Note II). When I press on the pdf file in the pop up menu nothing happens. When I press on the pdf file at the web site I receive errors below;

Installing file.
PackageAdded: package:app.taksim
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/data/app.taksim/files/libpdfview2.so" not found
at java.lang.Runtime.load(Runtime.java:333)
at java.lang.System.load(System.java:512)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at app.taksim.main._webview1_overrideurl(main.java:468)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.WebViewWrapper$1.shouldOverrideUrlLoading(WebViewWrapper.java:64)
at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:293)
at com.android.org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:96)
at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
** Service (httputils2service) Create **
** Service (httputils2service) Start **
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top