Q: Firebase: How to make one app hides button for another app I have 2 android apps connected to the same Firebase database, and I want to add a button in the first app to hide another button in the inside the second app.
This is my code on the first app which hides 'btnact' depending on the status of the settings in Remote Config of Firebase:
myconfiguration=FirebaseRemoteConfig.getInstance();
    FirebaseRemoteConfigSettings configuratonsettings = new FirebaseRemoteConfigSettings.Builder().build();
    myconfiguration.setConfigSettings(configuratonsettings);
    Map<String,Object> defaultvalues = new HashMap<>();
    defaultvalues.put("btn_enable",false);
    myconfiguration.setDefaults(defaultvalues);

fetcher.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            myconfiguration.fetch(0).addOnCompleteListener(new OnCompleteListener<Void>() {
                @Override
                public void onComplete(@NonNull Task<Void> task) {
                    if(task.isSuccessful()){
                        myconfiguration.activateFetched();
                        btnact.setEnabled(myconfiguration.getBoolean("btn_enable"));
                    }
                    else
                    {
                        Toast.makeText(MainActivity.this, "Something went Wrong\nPlease try again", Toast.LENGTH_SHORT).show();
                    }
                }
            });
        }
    });

I want a way to change this 'btnact' to the id of the button of the other app.. Can anyone have a clue for it?

A: You can fetch the value of the button you want to hide (boolean value: false or true) inside your second app, then set that button visibility to invisible or gone based on the fetched boolean value.
You can change the value that controls your second app's enabled status/visibility inside your first app.
I don't test this right now, but I think it should work and it is easy to accomplish what you want.
