android multiple activity declaration in manifest

Posted by Brahadeesh on Stack Overflow See other posts from Stack Overflow or by Brahadeesh
Published on 2011-01-14T20:42:34Z Indexed on 2011/01/14 20:54 UTC
Read the original article Hit count: 400

Hi all. I have a main activity. From it, I am calling 2 other sub activities called FacebookLogin and Twitterlogin. I am using the following code in AndroidManufest.xml:

.....
<activity android:name=".*****" android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>
    <activity android:name=".FacebookLogin" android:label="string/app_name">
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="image/*" />
        </intent-filter>
    </activity>
    <activity android:name=".TwitterLogin" android:label="string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.VIEW"></action>
            <category android:name="android.intent.category.DEFAULT"></category>
            <category android:name="android.intent.category.BROWSABLE"></category>
            <data android:scheme="yourapp" android:host="twitt"></data>
        </intent-filter>
    </activity>
.....

Am i doing it right? Should i nest the FacebookLogin and TwitterLogin activities in the main activity? The aforesaid 2 classes are in the package com.examples.. * is the same wherever used.

© Stack Overflow or respective owner

Related posts about android

Related posts about activity