forum

Home / DeveloperSection / Forums / how to send value from one class into different classes(more than one class)

how to send value from one class into different classes(more than one class)

Anonymous User173815-May-2013
Hi Everyone!

I have value strUser and KEY ,I want to send this value to multiple different classes because this value will be used in 5 classes for url, I know the way to send value to one class only using Intent.putExtra as bellow :

Intent policy= new Intent(LoginActivity.this,EpolicyListPolis.class);
        policy.putExtra("etUser",strUser);
        policy.putExtra("key",KEY);
        startActivity(policy);
How can I send this value to multiple different classes at a time? can i use SharedPrefences..? how the way i write sharedPrefences in class and my destination class?

Thanks in advance! 

Updated on 15-May-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By