Skip to content

IntentService extending fails at runtime when service is started #1426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vmutafov opened this issue Jul 19, 2019 · 0 comments
Closed

IntentService extending fails at runtime when service is started #1426

vmutafov opened this issue Jul 19, 2019 · 0 comments
Milestone

Comments

@vmutafov
Copy link
Contributor

If a user extends an IntentService and does not implement the onCreate method explicitly, an internal implementation is generated by the SBG for the onCreate method (used for NS runtime initialization cases). This generated method, however, does not make a call to super.onCreate() which makes the instance of the newly generated service be incorrectly initialized by the Android runtime and crash when it's used.
There should be a call to super.onCreate() in this internal implementation of onCreate and this would remove the runtime crash. However, if the user has provided an implementation of onCreate there should not be a generated call to super.onCreate() because there may be a case where the user does not want this call to be made.

@vmutafov vmutafov added this to the 6.1.0 milestone Jul 19, 2019
vhristov5555 pushed a commit to NativeScript/nativescript-tooling-qa that referenced this issue Jul 19, 2019
vhristov5555 pushed a commit to NativeScript/nativescript-tooling-qa that referenced this issue Jul 19, 2019
vhristov5555 pushed a commit to NativeScript/nativescript-tooling-qa that referenced this issue Jul 22, 2019
@vmutafov vmutafov modified the milestones: 6.1.0, 6.0.1 Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants