Hi all,
I have a google maps application in android. This application has two activities, Activity 1 is used to display map of user's current location, and permits user to input some text to search. Activity 2 is used to display the results on the map.
In activity 1, I have some code to call Activity 2 as following:
public void onClick(View v) {
// get inputed information
requiredValue = textField.getText().toString();
// initiate new Activity
Intent intent = new Intent(Intent.ACTION_VIEW);
// bun is a tool to pass parameters to other Activity
Bundle bun = new Bundle();
double[] coordinate = { latitude, longtitude };
bun.putDoubleArray("coordinate", coordinate);
bun.putString("requiredShopName", requiredValue);
intent.setClass(this, SaleInformation.class);
intent.putExtras(bun);
startActivity(intent);
finish();
}
After clicking Search button, everything works well, the results is displayed on map. That means that Acvitiy 2 has done. But when i search again, after clicking Search button, nothing happens. I guess that both Activity 1 and 2 has died.
Please tell me how to resolve this problem?
Thanks