问题
I saw in many apps this.. When you click on a menu, than an other menu show up, and you can share your app VIA e-mail, twitter, bluetooth, facebook, etc.
How can i do this?
回答1:
You can use the SEND intent action to share a market uri pointing to your app.
The chooser will list any installed app that has declared it can share data.
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "App Name");
intent.putExtra(Intent.EXTRA_TEXT, "Check out this cool app http://market.android.com/details?id=com.example.yourpackagename");
Intent chooser = Intent.createChooser(intent, "Tell a friend about App Name");
startActivity(chooser);
来源:https://stackoverflow.com/questions/5558977/android-share-app-via-etc