Managing Manifest for Plugins

Hello Gurus,

After recently having a game disqualified for the Amazon App of the Day promotion because I didn’t have GameCircle integration I decided to try my hand at creating a plugin using the Enterprise SDK.  So far it hasn’t been terribly painful. My app can login and show a leaderboard.  It took about 4 hours, but at least half of that was just familiarizing myself with the Corona build scripts.

So, in my estimation by next weekend I would have something to test already.  I plan just to support leaderboards and achievements for now.  But I don’t quite understand how I should be packaging manifest changes so they show up in plugin jar.  The Amazon SDK requires that I include the following manifest references to their activities:

<activity android:name=“com.amazon.ags.html5.overlay.GameCircleUserInterface”

android:theme="@style/GCOverlay">

</activity>

<activity

  android:name=“com.amazon.identity.auth.device.authorization.AuthorizationActivity”

  android:theme="@android:style/Theme.NoDisplay"

  android:allowTaskReparenting=“true”

  android:launchMode=“singleTask”>

  

<intent-filter>

     <action android:name=“android.intent.action.VIEW” />

     <category android:name=“android.intent.category.DEFAULT” />

     <category android:name=“android.intent.category.BROWSABLE” />

     <data android:host=“com.mycompany.app” android:scheme=“amzn” />

  </intent-filter>

</activity>

<activity android:name=“com.amazon.ags.html5.overlay.GameCircleAlertUserInterface”

android:theme="@style/GCAlert">

</activity>

<receiver

  android:name=“com.amazon.identity.auth.device.authorization.PackageIntentReceiver”

  android:enabled=“true”>

  

<intent-filter>

     <action android:name=“android.intent.action.PACKAGE_INSTALL” />

     <action android:name=“android.intent.action.PACKAGE_ADDED” />

     <data android:scheme=“package” />

  </intent-filter>

</receiver>

If I add these to the Corona enterprise file AndroidManifest.XML, all is well.  But I don’t think I can do that and distribute the plugin to those who don’t have the enterprise version of the SDK right?  Somehow I need these settings to appear in the manifest only when my plugin is added to the build.  Am I correct in my understanding?  And if so, how to I package these manifest changes such that they make it into a build when someone includes my plugin in their Corona Pro build file?

Thanks in advance for your responses.

Just an update over the weekend I continued to forge ahead with GameCircle and am very close to having Leaderboards implemented.  Am happy to share the source as soon as I’ve finished.  But I feel like resolving this thread is key to understanding whether or not the plugin could be used by Corona Pro subscribers at large or whether the Enterprise edition would always be required.  Could it be as simple on the Corona side as modifying the Android build script to conditionally include the manifest changes and copy over the jar and couple XML files from a static repo whenever the plugin gets included in the android build.settings?  Based on my understanding of the Facebook plugin I see in the Enterprise directories something similar happens already when a user includes the FB plugin.  Anybody know?

http://docs.coronalabs.com/daily/native/plugin/submission.html#TOC

Look under the Android section.

Just an update over the weekend I continued to forge ahead with GameCircle and am very close to having Leaderboards implemented.  Am happy to share the source as soon as I’ve finished.  But I feel like resolving this thread is key to understanding whether or not the plugin could be used by Corona Pro subscribers at large or whether the Enterprise edition would always be required.  Could it be as simple on the Corona side as modifying the Android build script to conditionally include the manifest changes and copy over the jar and couple XML files from a static repo whenever the plugin gets included in the android build.settings?  Based on my understanding of the Facebook plugin I see in the Enterprise directories something similar happens already when a user includes the FB plugin.  Anybody know?

http://docs.coronalabs.com/daily/native/plugin/submission.html#TOC

Look under the Android section.