iink SDK on Device

Can't save after switching language

Can't save after switching language。   

private void save() {
        Log.e(TAG, "save");
        if (currentPackage == null || currentPackage.isClosed()) {
            Log.e(TAG, "ContentPackage has been saved!");
        } else {
            try {
                currentPackage.save();
            } catch (IOException e) {
                e.printStackTrace();
                Log.e(TAG, "save error");
            }
        }

        if (currentPart != null) {
            currentPart.close();
        }
        if (currentPackage != null) {
            currentPackage.close();
        }
        Log.e(TAG, "save end");
    }

 

    private void changeLanguage( String language) {
        currentPackage.removePart(currentPart);
        configuration.setString("lang", language);
        currentPart = currentPackage.createPart("Raw Content");
        editor.setPart(currentPart);
    }

  

image


1 Comment

Dear Hedy,


thank you for contacting us.


Currently, the language of a content package is set when creating it. It is not possible to change the language of a content package that was previously created.


This is likely the reason you are facing this exception.


Best regards,


Olivier