[Solved] How to pass a text from one activity to all activities?


Just store the text as string in shared preferences and then get the string in other activities.. or you can also use broadcast receiver in all other activities. But first all the activities should call the receiver first then the MainActivity can send the text.
In MainActivity,

this.getSharedPreferences("MyPrefName", Context.MODE_PRIVATE).edit().putString("parsetext","yourtext").apply();

and in the other activities..

this.getSharedPreferences("MyPrefName", Context.MODE_PRIVATE).getString("parsetext","");

3

solved How to pass a text from one activity to all activities?