Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5931431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:41:37+00:00 2026-05-22T14:41:37+00:00

I am trying to create a feature in my Android App which will let

  • 0

I am trying to create a feature in my Android App which will let users share the link to my app in android market to whoever they want to email it to.

In preferences.xml I have created this as below

<PreferenceScreen
            android:title="Share the App" 
            android:summary="Share the App with your friends.">

        <intent android:action="" />

</PreferenceScreen>

I am not sure what intent should I put here and how I do I handle it when Share the App is clicked in PreferenceScreen. I want to open Email and pre-populate it with a subject and the Android Market link of the App in the subject.

The user will enter the email and send it to their friends.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:41:38+00:00Added an answer on May 22, 2026 at 2:41 pm

    Here is what I did and it worked.

    preferences.xml

    <PreferenceScreen
                android:title="Share the App" 
                android:summary="Share the App with your Friends.">
    
            <intent android:action="myapp.action.SHARE_APP" />
    
    </PreferenceScreen>
    

    Then I added this to the AndroidManifest.xml

    <activity android:name=".ShareApp"
          android:theme="@style/Theme.MyApp">
          <intent-filter>
            <action android:name="myapp.action.SHARE_APP" />
            <category android:name="android.intent.category.DEFAULT"/>                      
          </intent-filter>
    </activity>
    

    Then I created a ShareApp.java and added the code here.

    public class ShareApp extends UrSettings {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("text/plain"); 
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Hey there! Cheers!");
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Try MyApp!"); 
            startActivity(emailIntent);  
            super.onCreate(savedInstanceState);
        }
    }
    

    And it worked!! By the way the UrSettings class is extended from PreferenceActivity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a forgot password feature which will expire the link
I've been trying to create a proper Restart feature within my app, which doesn't
I'm trying to create a somewhat complex sorting feature which neither uses divs nor
I am trying to create a WiX custom action which will allow me to
I'm trying to create a social-network like feature in an app I'm building, and
I am trying to create a feature which essentially amounts to a Facebook style
I am trying to create a splitView in Android programmatically. This feature is completely
I'm trying to create a feature in my program that allows users to download
I am trying to create an app with a built in chat feature. I
I'm trying to make an Android app, and the feature that I'm working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.