In Android development, how does one package multiple programs into an APK file, but multiple programs are displayed after the installation is complete?

Source: Internet
Author: User

After reading the Google map of Android, there are three after installing an APK.ProgramPortal icons, which correspond to three different functions! Easy to set

Both the activities respond to the main intent, for example:

<? XML version = "1.0" encoding = "UTF-8 "? >
<Manifest xmlns: Android =" Http :// Schemas.android.com/apk/res/android ";
Package = "com. foobar"
Android: versioncode = "1"
Android: versionname = "1.0" type = "codeph" text = "/codeph">
<Application Android: icon = "@ drawable/icon" Android: Label = "foobar">
<Activity Android: Name = ". foobar1" Android: Label = "foobar1" Android: taskaffinity = ". foobar1" >

<Intent-filter>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category
Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
</Activity>
<Activity Android: Name = ". foobar2" Android: Label = "foobar2" Android: taskaffinity = ". foobar2" >

<Intent-filter>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category
Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
</Activity>
</Application>
<Uses-SDK Android: minsdkversion = "3"/>
</Manifest>

Pay attention to the settings of taskaffinity in the simhei section.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.