I attended the Mobile Monday meeting “200,000 Apps – Where’s Mine” last night.
One thing that became clear is that apps don’t do a very good job of promoting themselves. One crippling problems with most app stores is that there’s no (easy) way to share an app with a friend.
Here’s some basic code for an Android app which will post the URL of your app to Twitter. Stick it in a button or menu item for easy sharing.
String twitterUri = "http://m.twitter.com/?status="; String marketUri = Uri.encode("http://example.com/?q=app&title=test"); Intent shareOnTwitterIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(twitterUri + marketUri)); startActivity(shareOnTwitterIntent);
Some important things to note.
- This is set to post to the mobile version of Twitter. Your user is on a phone – don’t direct them to a site that won’t work on their device.
- The second string is URI encoded.
- Consider if you want to post a “market://” link. I would advise against it. Twitter won’t render it as a link and, even if it did, 90% of users won’t be able to click on it. Make it a link that will direct desktop users to your website, mobile users to a mobile friendly site and Android users direct to the market.
Facebook also has an API for this sort of sharing.
Again, it points to the mobile site and needs to be URL encoded.