title: android firebase saving app setting
body: <p>I'm developing ad Android app, using Firebase as db.</p>
  
  <p>In this app there's the possibility to add buttons in the main activity.
  I need to save this information in the db so that if a user adds a button, when he close the app and reopen it, he founds the button added and working.</p>
  
  <p>I need to save it on the local db and on the online db 'cause a user could access the app from another device (but with the same user/pass) and he need to find the buttons added.</p>
  
  <p>How can I do it?</p>
  
  <p>Thanks</p>
  
  <p>Edit:
  I use this method to add the buttons in the activity</p>
  
  <pre><code>public void addNewUnity(String unityType, String unityName) {
      Button btnUnity = new Button(this);
      btnUnity.setText(unityName + " " + unityType);
  
      LinearLayout ll = (LinearLayout)findViewById(R.id.mainActivityUnityLayout);
      LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
      ll.addView(btnUnity, lp);
  
      //TODO Saving button (with text) in the db
  }
  </code></pre>