how to pack all the activities of a project as a single pack

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

how to pack all the activities of a project as a single pack

Postby lakshmanraob » Tue Jul 14, 2009 4:33 am

hi all,
In my application, i found in the emulator that all my activities were spread as a separate application in the emulator. Is there any way, in which i will have a single entity displayed in the emulator.
I do not want to expose my activity classes. I want to distribute my application as a single file not as a bunch of files.
can anybody please help me out.

Thanks in advance
lakshman
lakshmanraob
Junior Developer
Junior Developer
 
Posts: 18
Joined: Mon Mar 23, 2009 8:11 pm

Top

Postby nmc » Tue Jul 14, 2009 11:14 am

open your manifest.xml and remove the intent-filter blocks from all but your main-activity.
nmc
Senior Developer
Senior Developer
 
Posts: 154
Joined: Thu Nov 27, 2008 8:30 pm
Location: Germany

Postby chris.schuette » Tue Jul 14, 2009 11:16 am

my manifest looks like this:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.      package="com.paad.whereami"
  7.  
  8.      android:versionCode="1"
  9.  
  10.      android:versionName="1.0">
  11.  
  12.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  13.  
  14.             <uses-library android:name="com.google.android.maps"/>
  15.  
  16.             <activity android:name=".whereami"
  17.  
  18.                  android:label="@string/app_name">
  19.  
  20.             <intent-filter>
  21.  
  22.                 <action android:name="android.intent.action.MAIN" />
  23.  
  24.                 <category android:name="android.intent.category.LAUNCHER" />
  25.  
  26.             </intent-filter>
  27.  
  28.         </activity>
  29.  
  30.         <activity android:name=".Summary"
  31.  
  32.                  android:label="@string/app_name">
  33.  
  34.             <intent-filter>
  35.  
  36.                 <action android:name="android.intent.action.MAIN" />
  37.  
  38.                 <category android:name="android.intent.category.LAUNCHER" />
  39.  
  40.             </intent-filter>
  41.  
  42.         </activity>
  43.  
  44.     </application>
  45.  
  46.     <uses-sdk android:minSdkVersion="1" />
  47.  
  48.     <uses-permission android:name="android.permission.INTERNET" />
  49.  
  50.     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  51.  
  52. </manifest>
  53.  
  54.  
Parsed in 0.005 seconds, using GeSHi 1.0.8.4


What exactly do I have to remove?
chris.schuette
Freshman
Freshman
 
Posts: 8
Joined: Tue Jul 14, 2009 10:59 am

Postby nmc » Tue Jul 14, 2009 11:32 am

as i said: remove the second intent-filter and see if the emulator shows what you want it to
nmc
Senior Developer
Senior Developer
 
Posts: 154
Joined: Thu Nov 27, 2008 8:30 pm
Location: Germany

Postby chris.schuette » Tue Jul 14, 2009 11:48 am

I changed my manifest to:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.      package="com.paad.whereami"
  7.  
  8.      android:versionCode="1"
  9.  
  10.      android:versionName="1.0">
  11.  
  12.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  13.  
  14.             <uses-library android:name="com.google.android.maps"/>
  15.  
  16.             <activity android:name=".whereami"
  17.  
  18.                  android:label="@string/app_name">
  19.  
  20.             <intent-filter>
  21.  
  22.                 <action android:name="android.intent.action.MAIN" />
  23.  
  24.                 <category android:name="android.intent.category.LAUNCHER" />
  25.  
  26.             </intent-filter>
  27.  
  28.         </activity>
  29.  
  30.         <activity android:name=".Summary"
  31.  
  32.                  android:label="@string/app_name">
  33.  
  34.         </activity>
  35.  
  36.     </application>
  37.  
  38.     <uses-sdk android:minSdkVersion="1" />
  39.  
  40.     <uses-permission android:name="android.permission.INTERNET" />
  41.  
  42.     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  43.  
  44. </manifest>
  45.  
  46.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


But the special characters are still not displayed :-(
chris.schuette
Freshman
Freshman
 
Posts: 8
Joined: Tue Jul 14, 2009 10:59 am

Postby nmc » Tue Jul 14, 2009 12:06 pm

But the special characters are still not displayed


Wrong thread, see first post: "how to pack all the activities of a project as a single pack" :)

German umlauts: i dont know if there is a java function for this, but since the time to search would be much longer than writing down some replace() calls, I would do the latter :wink:
nmc
Senior Developer
Senior Developer
 
Posts: 154
Joined: Thu Nov 27, 2008 8:30 pm
Location: Germany

Top

Postby chris.schuette » Tue Jul 14, 2009 12:08 pm

SORRY you are absolutely right. :D
chris.schuette
Freshman
Freshman
 
Posts: 8
Joined: Tue Jul 14, 2009 10:59 am

Postby lakshmanraob » Wed Jul 15, 2009 5:32 am

Hi nmc,
Thanks for your explanation and the assistance u given to me. Thanks a lot

Lakshman
lakshmanraob
Junior Developer
Junior Developer
 
Posts: 18
Joined: Mon Mar 23, 2009 8:11 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 4 guests