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

  • Home
  • SEARCH
  • 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 947563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:06:02+00:00 2026-05-15T23:06:02+00:00

In my android application, I create shortcuts by code to some activities within my

  • 0

In my android application, I create shortcuts by code to some activities within my application. I do this feature by using the broadcast:

    intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
    sendBroadcast(intent);

and that’s cool, that really work!

Now I would like to do something different: I have seen that some actions can “register” somewhere to be added in the Android menu, when you long press on the Home like this one:

http://www.androidtapp.com/wp-content/uploads/2010/02/UltimateFaves-Add-Home-Screen-Shortcut.jpg

So my main question is the next one:

How is that possible to register for this menu. I guess there is some line to add in the manifest, but cannot see where to do that!

Thank a lot for any help!

BTW, there is a secondary question: once i will have succeed doing that, may I add a different number of shortcuts in my menu ( imagine That I would like to do that for a multi-account twitter client, I would like to see a different for each twitter account in this list.) So the number of shortcut is programmaticaly computed.

  • 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-15T23:06:03+00:00Added an answer on May 15, 2026 at 11:06 pm

    Just found my answer in the SDK samples:

        <!-- This section of sample code shows how your application can add shortcuts to -->
        <!-- the launcher (home screen).  Shortcuts have a three step life cycle. -->
    
        <!-- 1.  Your application offers to provide shortcuts to the launcher.  When -->
        <!--     the user installs a shortcut, an activity within your application -->
        <!--     generates the actual shortcut and returns it to the launcher, where it -->
        <!--     is shown to the user as an icon. -->
    
        <!-- 2.  Any time the user clicks on an installed shortcut, an intent is sent. -->
        <!--     Typically this would then be handled as necessary by an activity within -->
        <!--     your application. -->
    
        <!-- 3.  The shortcut is deleted.  There is no notification to your application. -->
    
        <!-- In order provide shortcuts from your application, you provide three things: -->
    
        <!-- 1.  An intent-filter declaring your ability to provide shortcuts -->
        <!-- 2.  Code within the activity to provide the shortcuts as requested -->
        <!-- 3.  Code elsewhere within your activity, if appropriate, to receive -->
        <!--     intents from the shortcut itself. -->
    
        <activity android:name=".LauncherShortcuts"
                  android:label="launchers">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.SAMPLE_CODE" />
            </intent-filter>
    
        </activity>
    
        <!-- It is recommended that you use an activity-alias to provide the "CREATE_SHORTCUT" -->
        <!-- intent-filter.  This gives you a way to set the text (and optionally the -->
        <!-- icon) that will be seen in the launcher's create-shortcut user interface. -->
    
        <activity-alias android:name=".CreateShortcuts"
            android:targetActivity=".LauncherShortcuts"
            android:label="test">
    
            <!--  This intent-filter allows your shortcuts to be created in the launcher. -->
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I changed some code on an android application that was working perfectly fine at
Below is My code to create a shortcut to a selected application. I have
Possible Duplicates: how to create startup application in android? How to Autostart an Android
I create an android application. I need the check, how my application is working
in my Android application the file with name mainout.xml is creating, where ever this
I am trying to create an application which reads data from digital compass. I
I'm working on an Android Application for AutiPlan, which is a web-based planner tool
I have a android webservice client application. I am trying to use the java
Is it possible to deploy an Android application to the google app engine environment?
I have a service running on my android application, the service is a socket

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.