[TIMOB-2374] Android: Modules Should Support platform Folder
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-06T10:06:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | Android |
Labels | android, feature, release-1.7.0, tooling |
Reporter | Don Thorp |
Assignee | Bill Dawson |
Created | 2011-04-15T03:18:08.000+0000 |
Updated | 2011-05-06T10:06:18.000+0000 |
Description
Some modules may want to ship resources to be merged into
/res
we should take care of that during
install/build.
Attachments
File | Date | Size |
---|---|---|
tifranzi-android-01.zip | 2011-04-15T03:18:08.000+0000 | 137530 |
We are moving this to 1.5.1. If you run into the issue with a custom module or you publish a custom module. You will need to have the user of the module merge any Android resources into their platform/android/res/... folders and files as necessary for the module to perform.
(from [42d21873eda3eb8076b61c38ce69d4d5bb4de53b]) Copy platform/ folder contents from app modules into build/android, for any modules that are used in an app. [#2374] https://github.com/appcelerator/titanium_mobile/commit/42d21873eda3eb8076b61c38ce69d4d5bb4de53b"> https://github.com/appcelerator/titanium_mobile/commit/42d21873eda3...
(from [3a52eae800b9fdf07c6ae9031910464566dcf9d4]) When building module, put platform/ folder (if any) in the zip, but not in the jar (was doing the latter accidentally earlier). [#2374] https://github.com/appcelerator/titanium_mobile/commit/3a52eae800b9fdf07c6ae9031910464566dcf9d4"> https://github.com/appcelerator/titanium_mobile/commit/3a52eae800b9...
Also this commit:
https://github.com/appcelerator/titanium_mobile/commit/c8bb9ef1ba384e3c098ac9b58"> https://github.com/appcelerator/titanium_mobile/commit/c8bb9ef1ba38...
For QE:
Create a new application.
In the app's tiapp.xml, add this to the
<modules>
section:Copy the attached zip file (it's a test module) into the project's root folder.
Make this the project's app.js:
Run the app in Android. (No need to test iOS, because there are no uses of the platform/ folder in iOS projects and modules.)
When the app opens, you should see a photograph on the screen.
Explanation
The zip file you installed is an Android Titanium module. When it gets expanded into the
modules/
folder in your project (which occurs automatically when the project is built), you'll see it has aplatform/android/res/drawable/fj.png
file in it. That png file is the photo you see when you run the app.So the photo file is not one of your project's
Resources/
files, but rather comes from the external, installed ("third-party", if you want) module. If the photo successfully displays, it proves that the module'splatform/
folder and its sub-contents were successfully merged intobuild/android
when your app was built, which is the purpose of this ticket.I don't know if it matters (I don't think it does) but Lighthouse stripped dots out of the filename for that zip file attached here. the filename should be ti.franzi-android-0.1.zip. But I'm pretty sure it doesn't matter what the filename is. Just plop it in your project's root folder.
Tested on a Nexus One 2.3.4