iink SDK on Device

Answered

Upgrade to 1.2

Hello,

I'm having trouble upgrading to iink 1.2 in Android Studio. I updated gradle files, synced project, the found the resource and configuration files gone. After restoring them from backup, I got an error about the resources not being able to be loaded. 

On the "Migrate" page, I read: "To support the new languages in your native application, you need to re-download your application certificate from your dashboard. The updated certificate will enable recognition of these languages."

I don't need new languages, but I thought that perhaps the old language files no longer work with the new library, so I re-downloaded the language resource files and the new certificate. Now I get the following error with both my old and new certificates:

java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.IllegalArgumentException: invalid certificate

Any ideas?


Best Answer

Dear Rev,


thank you for your questions.


First, as the 1.2 release of the iink includes 6 new languages, this indeed implies that the certificate is updated to use these new ones. This also implies a "one connection" to the internet, so that new certificate is enabled.


Regarding the second issue, based on the error message, I would say your .conf file is not properly formatted. Indeed, indentation has to be properly respected. Is it possible you attach it (the whole file, not a text copy, so that indent is kept)?


Also, regarding both resources LocalDictionary.rez and Subset.rez, can you confirm these are compiled using the Resource builder tool. Is there a reason you name these "*.rez"? Can you name these as .res? Also, in your .conf file, when removing both lines, are you still getting an error message?


Indeed, based on our tests, you should not face any issue with the 1.2 resources, so I am trying to figure out what could cause this behavior!


Best regards,


Olivier


UPDATE: 

I figured out the certificate error—new certificate just needed wifi enabled to set up for the first time.

I'm still getting the following error, however:

 

06-25 14:40:00.693 8590-8824/... E/SmartGuideView: Failed to edit block "1": IO_FAILURE: error: AddResource en_US/en_US-ak-cur.res failed
                                                                       error: failed to read configuration script
                                                                       script exits with 2 errors
06-25 14:40:00.699 8590-8824/... E/SmartGuideView: Failed to edit block "1": IO_FAILURE: error: AddResource en_US/en_US-ak-cur.res failed
                                                                       error: failed to read configuration script
                                                                       script exits with 2 errors

 en_US.conf:

  

Bundle-Version: 1.0
Bundle-Name: en_US
Configuration-Script:
 AddResDir ../resources/

Name: text
Type: Text
Configuration-Script:
 AddResource en_US/en_US-ak-cur.res
 AddResource en_US/en_US-lk-text.res
 AddResource en_US/LocalDictionary.rez
 AddResource en_US/Subset.rez
 EnableAlienCharacters
 SetTextListSize 1
 SetWordListSize 5
 SetCharListSize 1

 The resources seem to be in place:


image

 

UPDATE #2: The older language resource files seem to work fine.

Answer

Dear Rev,


thank you for your questions.


First, as the 1.2 release of the iink includes 6 new languages, this indeed implies that the certificate is updated to use these new ones. This also implies a "one connection" to the internet, so that new certificate is enabled.


Regarding the second issue, based on the error message, I would say your .conf file is not properly formatted. Indeed, indentation has to be properly respected. Is it possible you attach it (the whole file, not a text copy, so that indent is kept)?


Also, regarding both resources LocalDictionary.rez and Subset.rez, can you confirm these are compiled using the Resource builder tool. Is there a reason you name these "*.rez"? Can you name these as .res? Also, in your .conf file, when removing both lines, are you still getting an error message?


Indeed, based on our tests, you should not face any issue with the 1.2 resources, so I am trying to figure out what could cause this behavior!


Best regards,


Olivier

Got it figured out. I forgot to change the UIReferenceImplementation gradle file. It's looking good now. Thanks!