Pierre Hébert any chance we get the startActivityForResult method available?

Pierre Hébert any chance we get the startActivityForResult method available?

I need a file chooser for a script 😉

]]>

6 Commentsto Pierre Hébert any chance we get the startActivityForResult method available?

  1. Anonymous says:

    < ![CDATA[

    This might be possible, I need to chek this. That’s indeed an important android feature.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    After a closer look I think this is possible but with one limitation: the launcher may be stopped and restarted while another activity is started. The consequence is that the processing of the result need to be done in another script.


    This is not possible:


    LL.startActivity(intent, function(result,data) {


      // do something


    });


    But this is possible:


    LL.startActivity(intent, name_of_script_to_run_later);


    And data may need to be serialized and stored in tags.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    How about using a listener or function to handle result? I’d like to keep stuff together in one script…

    ]]>

  4. Anonymous says:

    < ![CDATA[

    because a listener or a closure (like in the example above) are objects that will disappear when the launcher dies. If android decides to kill the launcher when a new activity is started, then this volatile context cannot be saved and restored

    ]]>

  5. Anonymous says:

    < ![CDATA[

    But the started activity isn’t in the current process (llx) thread ?


    Are you sure llx could stop while an activity launched with startActivityForResult?

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Probably not the same process, but anyway this is not a process issue. When Android manages activities (screens) it has the ability to destroy and recreates them. Activities then need to save their context. But activities life cycle is decoupled from the process. The process can be kept so that it can be reused faster for instance.


    One sure is sure, if the activity is destroyed because the system decided to do it, then data becomes invalid and the context has to be recreated. Scripts are ended: function (which are objects) too.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *