Thursday, March 27, 2014

Jump-value before android application


Application A jump to the application B, the possibility of this process will carry parameters,
For example: Application A will age, name-value application B to display.
If you could ask is how to achieve?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The following should be
 
intent.putExtra ("Age", "12");
startActivity (intent);




. getIntent () getStringExtra ("type");
Reply:
cited a floor guoyoulei520 reply:
following should be
 
intent.putExtra ("Age", "12");
startActivity (intent);




getIntent () getStringExtra ("type");.

type replaced by Age
Reply:

Send:
Intent it = new Intent ();
it.putExtra ("age", "12");


Receive:
Stirng age = getIntent.getExtras.getString ("age");

No comments:

Post a Comment