Even if you have created the best app ever, you will not be successful unless you tell the world that it exists.
One of the options is to add a functionality that will let the users to share a link to your game via Facebook, e-mail, sms or any other service that they have installed on their phone:
The code for Android for opening this window is as follows:
Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, "TEXT_TO_SHARE"); startActivity(intent);
Sometimes you can encounter additional line of code:
however, unfortunately, it is not working with Facebook – the code has no effect.
←Table of contents
←My apps, games and other projects