Java Question DynamSoft Wrapper - Question

Hello Everyone,

Im working to wrapper the barcode lib from DynamSoft

I´m basing in @Johan Schoeman wrappers trying to copy the structures and using notepad++ and SLC

I couldn´t upload here the libs due to file size limits, but the download can made in the link : Dynamsoft Doc & Libs and API Reference

I´m newbie in java and It seems part of the code is not accept because has lamda expressions:



I need some help to convert this lamdba expression to regular java, example:

lambda code:
            public void DBRLicenseVerificationCallback(boolean isSuccessful, Exception e) {
                requireActivity().runOnUiThread(() -> {
                    if (!isSuccessful) {
                        e.printStackTrace();
                        showErrorDialog(e.getMessage());
                    }
                });
            }

thanks
 

Attachments

  • DynamSoft_lib.zip
    35.9 KB · Views: 216
Last edited:


Hello Everybody,

I was able to solve this problem with the code bellow (I´m not sure if it is correct)

B4X:
 public void DBRLicenseVerificationCallback(boolean isSuccessful, Exception e) {
                runOnUiThread(new Runnable() {

                    @Override
                    public void requireActivity() {
                        if (!isSuccessful) {
                            e.printStackTrace();
                            showErrorDialog(e.getMessage());
                        }
                    }
                   
                });

Now I saw that I have a lot of another lambda expressions, is there a way to convert the code automatically? or is there a way to run with source 8 in the SLC? ideas?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…