Hello everybody!
I send information from application A to application B (written in Java) with values of type Int all ok, but my string values: Username and Password in application B is always null.
Code Application A:
public void MakeReport(int jobId, int jobType)
{
var intent = Android.App.Application.Context.PackageManager.GetLaunchIntentForPackage(AppBundle);
if (intent is null)
throw new NullReferenceException();
// Set Data
intent.PutExtra(UsernameMessage, javaUsername);
intent.PutExtra(PasswordMessage, javaPassword);
intent.PutExtra(JobIdMessage, jobId);
intent.PutExtra(JobTypeMessage, jobType);
// Test All OK
string usernameTest = intent.GetStringExtra("USER_NAME_FROM_MDO_SCHEDULE");
string passwordTest = intent.GetStringExtra("USER_PASSWORD_FROM_MDO_SCHEDULE");
int jobIdTest = intent.GetIntExtra("JOB_ID_FROM_MDO_SCHEDULE", -1);
int jobTypeTest = intent.GetIntExtra("JOB_TYPE_FROM_MDO_SCHEDULE", 0);
Forms.Context.StartActivity(intent);
}
#endregion
Code Application B:
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
initLoginPopup();
String login = intent.getStringExtra("USER_NAME_FROM_MDO_SCHEDULE");
String password = intent.getStringExtra("USER_PASSWORD_FROM_MDO_SCHEDULE");
int jobType = intent.getIntExtra("JOB_TYPE_FROM_MDO_SCHEDULE", 0);
int jobId = intent.getIntExtra("JOB_ID_FROM_MDO_SCHEDULE", 0);
loginFromMdoSchedule(login, password, jobType, jobId).start();
}
E/EXTRAS: [JOB_ID_FROM_MDO_SCHEDULE=0]
[USER_NAME_FROM_MDO_SCHEDULE=null]
[USER_PASSWORD_FROM_MDO_SCHEDULE=null]
[JOB_TYPE_FROM_MDO_SCHEDULE=2]
E/END@@@@: Dumping Intent end