1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question Base64 encode/decode image library error

Discussion in 'Android Questions' started by Alberto Michelis, Jul 8, 2019.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi, trying to test this library
    https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/
    Using a button and a text field to see the resulting blob2base64.
    Im getting an error in the folowing code:
    Code:
    Sub btnVerBlob64_Click
        
    Log("Pasando " & TesteoPHP.ViendoImagen & " a base64")
        
    Dim B64Str As String = Base64Con.EncodeFromImage(File.DirDefaultExternal, TesteoPHP.ViendoImagen)
        txtBlob64.Text = B64Str
    End Sub
    TesteoPHP.ViendoImagen is the mage name and it really exists.

    The error is :
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String anywheresoftware.b4a.objects.StringUtils.EncodeBase64(byte[])' on a null object reference
     
  2. KMatle

    KMatle Expert Licensed User

    Check the filename (case sensitive)
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. GabrielQ

    GabrielQ Member Licensed User

  5. Erel

    Erel Administrator Staff Member Licensed User

  6. GabrielQ

    GabrielQ Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice