Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6016] Issue with ApplicationContext by usage of 3-party library (leica)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-11-08T23:30:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labels3-Party
ReporterRainer Schleevoigt
AssigneeShak Hossain
Created2018-11-08T10:26:00.000+0000
Updated2018-11-08T23:30:24.000+0000

Description

I try to build an Android module for (BT-) communicating with devices. In the demo app of the manufacture this pattern will used:
public class myActivity extends Activity implements
		DeviceManager.FoundAvailableDeviceListener {
        @Override
	public void onAvailableDeviceFound(final Device device) {
		Log.i(LCAT, "Model: " + device.getModel() + " Name: "+ device.getDeviceName());
	}
        void findAvailableDevices() {
              deviceManager.setFoundAvailableDeviceListener(this);
             deviceManager.findAvailableDevices(getApplicationContext());
         }
} 
This works in activity (as aspected). If I try to build this pattern in KrollProxy, the internal class DeviceManager detects the device with all properties but later during Device instantiating the app crashes because of null reference. The only difference to original code is that we use the KrollProxy. For getApplicationContext() I'm using TiApplication.getInstance().getApplicationContext(). I have played with thread messaging and getbaseContext(), but nothing helps. The manufactor don't feel responsible for Titanium framework ... Any clue? Here my KrollProxy: https://gist.github.com/AppWerft/40e88c86ee87d0fb2481b6eb5a2603f6 Here the original: https://gist.github.com/AppWerft/de0c36b720d4cd180db71efee341d444

Comments

  1. Rainer Schleevoigt 2018-11-08

    It is solved, was a problem with closed cource and a "bug"

JSON Source