Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27297] Android: Allow Hyperloop to access Titanium's core Java classes

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-02-06T19:16:40.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.0
ComponentsAndroid, Hyperloop
Labelsandroid, hyperloop
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-07-30T01:04:34.000+0000
Updated2020-09-17T01:42:08.000+0000

Description

*Summary:* Hyperloop is unable to access the Titanium SDK's core Java classes. Hyperloop is also unable to access the Java classes of the JAR/AAR libraries included with the SDK such as the "java_websocket.jar" (except for the Google support libraries). We should modify Hyperloop to reference the Titanium SDK's JARs/AARs as well and not just the project's "modules" directory. *Test:*

Create a Classic Titanium project.

Add "hyperloop" module to "tiapp.xml".

Copy the below code to the "app.js".

Build and run on Android.

Verify the following gets logged every second: ### Is app in foreground: true

var tiApplicationClass = require("org.appcelerator.titanium.TiApplication");
setInterval(function() {
	var isInForeground = tiApplicationClass.isCurrentActivityInForeground();
	Ti.API.info("### Is app in foreground: " + isInForeground);
}, 1000);

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