Users Pricing

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 User 2057 15 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! 

I am a content writter !


1 Answers