Question about multi package in AndroidManifest

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Question about multi package in AndroidManifest

Postby nirvanakai » Sat Dec 29, 2007 2:28 pm

Hi: All

If I have 2 activities in different package what can I do ??
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="googleChallenge.OOXX"> <==== In AndroidManifest only one package can be set there


Thanks
nirvanakai
Freshman
Freshman
 
Posts: 2
Joined: Sat Dec 29, 2007 2:18 pm

Top

Postby faldureon » Thu Jan 03, 2008 4:06 am

You need to specify the parent package that contains the packages which contain all of your activities. Then you refer to your activities as normal java classes with the . operator.

Here is the android manifest of my own android contest entry, it has a package of activities called org.technocore.ui which has a subpackage of activities called org.technocore.ui.shareable
I refer to the activities in the org.technocore.ui.shareable package by putting a ".shareable." in front of the activity name

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    package="org.technocore.ui">
  6.  
  7.     <uses-permission id="android.permission.READ_CONTACTS"/>
  8.  
  9.     <uses-permission id="android.permission.CALL_PHONE"/>
  10.  
  11.     <application android:icon="@drawable/icon">
  12.  
  13.         <activity class=".Geocast" android:label="@string/main_title">
  14.  
  15.             <intent-filter>
  16.  
  17.                 <action android:value="android.intent.action.MAIN" />
  18.  
  19.                 <category android:value="android.intent.category.LAUNCHER" />
  20.  
  21.             </intent-filter>
  22.  
  23.         </activity>
  24.  
  25.         <activity class=".GeocastMap" android:label="@string/map_title">
  26.  
  27.             <intent-filter>
  28.  
  29.                 <action android:value="android.intent.action.VIEW" />
  30.  
  31.                 <category android:value="android.intent.category.DEFAULT" />
  32.  
  33.             </intent-filter>
  34.  
  35.         </activity>
  36.  
  37.         <activity class=".PictureCapturer" android:label="Picture Capturer">
  38.  
  39.             <intent-filter>
  40.  
  41.                 <action android:value="android.intent.action.VIEW" />
  42.  
  43.                 <category android:value="android.intent.category.DEFAULT" />
  44.  
  45.             </intent-filter>
  46.  
  47.         </activity>
  48.  
  49.         <activity class=".shareable.ShareableFullView" android:label="Shareable View">
  50.  
  51.             <intent-filter>
  52.  
  53.                 <action android:value="android.intent.action.VIEW" />
  54.  
  55.                 <category android:value="android.intent.category.DEFAULT" />
  56.  
  57.             </intent-filter>
  58.  
  59.         </activity>
  60.  
  61.     </application>
  62.  
  63. </manifest>
  64.  
  65.  
Parsed in 0.006 seconds, using GeSHi 1.0.8.4
faldureon
Developer
Developer
 
Posts: 27
Joined: Sun Dec 02, 2007 10:19 pm

Postby nirvanakai » Thu Jan 03, 2008 5:08 am

Got it !!

Thanks a lot
nirvanakai
Freshman
Freshman
 
Posts: 2
Joined: Sat Dec 29, 2007 2:18 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 6 guests