[AC-6016] Issue with ApplicationContext by usage of 3-party library (leica)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2018-11-08T23:30:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | 3-Party |
Reporter | Rainer Schleevoigt |
Assignee | Shak Hossain |
Created | 2018-11-08T10:26:00.000+0000 |
Updated | 2018-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
It is solved, was a problem with closed cource and a "bug"