How to pass a parameter to an application that I call from my Application?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You're starting your other activity with an Intent. It should look similar to this code:
Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
startActivity(intent);
Then you can add a line of code to pass parameters (e.g. Strings):
intent.putExtras("key", "value");
Note: you should add this line before starting the activity ;)