Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android Activity Lifecycle Callbacks: How to unset / clear them?

$
0
0

I read in the Titanium 3.4.0 changelog that activitiy lifecycle events are deprecated and callbacks should be used instead see changelog.

I was wondering if it is possible to remove a callback? I used to do the following:

activity.addEventListener('pause', stopRefresh);
// ... then at some point
activity.removeEventListener('pause', stopRefresh);
But so far I only have this:
activity.onPause(stopRefresh);
Is there any way to clear / remove a previously set callback?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>