Re: [android-developers] How to stop terminate the Android application when using the native code
I know, i can disable it, so it will work, but i'd like to let the app can run many times again. So i disable the exit(), but when call the second times, it generates errors. Could you help? Thanks Clark On Sunday, July 15, 2012 5:52:38 AM UTC+7, Dianne Hackborn wrote: You just need to fix your native code so it doesn't do this. Anyone giving you a native library that is calling exit() in it is an evil sadist. :p On Fri, Jul 13, 2012 at 3:02 AM, Clark kent nguyenle...@gmail.com wrote: Hello every body I have this problem which can not resolve it. I'm calling the native code(*C code*) from the android application. But in the native code, they call function *exit(0)* so it makes the app on Android terminate. Could any one know how to stop this one, because after i called one method from native code , after it finished, it will terminate the Android application. I found a way is disable the method *exit(0)*, so it will not terminate the Android app, but it meet error when i called the native method second time, some error kind like this: *Invalid heap address in internal_realloc*. I think that came from the re allocation the memory. So if any one know how to free all memory of native call, please let me know. Thanks for any comments Thanks Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to stop terminate the Android application when using the native code
I know, i can disable it, so it will work, but i'd like to let the app can run many times again. So i disable the exit(), but when call the second times, it generates errors. Could you help? Debug your code, find the cause of the errors, and fix them... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, Jul 20, 2012 at 12:58 AM, Clark kent nguyenle...@gmail.com wrote: I know, i can disable it, so it will work, but i'd like to let the app can run many times again. So i disable the exit(), but when call the second times, it generates errors. Could you help? Thanks Clark On Sunday, July 15, 2012 5:52:38 AM UTC+7, Dianne Hackborn wrote: You just need to fix your native code so it doesn't do this. Anyone giving you a native library that is calling exit() in it is an evil sadist. :p On Fri, Jul 13, 2012 at 3:02 AM, Clark kent nguyenle...@gmail.comwrote: Hello every body I have this problem which can not resolve it. I'm calling the native code(*C code*) from the android application. But in the native code, they call function *exit(0)* so it makes the app on Android terminate. Could any one know how to stop this one, because after i called one method from native code , after it finished, it will terminate the Android application. I found a way is disable the method *exit(0)*, so it will not terminate the Android app, but it meet error when i called the native method second time, some error kind like this: *Invalid heap address in internal_realloc*. I think that came from the re allocation the memory. So if any one know how to free all memory of native call, please let me know. Thanks for any comments Thanks Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@** googlegroups.com android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to stop terminate the Android application when using the native code
You just need to fix your native code so it doesn't do this. Anyone giving you a native library that is calling exit() in it is an evil sadist. :p On Fri, Jul 13, 2012 at 3:02 AM, Clark kent nguyenle...@gmail.com wrote: Hello every body I have this problem which can not resolve it. I'm calling the native code(*C code*) from the android application. But in the native code, they call function *exit(0)* so it makes the app on Android terminate. Could any one know how to stop this one, because after i called one method from native code , after it finished, it will terminate the Android application. I found a way is disable the method *exit(0)*, so it will not terminate the Android app, but it meet error when i called the native method second time, some error kind like this: *Invalid heap address in internal_realloc*. I think that came from the re allocation the memory. So if any one know how to free all memory of native call, please let me know. Thanks for any comments Thanks Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en