[Mono-bugs] [Bug 665847] New: MonoDroid Libraries : Merging of AndroidManifest ?

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 20 09:22:28 EST 2011



           Summary: MonoDroid Libraries : Merging of AndroidManifest ?
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mkestner at novell.com
        ReportedBy: jondick at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

Need a way to allow my library to specify some things in the Android Manifest
of the application that references the library.

For Activities and Services, this is easy, I can just use attributes, but there
are two cases which have no resolve:

1) <uses-permission>
2) <permission>

<permission android:name="com.example.myapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.myapp.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

I could see the solution being one of two things:
1) The manifest from the library gets merged with the applicaion's manifest. 
This could be tricky with things like the <uses-sdk> node (I guess you'd just
take the highest minSdkVersion), or on the package="" attribute (in that case
you'd take the application's value).  I'm not sure this is a rock solid

2) Attributes could be created
[UsesPermission("com.google.android.c2dm.permission.RECEIVE"], and
[Permission("com.example.myapp.permission.C2D_MESSAGE")].  I'm not sure where
you'd want to put these attributes in an application, or a library, but
probably in [assembly: UsesPermission(...)] [assembly: Permission(...)].  This
would resolve the problems in the cases I've run into.. I'm not sure if there
are any more attributes we'd need down the road.

NOTE:  Bug #665840 relates to this.  If we have attributes, I'd still need to
be able to somehow get the __PackageName__ into the permission name and
usespermission name.  For example:
[assembly: Permission("__PackageName__.permission.C2D_MESSAGE")]
[assembly: UsesPermission("__PackageName__.permission.C2D_MESSAGE")]
Or however that case is resolved.

Reproducible: Always

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list