Want my app on Launchers Homescreen

Hey in the Launcher code, I want one app to appear on the home screen, in AndroidManifest.xml

. I wrote these lines:

 <activity 
     android:name=".MyAppTabs" 
     android:theme="@android:style/Theme.NoTitleBar"
     android:label="MyApp"
     android:icon="@drawable/ic_launcher_app">
         <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
 </activity>

      

when adding these lines I get my application on the desktop but it does not start, but using the menu option I can start my application ... Any help ??

Adinging more details .. I have a default_workspace.xml file in the xml folder where I add my application to a favorite tag ...

<favorite
    launcher:packageName="com.android.launcher"
    launcher:className="com.android.launcher.apps.MyAppTabs"
    launcher:screen="3"
    launcher:x="3"
    launcher:y="0" />

      

If any other information is required .. Please tell me.

+3


source to share


1 answer


This can only be achieved for apps that are part of the same app (in this case, your Launcher).



  • You shouldn't run the activity of the app you want to run inside the laucher

  • You should get the parent view that you want to show the applcation,

  • Get the app design as a single view or view group, treat this as a child (this will be a child of the parent launcher view)

  • Add child apllication view to parent panel view.

0


source







All Articles