1

i'm developing an android app. i have all my apps installed and working. now i need to set my main app as the defualt app and run it on bootup.

does anyone knows how can i do that?

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call my-dir/src/)

LOCAL_PACKAGE_NAME := BLT

include $(BUILD_PACKAGE)
Jake1164
  • 12,291
  • 6
  • 47
  • 64
omri
  • 595
  • 1
  • 5
  • 13
  • 1
    The default app? Hmm not sure, have you looked for `/etc/inittab` on the FS? If you don't use that then the user might have to choose "use by default" when selecting from a list of apps registered to handle the content you are opening. – John Jun 11 '12 at 15:27
  • When you say the default app do you actually mean replacing the home screen application? – Dazzy_G Jun 12 '12 at 09:01

2 Answers2

0

This is not possibe without hacks on a rooted phone for security. Android does not allow an app to set itself as the default without user confirmation.

Simon
  • 14,407
  • 8
  • 46
  • 61
  • i know for sure you can. there is a file name packages.xml located at /date/system, i can change him manualy so that my app will load on startup but whati dont know is how to configure it in the building of the android system. – omri Jun 12 '12 at 07:31
  • That was my point. This is undocumented, and therefore a hack, and can only be accomplished on a rooted device. – Simon Jun 12 '12 at 19:32
0

If you add the line:

LOCAL_OVERRIDES_PACKAGES := Launcher2

to your Android.mk file, then Launcher2 (the default home screen) will not be included in your final image. You'll need to fix up your AndroidManifest.xml like so (Use my own Android app/apk as launcher/Home Screen Replacement), but when you install the image and boot the phone, your app will be the default home screen app.

Hope this helps!

Community
  • 1
  • 1
ZachM
  • 893
  • 2
  • 8
  • 22