https://bugzilla.novell.com/show_bug.cgi?id=655342

https://bugzilla.novell.com/show_bug.cgi?id=655342#c1


Jonathan Pryor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|                            |INVALID

--- Comment #1 from Jonathan Pryor <[email protected]> 2010-11-22 20:13:16 UTC 
---
Background:
  - Types which are listed within AndroidManifest.xml may be created by
Android.
  - Types with the [Activity], [BroadcastReceiver], 
    [ContentProvider], and [Service] attributes are inserted into the
    resulting AndroidManifest.xml file.
  - When Android creates one of these types, the default constructor is
invoked.
  - If the default constructor is not present, an error will be thrown and 
    the app will terminate.

Thus, there is a choice here:

 1. Generate an error if a type listed in AndroidManifest.xml doesn't have
    a default constructor.  This is the current behavior.

 2. Allow types with no default constructor to be present within 
    AndroidManifest.xml, and have Android throw an error later.

Obviously I like (1), but I'm willing to entertain (2).

As for Android.App.IntentService, the appropriate fix is to either:

 1. Remove the [Service] attribute from your MyIntentService type; or

 2. Provide a default constructor, and provide a value to the base constructor:

    [Service]
    public MyIntentService : IntentService {
        public MyIntentService ()
            : base ("worker-thread-name")
        {
        }
    }

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to