Skip to content

Added ADM support#53

Open
manojdcoder wants to merge 6 commits intomorinel:masterfrom
manojdcoder:master
Open

Added ADM support#53
manojdcoder wants to merge 6 commits intomorinel:masterfrom
manojdcoder:master

Conversation

@manojdcoder
Copy link

Added ADM support for Amazon Kindle Fire devices.

@DaKaZ
Copy link

DaKaZ commented Nov 1, 2016

We worked with Manoj to create this PR - I can confirm that it is working great and our app was approved by Amazon and in their app store. Would be great to see this merged with the master for long term maintenance.

@morinel
Copy link
Owner

morinel commented Nov 2, 2016

Thanks for the PR. I noticed you moved all code to an android subdir which I don't particularly like when merging changes.

Additionally:

  • I have no Amazon device so no chance to test this
  • What does the gcmpush plugin / hook do?
  • Why did you remove the timodule.xml? It contains lots of required settings for regular Android devices
  • Storing an API key in a file in a module is of course not really developer friendly. Isn't there another way?

@manojdcoder
Copy link
Author

@morinel When I cloned the repo, I followed everything you had in ReadMe but it was never working and kept throwing errors during build. So I had to rebase the module with Studio, as you know Studio always injects android folder at root level and keeps all unique source files for Android there.

Additionally:

  • I have no Amazon device so no chance to test this I personally tested it with a Kindle Fire (2013) at Amazon Device Farm and @DaKaZ tested with his own physical device
  • What does the gcmpush plugin / hook do? There were 3 important things, the Appcelerator CLI didn't support, First to enable ADM support we have to inject few custom amazon tags in the manifest. During android build CLI eliminates those tags from the generated AndroidManifest.xml. This plugin adds those missing tags back once the CLI finishes it's job on AndroidManifest.xml. Secondly, Amazon gives us an ADM library (JAR) which is more like Stubs for original library that is available only in Amazon devices, these stubs are just helpful for development should not be packed with app. CLI doesn't seem to entertain this behaviour, so this plugin will delete those library (stubs) during Android build. Lastly Titanium doesn't copy files from assets folder, if the file is not one of these formats - JSON, JS, and PNG / JPEG. This plugin helps us to copy the TXT file that holds the Amazon API key
  • Why did you remove the timodule.xml? It contains lots of required settings for regular Android devices It was not removed, but moved. You could see that file under android folder
  • Storing an API key in a file in a module is of course not really developer friendly. Isn't there another way? ADM gives us 2 options, one we have to use a text file and another, the developer must sign his app with Amazon store, with Amazon's signature / key store. Developer can delete that text file (for api key) if he signs his app with Amazon

@DaKaZ
Copy link

DaKaZ commented Nov 18, 2016

I am not 100% positive (I can test if you want) but for this issue:

Storing an API key in a file in a module is of course not really developer friendly. Isn't there another way? ADM gives us 2 options, one we have to use a text file and another, the developer must sign his app with Amazon store, with Amazon's signature / key store. Developer can delete that text file (for api key) if he signs his app with Amazon

I believe the api key text file can be included in the main project and does not need to be included in the module. Let me know if you want me to test and I will.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants