I writing an Android UI. Everything is working except updationg rectangles. A single call to update a rectangle causes the app to stop with an error message on the phone.I am using Android V 7.0, Simblee 1.1.3. Here is the update fragment.

Need more info. Can't tell what you are doing with just those calls. So have to guess. For example if your ssWidth is mean to be the width of you bar indicator(assuming you are using the rectangle as a bar graph. Then perhaps you have it in the wrong location. The fifth field is the height of the rectangle. The forth field is the width of the rectangle. So, I don't, perhaps you are exceeding the range. Just guessing. How about posting a complet sketch that should work if the two lines worked. In other words, don't need the whole project... Just a test script to get just this part your project tested out.

.This is based on the SimbleeUITest example.ssIndicatorField is a global type uint8_t.Same results as before: if the updateRect is commented out the code runs indefinitely, otherwise it stops after a few seconds when the debug 1 screen is displayed. I see a red rectangle on the screen.

void createScreen1(){ // // Portrait mode is the default, so that isn't required // here, but shown for completeness. LANDSCAPE could be // used for that orientation. // SimbleeForMobile.beginScreen(YELLOW, PORTRAIT);

Some minor things first...1). The spec defines IDs as 'uint8_t'. Don't know why many examples are still using 'int' and have not been corrected, yet.2). SimbleeForMobile.domain should use your own domain or other than Simblee.com's.

But your problem is you are trying to update/draw your bargraph when you are not in the screen it is in. Thus the crash.So be sure to test that you are in the screen of the rectangle you are wanting to change. if (SimbleeForMobile.updatable && currentScreen == 1){Also, be sure your coordinates don't overwrite other objects or go off screen. I moved yours bargraph down below the button.

I've made the changes as you suggested, but still the same crash. It does happen when the updateRect() occurs. I can change the color of the rectangle, but when I update the rectangle the crash happens. Here is the updated code:

void createScreen1(){ // // Portrait mode is the default, so that isn't required // here, but shown for completeness. LANDSCAPE could be // used for that orientation. // SimbleeForMobile.beginScreen(YELLOW, PORTRAIT);

Since you really just wanted to change the width of the bargraph use...

SimbleeForMobile.updateW(ss, width);I know this works.

Also, just thought, you are updating in the loop and would seem to be at a too high rate forthe SimbleeForMobile.process();

So need to scheme how to update the bargraph at a slower rate.Could put delay(200) after the updateW, but being in the loop that slows down response to/from phone.

So best to use a update routine using millis and millisLast examples.

Don't know why SimbleForMobile.updateRect is not working so well. Perhaps way too many things to update in the loop too often.Don't really need it since you can update just what needs to be updated. Other than that, I suggest calling RFdigital to get their attention on the matter.