You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instantiating, or causing the instantiation of a class that extends another native (Android) class in TypeScript can cause a crash if the class being extended exposes public members not present on the device that runs the application.
Suppose we extend a class that introduces a new static member with Platform SDK 24, then compile the application with compileSdk 24/25, and finally install the application on a device running on API Level 23. If we attempt to create an instance of our custom class the application will crash.
Android:
classAccessibilityService {
...
staticintGLOBAL_ACTION_TOGGLE_SPLIT_SCREEN = 7; // available with SDK 24+
...
}
The ts_helpers script will iterate through all public properties of the class being extended, some of which may not be available on the device that runs the app, (when extending a native class) thus causing the crash.
As a workaround we may add an explicit check to make sure that the traversed fields are not specific to the android Sdk
The text was updated successfully, but these errors were encountered:
Instantiating, or causing the instantiation of a class that extends another native (Android) class in TypeScript can cause a crash if the class being extended exposes public members not present on the device that runs the application.
Suppose we extend a class that introduces a new static member with Platform SDK 24, then compile the application with compileSdk 24/25, and finally install the application on a device running on API Level 23. If we attempt to create an instance of our custom class the application will crash.
Android:
TypeScript:
The ts_helpers script will iterate through all public properties of the class being extended, some of which may not be available on the device that runs the app, (when extending a native class) thus causing the crash.
As a workaround we may add an explicit check to make sure that the traversed fields are not specific to the android Sdk
The text was updated successfully, but these errors were encountered: