Please can you help out with this: I pass a bundle via an intent and need to display it on a textview,but I am unable to get any display on my textview. The code is :
Intent part of the code:
if(result != null)
{
Intent tokenIntent = new Intent(mContext, tokenActivity.class);
Bundle bundle = new Bundle();
bundle.putString("responsedata",result);
tokenIntent.putExtras(bundle);
startActivity(tokenIntent);
}
Activity receiving the intent:
TextView response;
Bundle bundle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
response=(TextView)findViewById(R.id.texter);
bundle = getIntent().getExtras();
response.setText(bundle.getString("responsedata"));
// sampletext.setText(result);
}