Android: Register activity of different packages

Source: Internet
Author: User

As we all know, an Android Application usually has multiple activities, and multiple activities communicate through intent. To make every activity "Born" normal, it must be androidmanifest. XML registration. The bold part below indicates that the full path of an instance to be registered is (Package ):Com. lql. Bill. billqueryactivity

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"    package="com.lql.bill"    android:versionCode="1"    android:versionName="1.0" >    <uses-sdk android:minSdkVersion="7" />    <application        android:icon="@drawable/app_logo"        android:label="@string/app_name" >        <activity            android:name=".BillQueryActivity"            android:label="@string/app_name"             android:theme="@style/title">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>            </application>    <uses-permission android:name="android.permission.INTERNET"/>    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/></manifest>

For a different package, we just add the similar one: the key is to write the path to: COM. lql. corresponding to different package names. xxxactivity

     <activity            android:name="com.lql.diffrentPackage.BillQueryActivity"            android:label="@string/app_name"             android:theme="@style/title">        </activity>

This is a logcat output error. An activity is not registered. OK. Proceed...

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.