[Architecture] Problems applying settings on Android

Christoffer Friberg christoffer.friberg at omnitor.se
Wed Jan 14 10:03:07 EST 2015


Hi all, Javi,

I have the framework up and running on Android following these instructions:
https://github.com/GPII/android/blob/master/README.md

I have run into a problem, however. When logging in with user omnitor2 
(https://github.com/GPII/universal/blob/master/testData/preferences/omnitor2.json) 
it does correctly write the settings to the output XML file, but it then 
fails like this before it has a chance to launch the solution):

15:37:35.810:  Settings have not settled to required values - retrying 
read at attempt 11 of 12 in 1000ms
15:37:36.919:  Comparing payload {
   "se.omnitor.ecmobile": [
     {
       "settings": {
         "map": {
           "string": {
             "fontsize": {
               "$t": "50"
             },
             "theme": {
               "$t": "yellow-black"
             }
           }
         }
       }
     }
   ]
} with {
   "se.omnitor.ecmobile": [
     {
       "settings": {
         "map": {
           "string": {
             "fontsize": {
               "$t": 50
             },
             "theme": {
               "$t": "yellow-black"
             }
           }
         }
       }
     }
   ]
} equal: false
15:37:36.920:  Maximum retry count exceeded in settings handler 
gpii.settingsHandlers.XMLHandler at retry 12: rejecting settings action
01-14 15:37:36.926 D/GPIIUserListeners(12199): GPII has returned: 
Failure to read settings for handler gpii.settingsHandlers.XMLHandler as 
written after 12 retries

The only difference between the two is that the top one has fontsize as 
"50" (ie. as a string) and the lower one just has the value 50 (as an 
integer). If I remove font size from the preference set, it works 
without any issues. In the XML settings file the value is correctly 
written as an integer, and it's also written without quotes in the 
preference file. Somewhere along the line it seems that the value is 
read as a string and not converted to an integer. Or, conversely, 
perhaps the integer value has been converted from a strong when it 
shouldn't have.
When the above problem occurs, logging out also does not restore the 
original preferences. I am running with eCmobile as the only entry in 
installedSolutions.json for simplicity's sake.

Any suggestions?

Best regards,
Christoffer


More information about the Architecture mailing list