On Thu, Jun 14, 2012 at 8:25 AM, Bryan <[email protected]> wrote:
> Let's say my 2 app manifests contain something like this:
>
> <application package="my.package"/>
> <activity name=".MyActivity"/>
>
> <application package="my.packagepro"/>
> <activity name=".MyActivity"/>

There is no package attribute on <application>. I presume you mean the
package attribute on the root <manifest> element.

> Here's where the problem started. Any existing appwidgets on the
> homescreen would disappear.

Your app widgets will not be affected by any <activity> elements. They
definitely will be affected by your <receiver> elements for your
AppWidgetProviders. If the user has an app widget installed for a
my.package.AppWidget, and you refactor things such that there is no
my.package.AppWidget, the user will have problems. I wouldn't expect
the app widget to turn invisible -- I would have guessed a "problem
loading widget" placeholder instead -- but perhaps my guess is wrong.

Bear in mind, though, that through the magic of inheritance, you can
have my.package.AppWidget be a simple subclass of
my.package.core.AppWidget, so you can have the business logic in your
library project without breaking your original public API.

> Can I leave the activity name as
> ".MyActivity" and it will reference my.package.core.MyActivity?

No.

> I though
> that when the name begins with a ".", then the application package is used.

Correct.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training... At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to