How to send url from one activity to another with different click actions (multiple buttons)? I tried to use intent.putextra
but I can not resort to the urls of the other buttons, in the case I am using two activities the second this with webview I ran with loadurl, but as I said I can only make a button work, and I do not know how to receive the others in the same activity.
submitting like this:
Home.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(inicio.this,INSMainActivity.class);
intent.putExtra("hiphop", "https://m.youtube.com/channel/UCUnSTiCHiHgZA9NQUG6lZkQ");
startActivity(intent);
}
});
receiving:
String url = getIntent().getExtras().getString("hiphop");
youtubeView = (WebView) findViewById(R.id.youtube_view);
youtubeView.loadUrl(url);
As seen in the code I'm trying to load genres from the first activity.