-2

im using my own launcher i take this launcher app from github https://github.com/strider2023/Black-Launcher--Android- is install launcher in phone but i also wants to add my application in launcher so when launcher install my application also install inside launcher and automatically my app start after launcher start. this is launcher manifist file below my appplication class file is MainActivity.java how do i start my application after start launcher???

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.touchmentapps.black"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15"/>

<permission
    android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal" />

<permission
    android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal"/>

<permission
    android:name="com.android.launcher.permission.READ_SETTINGS"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal"/>

<permission
    android:name="com.android.launcher.permission.WRITE_SETTINGS"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal"/>

<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />

 <application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:hardwareAccelerated="true"
    android:largeHeap="true">
    <activity
        android:name=".BlackLauncherActivity"
        android:launchMode="singleTask"
        android:clearTaskOnLaunch="true"
        android:stateNotNeeded="true"
        android:windowSoftInputMode="adjustPan"
        android:theme="@style/Theme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.HOME" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.MONKEY"/>
        </intent-filter>
    </activity>
    <activity android:name=".Activity2"/>
</application>


   </manifest>
Smart Guy
  • 9
  • 5

1 Answers1

0

As far as i understand your question, you want to see your app displayed in the launcher ?

This is related to intent-filters : http://developer.android.com/guide/components/intents-filters.html

Black launcher looks for applications that are flagged as being "LAUNCHER" applications. As you can see in their code here : https://github.com/strider2023/Black-Launcher--Android-/blob/master/Black%20Launcher/src/com/touchmentapps/black/functions/AppInfoHandlerFunctions.java

You have to add your activity tag in your Manifest file and include the LAUNCHER category.

<activity
        android:name=".MyActivity"
        android:launchMode="singleTask"
        android:clearTaskOnLaunch="true"
        android:stateNotNeeded="true"
        android:windowSoftInputMode="adjustPan"
        android:theme="@style/Theme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
ehanoc
  • 2,187
  • 18
  • 23
  • im using this manifiest of blacklauncher just tell me how do i add my Mainactivity.java file in this manifiest?? – Smart Guy Jun 18 '13 at 09:53
  • @SmartGuy just add the activity xml tag to your manifest , as described above. Black Launcher will look for activities with the category LAUNCHER to display. – ehanoc Jun 18 '13 at 10:23
  • @SmartGuy, you don't add this to the blacklauncher's manifest, but to YOUR application's manifest! – ehanoc Jun 18 '13 at 10:38