Re: Why no onStart/onStop for Cordova Android plugins?
Likely won't create it until closer to the event, but I'll send it to the list as soon as I do! :) On Wed, Mar 11, 2015 at 3:44 PM, Homer, Tony wrote: > Thanks for the response and the tip! > I¹ll submit a JIRA and a PR sometime soon. > > As an aside, any chance we can get a preview of your ApacheCon > presentation? > I really need to learn how to set up my environment the right way! > ;) > > > On 3/9/15, 12:05 PM, "Andrew Grieve" wrote: > > >I see no reason we couldn't add onStart / onStop. > > > >As an aside, if you're okay with supporting only ICS+, you can use > >Application.registerActivityLifecycleCallbacks() as a work-around. > > > > > >On Mon, Mar 9, 2015 at 11:23 AM, Homer, Tony > wrote: > > > >> I assumed that this must have been discussed at some point, but I > >>couldn¹t > >> find anything in the list archives or JIRA. > >> I¹m guessing that there might be some practical issues with > >>onStart/onStop > >> and plugin loading timing, but it seems like if there are issues like > >>this > >> they could be addressed somehow. > >> > >> I¹m asking about this because we have an internal request to enable apps > >> to override onStart/onStop in the Intel XDK build system in order to > >> support plugins that want to handle onStart/onStop. > >> My initial response was ³why not use onResume/onPause², but some plugin > >> authors apparently believe that onStart/onStop are the lifecycle events > >> they need. > >> > >> For example, the Flurry plugin instructions direct users to override > >> onStart and onStop in their activity in order to handle onStop: > >> https://github.com/Initsogar/cordova-flurry > >> There are other analytics plugins that want to know about onStart/onStop > >> instead of onPause/onResume. > >> Obviously it is possible to modify your activity in order to do this in > >> your project, but if this capability is important, it should be possible > >> without abandoning the Cordova Way. > >> > >> So I was wondering what you guys think? > >> onPause/onResume should be good enough for anyone? > >> onStart/onStop are edge cases that users need to handle by modifying > >>their > >> activity? > >> onStart/onStop cannot be handled by plugins due to timing issues? > >> > >> Thanks! > >> Tony > >> > >> - > >> To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > >> For additional commands, e-mail: dev-h...@cordova.apache.org > >> > >> > > > - > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > For additional commands, e-mail: dev-h...@cordova.apache.org > >
Re: Why no onStart/onStop for Cordova Android plugins?
Thanks for the response and the tip! I¹ll submit a JIRA and a PR sometime soon. As an aside, any chance we can get a preview of your ApacheCon presentation? I really need to learn how to set up my environment the right way! ;) On 3/9/15, 12:05 PM, "Andrew Grieve" wrote: >I see no reason we couldn't add onStart / onStop. > >As an aside, if you're okay with supporting only ICS+, you can use >Application.registerActivityLifecycleCallbacks() as a work-around. > > >On Mon, Mar 9, 2015 at 11:23 AM, Homer, Tony wrote: > >> I assumed that this must have been discussed at some point, but I >>couldn¹t >> find anything in the list archives or JIRA. >> I¹m guessing that there might be some practical issues with >>onStart/onStop >> and plugin loading timing, but it seems like if there are issues like >>this >> they could be addressed somehow. >> >> I¹m asking about this because we have an internal request to enable apps >> to override onStart/onStop in the Intel XDK build system in order to >> support plugins that want to handle onStart/onStop. >> My initial response was ³why not use onResume/onPause², but some plugin >> authors apparently believe that onStart/onStop are the lifecycle events >> they need. >> >> For example, the Flurry plugin instructions direct users to override >> onStart and onStop in their activity in order to handle onStop: >> https://github.com/Initsogar/cordova-flurry >> There are other analytics plugins that want to know about onStart/onStop >> instead of onPause/onResume. >> Obviously it is possible to modify your activity in order to do this in >> your project, but if this capability is important, it should be possible >> without abandoning the Cordova Way. >> >> So I was wondering what you guys think? >> onPause/onResume should be good enough for anyone? >> onStart/onStop are edge cases that users need to handle by modifying >>their >> activity? >> onStart/onStop cannot be handled by plugins due to timing issues? >> >> Thanks! >> Tony >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org >> For additional commands, e-mail: dev-h...@cordova.apache.org >> >> - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
Re: Why no onStart/onStop for Cordova Android plugins?
I see no reason we couldn't add onStart / onStop. As an aside, if you're okay with supporting only ICS+, you can use Application.registerActivityLifecycleCallbacks() as a work-around. On Mon, Mar 9, 2015 at 11:23 AM, Homer, Tony wrote: > I assumed that this must have been discussed at some point, but I couldn’t > find anything in the list archives or JIRA. > I’m guessing that there might be some practical issues with onStart/onStop > and plugin loading timing, but it seems like if there are issues like this > they could be addressed somehow. > > I’m asking about this because we have an internal request to enable apps > to override onStart/onStop in the Intel XDK build system in order to > support plugins that want to handle onStart/onStop. > My initial response was “why not use onResume/onPause”, but some plugin > authors apparently believe that onStart/onStop are the lifecycle events > they need. > > For example, the Flurry plugin instructions direct users to override > onStart and onStop in their activity in order to handle onStop: > https://github.com/Initsogar/cordova-flurry > There are other analytics plugins that want to know about onStart/onStop > instead of onPause/onResume. > Obviously it is possible to modify your activity in order to do this in > your project, but if this capability is important, it should be possible > without abandoning the Cordova Way. > > So I was wondering what you guys think? > onPause/onResume should be good enough for anyone? > onStart/onStop are edge cases that users need to handle by modifying their > activity? > onStart/onStop cannot be handled by plugins due to timing issues? > > Thanks! > Tony > > - > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > For additional commands, e-mail: dev-h...@cordova.apache.org > >