I have been trying to send data from my main project to my library project. My library project is defined in main project so no problem of adding dependency of lib project.one more thread I have found similar to my problem but no luck so far...thread
GetUserprofile is the main project's activity and LockscreenActivity is library project's activity.
I have written code on the main project side
Intent myIntent = null;
try {
myIntent = new Intent(GetUserprofile.this,LockscreenActivity.class);
myIntent.putExtra("examiddetails",exam_id);
startActivity(myIntent);
} catch (Exception e) {
e.printStackTrace();
}
Now I am getting the data which is examiddetails on the library project by using below code
Intent intent = getIntent();
try{
if(intent != null){
String Examid = intent.getStringExtra("examiddetails");
}
}catch(Exception e){
System.out.println("getdataFromService exception"+e.toString());
}
I am getting null value of Examid String on the library project.