Menu

Create Launcher Android app


For instance, I'll do with my app named MZA

Step 1: Copy MZA app to directory /mydroid/packages/apps/

Step 2: Create Android.mk file with content
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := libarity android-support-v4 guava \
                                                              android-support-v13 \
                                                                     android-support-v4 
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_NAME := MZA
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
Step 3: Modify AndroidManifest.xml of Launcher2 application
             <intent-filter>
                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
-              <category android:name="android.intent.category.HOME" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.MONKEY"/> 

            </intent-filter>

Step 4: Modify AndroidManifest.xml of MZA application
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
+
+                <category android:name="android.intent.category.HOME" />
+                <category android:name="android.intent.category.DEFAULT" />

            </intent-filter> 

Step 5: Rebuild Android.

Note: Need to ensure all the picture need for app is in /Mza/res/drawable-* directories.

Không có nhận xét nào :

Đăng nhận xét