GUI in the TympanRemote App

I used JSON object to generate GUI on Android and it works great for buttons. However, I wonder how to display a changing number on android app. For example, for Gain Seetings (high, mid, low),I want to know current gain for high and display it on the screen. Every time I touch ~+, the current gain changes accordingly.

Thanks much in advance.


I’ve updated the example, 01-BasicGain_wApp, to show an indicator for digital gain. You can see what I added by viewing the recent commit:

An indicator is a button that doesn’t do anything. To update the label of the button, use the following line:

myTympan.println(“TEXT=BTN:” + btnId + “:”+text);

If you are running into trouble, enter ‘j’ to print out the JSON-like serial command that sets up the App’s interface. For the example above, the print statement is shown (with indentions and line breaks added). You can always resort to sending this command as one string instead of using the (TympanRemnoteFormatter.h library. Careful of all the brackets and braces!

    cards':[{'name':'Change Loudness',
        'buttons': [{'label':'-','cmd':'K','id':'minusButton','width':'4'},