Tell me this question: class B stores data in SharedPreferences :
public SharedPreferences mPreferencesregistr = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mPreferencesregistr = getSharedPreferences("firstrun", Context.MODE_PRIVATE); if (!issaveFiiled()) { mPreferencesregistr.edit().putBoolean("firstrun", true).apply(); SaveData.this.finish(); } } in class A you need to check:
if (mPreferencesregistr.getBoolean("firstrun", false)) { uploadImage(); } else{//условие} How to get the value of the variable mPreferencesregistr if mPreferencesregistr in another class
SharedPreferenceswith the same parameters (mPreferencesregistr = getSharedPreferences("firstrun", Context.MODE_PRIVATE);) and access it. - pavlofff