Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27298] Android: Hyperloop should allow access to a Java inner class within an inner class

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2020-02-06T19:17:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.0
ComponentsAndroid, Hyperloop
Labelsandroid, hyperloop
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-07-30T01:46:51.000+0000
Updated2020-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);

Comments

  1. Joshua Quick 2019-12-14

    PR: https://github.com/appcelerator/hyperloop.next/pull/329
  2. Lokesh Choudhary 2020-02-04

    FR Passed. PR Merged.
  3. Joshua Quick 2020-02-06

    PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/11465
  4. Lokesh Choudhary 2020-02-06

    Verified the fix with SDK 9.0.0.v20200206090105 which consists of module 5.0.0. Closing

JSON Source