[TIMOB-27298] Android: Hyperloop should allow access to a Java inner class within an inner class
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-02-06T19:17:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.0.0 |
Components | Android, Hyperloop |
Labels | android, hyperloop |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2019-07-30T01:46:51.000+0000 |
Updated | 2020-02-06T19:17:05.000+0000 |
Description
*Summary:*
Hyperloop can currently access the 1st level of inner classes under a Java class, but cannot access an inner class belonging to an inner class (ie: 2 inner classes deep).
This makes using certain Android classes such as
MediaStore
's 2 level deep nested classes impossible.
https://developer.android.com/reference/android/provider/MediaStore
*Test:*
Create a Classic Titanium project.
Add "hyperloop" module to "tiapp.xml".
Copy the below code to your "app.js".
Build and run on Android.
Notice that an exception happens for the last line of code below.
var mediaStore = require("android.provider.MediaStore");
// This works.
Ti.API.info("### MediaStore.ACTION_IMAGE_CAPTURE: " + mediaStore.ACTION_IMAGE_CAPTURE);
// This works.
Ti.API.info("### MediaStore.MediaColumns.DISPLAY_NAME: " + mediaStore.MediaColumns.DISPLAY_NAME);
// This fails.
Ti.API.info("### MediaStore.Images.Media.EXTERNAL_CONTENT_URI: " + mediaStore.Images.Media.EXTERNAL_CONTENT_URI);
PR: https://github.com/appcelerator/hyperloop.next/pull/329
FR Passed. PR Merged.
PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/11465
Verified the fix with SDK 9.0.0.v20200206090105 which consists of module 5.0.0. Closing