title: Passing the selected string by radiobutton to another activity
body: <p>I'm new here and also in android developing
  I'm making a news app which should change the url (from the news will be fetch) when the radio button is selected from the settings activity .</p>
  
  <p>Settings activity have two radio button for English and for Hindi .</p>
  
  <p>Here is LaunchActivity.java ( The method in which i want the string)
  In fetchBloodGroup() method i want to pass the string in place of <strong>APIConfig.Hindi</strong></p>
  
  <pre><code>public void fetchBloodGroup() {
          if (mActivity.customMethods.isNetworkAvailable(mActivity)) {
              //mActivity.showHideProgressDialog(R.string.show_progress_dialog);
              StringRequest stringRequest = new StringRequest(Request.Method.GET,APIConfig.Hindi, new com.android.volley.Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
  
                      Log.d("lkghldg", response);
  
  
                      try {
                          JSONObject mainJsonObject = new JSONObject(response);
  
                          JSONArray jsonArrayArticles = mainJsonObject.getJSONArray("items");
  
  
                          for (int i = 0; i &lt; jsonArrayArticles.length(); i++) {
  
                              NewsModel newsModel = new NewsModel();
                              JSONObject jsonObject = jsonArrayArticles.getJSONObject(i);
  
  
  
  
  
  
  
                              newsModel.setAuthor(jsonObject.getString("author"));
                              newsModel.setTime(jsonObject.getString("pubDate"));
  
  
                              newsModel.setTitle(jsonObject.getString("title"));
                              newsModel.setDescription(jsonObject.getString("description"));
                              newsModel.setImage(jsonObject.getString("thumbnail"));
                              newsModel.setUrl(jsonObject.getString("link"));
  
  
                              newsList.add(newsModel);
  
  
                          }
  
  
                          adapter = new VerticlePagerAdapter(mActivity, newsList);
                          verticleViewPager.setAdapter(adapter);
                      } catch (JSONException e) {
                          e.printStackTrace();
                      }
  
  
                  }
              }, new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
  
                  }
              }) {
  
              };
  
              stringRequest.setShouldCache(false);
              stringRequest.setRetryPolicy(new DefaultRetryPolicy(3000, 2, 2f));
              RequestQueue requestQueue = Volley.newRequestQueue(mActivity);
              requestQueue.add(stringRequest);
  
  
          } else {
              //   Snackbar.make(mActivity.coordinatorLayout, R.string.no_internet_connection, Snackbar.LENGTH_LONG).show();
  
              Toast.makeText(getActivity(), "No internet connection", Toast.LENGTH_LONG).show();
  
          }
  
  
      }
  </code></pre>
  
  <p>Here is the Settings.java Activity from i wanted the desired string to pass when radio button is selected</p>
  
  <pre><code>package com.santoshkumar.newsinshorts.Activities;
  import android.os.Bundle;
  import android.widget.RadioGroup;
  import androidx.appcompat.app.ActionBar;
  import androidx.appcompat.app.AppCompatActivity;
  import com.santoshkumar.newsinshorts.R;
  
  public class Settings extends AppCompatActivity {
  
      private RadioGroup radiolanguage;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.settings_activity);
          getSupportFragmentManager()
                  .beginTransaction()
                  .commit();
          ActionBar actionBar = getSupportActionBar();
          if (actionBar != null) {
              actionBar.setDisplayHomeAsUpEnabled(true);
          }
  
          radiolanguage = (RadioGroup) findViewById(R.id.radiolanguage);
          radiolanguage.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
          {
              @Override
              public void onCheckedChanged(RadioGroup group, int checkedId)
              {
                  switch(checkedId)
                  {
                      case R.id.radio_eng:
                          break;
                      case R.id.radio_hindi:
                          break;
                      default:
                  }
              }
          });
  
  
      }
  
  
  
  }
  </code></pre>
  
  <p>In each case there will be separate string</p>
  
  <p>Please help me 
  Any type of help will be appreciated
  Thanks in advance</p>