airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
200 stars 11 forks source link

Descriptor validation for Amazon build #1064

Open sjabberwocky opened 3 years ago

sjabberwocky commented 3 years ago

When you make Amazon build with One Signal integration (push notification service) you need to include Amazon specific strings to the descriptor. Unfortunately, with this strings you can not make build due validation issues.

To make proper build you need to:

  1. Build Amazon apk without amazon sdk strings in descriptor
  2. Unpack apk with apktool
  3. Added amazon sdk strings to descriptor
  4. Pack apk with apktool
  5. Sign apk with jarsigner

It would be nice to have some improvement in AIR which will not need so many extra steps.

It could be:

For One Signal integration two strings are needed: <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:amazon="http://schemas.amazon.com/apk/res/android" package="com.app.Example" android:versionCode="1" android:versionName="1.0"> and <amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false"/>

ajwfrost commented 3 years ago

Minor comment in step 5 there, you'll need to use apksigner now to get signature format v2 which is needed for Android 30.

But in terms of the request here -> I'm not sure that disabling all the validation is a good idea as it may result in hard-to-find bugs happening later on. But adding the capability for a custom namespace (where we then just check that items are well-formed XML, rather than any further validation) is a good idea and should solve the issue here..

thanks

sjabberwocky commented 3 years ago

@ajwfrost thanks for clarification!

ajwfrost commented 3 years ago

FYI can you please use the version of ADT in the below message, it should support this now: https://transfer.harman.com/message/Hn0uKXIqQQHARz1dRhERvH thanks

marchbold commented 3 years ago

Just to clarify, could you tell us what to expect here? Have you just allowed the <amazon:enable-feature tag?

ajwfrost commented 3 years ago

The change here is:

So there's no further validation done, as soon as we see it's not <android:something ...

sjabberwocky commented 3 years ago

It does not work in Flash Builder, when I try to Export Release Build and press "Finish" it try to update compiler settings and silently do nothing.

ajwfrost commented 3 years ago

@sjabberwocky I'm wondering whether Flash Builder is doing its own validation or similar .. their tools call directly into ADT internal classes for some reason, rather than using the normal command-line options.

Can I check though - was it working in Flash Builder, and then when you updated the adt.jar file using the earlier link, it then stops working? or is this perhaps one of the other issues that Flash Builder sometimes has with exporting release builds..?

thanks