How To Add Share Options In Android Application

How To Add Share Options In Android Application

Android is one of the most popular O.S. for mobile. Sharing is an important thing in our lives especially technology and knowledge sharing. If you create a photo editing app, it will share the photos on social media apps after editing. Functionality is the most important thing in Android development. So, I will show you how to add the “Share” option in Android applications using Android Studio. Android is a kernel based operating system that allows users to modify the GUI components and source code.

Follow our steps :

Just copy this code and paste where you need.

Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
String shareBody = "Hurry up , don't worry Get this app and shop from home https://play.google.com/store/apps/details?id=com.mr_gunjan.ecommerce";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Best shopping app");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share via"));



Categories: Android

Tags: ,,,,

Leave A Reply

Your email address will not be published.

error: Alltutorial.in content is protected !!