-
-
Notifications
You must be signed in to change notification settings - Fork 245
Bug related to the life cycle of an Android application #185
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
Comments
@Fabiyo-90 I'm not sure if I understand you correctly, but if you are talking about the issue where if the activity gets suspended and then recreated the app is unresponsive (no events or bindings work) then yes, that's an issue that I'm currently investigating. It is an issue in NativeScript core too, so I'm not sure how to fix it yet. |
it's exactly that, I'm preparing a presentation to my friends and I would not like a bug because I'm trying to create a mobile developer community around nativescript-view. I am a student in DR Congo, French speaking country. |
I pray that this bug is quickly solved |
I've released an rc build which should fix the issue, can you try it and let me know if it works for you?
|
I'ts not working ! here is my bug |
With the version "nativescript-vue@1.3.2-rc.2" the application bug when launching "onCreate ()", but with this version "nativescript-vue@1.3.2-rc.1", the application does not bug anymore. I think that I will work with this version "nativescript-vue@1.3.2-rc.1" |
As a work-around, you can use
it prevents the app to suspend, and goes directly to dashboard. |
|
you have to install tns-core-modules@3.4.1 with nativescript-vue@1.3.1 |
I have a hacky workaround this problem First make sure on exit event you really really exit the app import * as application from 'tns-core-modules/application'
import {exit} from 'nativescript-exit'
/*
* Force an exit, instead of trying to remount
* FIXME: On upgrade to nativescript-vue 2.x this wont be necessary
*/
application.on(application.exitEvent, (args: ApplicationEventData) => {
exit()
}) Next, to make back button work as page routing /*
* Go back if in a nested route. If top level route, just do what android does
*/
if (application.android) {
application.android.on(
AndroidApplication.activityBackPressedEvent,
(data: AndroidActivityBackPressedEventData) => {
if (router.currentRoute.path.split('/').length > 2) {
router.back()
data.cancel = true
}
}
)
} |
@Fabiyo-90 the traceback you linked here is due to the @championswimmer the second workaround you put down (the BTW, this issue should be tested in the CC/ @rigor789 |
@Fabiyo-90 I've added this sample app which tests all the Android events: 014e812 I've tested pausing and resuming the app and is still responsive, as you can see here: So closing this issue. Please re-open if I missed something. |
We are locking this issue because it has been closed for more than 14 days. If the issue comes up again please open a new issue with additional details. |
From @Fabiyo-90 on April 17, 2018 18:48
I am on android, once I press the button "back" and that the application is found in pause "onPause ()", and then I click on the icon of the application to engage "surResume ()" then the application bug. Once stop "onStop ()", click on the icon while it normally starts. Bug related to the life cycle of an Android application.
Copied from original issue: nativescript-vue/nativescript-vue.org#95
The text was updated successfully, but these errors were encountered: