Users Pricing

forum

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

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

Anonymous User 2175 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

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md