Start an activity without declaring it in manifest file

by semaka » Tue, 02 Sep 2008 21:42:41 GMT

Sponsored Links
 Hi guys,

I have a project in which I have to start an activity which is not
declared in AndroidManifest.xml. Is that possible to register an
activity dynamically by code? Or is it possible to overwrite the
AndroidManifest.xml from an installed .apk  or to replace it without
reinstalling the .apk on the emulator?

Any help will be highly appreciated.


Start an activity without declaring it in manifest file

by Mark Murphy » Tue, 02 Sep 2008 22:21:20 GMT


Not that I'm aware of.

Not that I'm aware of.

Mark Murphy (a Commons Guy) 
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!


Sponsored Links

Start an activity without declaring it in manifest file

by Justin (Google Employee) » Wed, 03 Sep 2008 03:10:37 GMT

 As mark has said, nope, its not possible. The manifest registers your
application with the system. This is the only way the system becomes
aware of executable targets.

Android Team @ Google


Other Threads

1. constructor SignalStrength() is not visible

I've tried to create an object using SignalStrength x = new
SignalStrength(); ,but it throws me constructor SignalStrength() is
not visible in Eclipse. I bet there is another way, but looking
through i can not understand the way it can be
done. I will be very happy if someone tells me what I am doing wrong.


2. Matrix.rotateM does heap allocations - should I care?

Are you meticulous in removing all per-frame heap allocations from
your game? (At least the allocations that you can control and that
have practical alternatives.)

While trying to reduce per-frame heap allocations from my running
game, I found that method

    android.opengl.Matrix rotateM(float[] m, int mOffset, float a,
float x, float y, float z)

does a heap allocation. This means maybe 10 or so extra heap
allocations per frame and is the only per-frame allocation left in my
application (well, the only one that I can directly control). I am
thinking of replacing this with my own version - one that does not do
any heap allocations.

I also had some lists that I replaced with my own list implementation
because I found that some standard list iterations would create new
iteration objects, putting more pressure on the heap and forcing more
frequent garbage collection.

I know that I can't eliminate all the heap allocations. In particular,
input seems to trigger a bunch of allocations.

I can't help but think that anything reasonable I can do to reduce
pressure on the heap will improve the user's experience (if garbage
collection is going to stall my game). Obviously there are diminishing
returns at some point, so ultimately I have to make a judgement call.


3. How to generate a java doc for an android project?

4. My Application is not showing in Android Market.

5. Simple Context Menus -- OPTIONS MENU

6. Annotation: keyDispatchingTimedOut

7. How to remove a notification with flag FLAG_NO_CLEAR ?