I have created a library project with one activity. I have given reference of this library project to my Main Project. I am trying to call Activity of Library Project with some extras through intent. But I am getting null pointer exception while retrieving getIntent.getExtras in Library Project. Any idea how to do this?
I am starting activity of Library Project like below:
Intent intent = new Intent(activity,com.***.***.LibActivity.class);
intent.putExtra("key", "abcds");
activity.startActivity(intent);
And I am trying to retrieve the key in LibActivity (Which is in library project) like below:
getIntent().getExtras().getString("key") -->Throwing null pointer exception at this line
I have added this activity to my Main Projects manifest.