<div dir="ltr">Thanks for replying and giving the pointers.I guess strategy for python activity launching another can be made useful and the ideas can be imported for the webactivity as well.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 20, 2014 at 8:09 AM, Sam Parkinson <span dir="ltr"><<a href="mailto:sam.parkinson3@gmail.com" target="_blank">sam.parkinson3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Ah, the develop activity. It actually has a nice simple hack<br><br>        <br>        from jarabe.model import bundleregistry<br>
        from sugar3.activity import activityfactory<br><br>        registry = bundleregistry.get_registry()<br>

        bundle = registry.get_bundle(self.bundle.get_bundle_id())<br>        activityfactory.create(bundle)<br><br><br></div>But that is launching an activity from a python activity. Maybe you need to make some sort of shim for the web activity.<br>


</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 20, 2014 at 12:33 PM, Sebastian Silva <span dir="ltr"><<a href="mailto:sebastian@fuentelibre.org" target="_blank">sebastian@fuentelibre.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div>I haven't seen how it does it, but Develop Activity does launch the active activity/project.</div><div><br>


</div><div>I dunno if it's "clean", but it works!</div><div><br></div><div>Regards,</div><div>Sebastian</div><div><br>El sáb, 19 de abr 2014 a las 4:54 PM, Sam Parkinson <<a href="mailto:sam.parkinson3@gmail.com" target="_blank">sam.parkinson3@gmail.com</a>> escribió:<div>


<div><br>
<blockquote type="cite"><div dir="ltr"><div><div><div>Hi,<br><br></div>Currently there is no clean way to launch any activity from inside any other one!<br><br></div>I think someone was working on an intents system, but I don't know the status of that.<br>




<br></div><div>Sam</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 20, 2014 at 2:38 AM, Puneet Kaur <span dir="ltr"><<a href="mailto:puneet.gkaur@gmail.com" target="_blank">puneet.gkaur@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello all,<br><br></div>I am trying to launch native activity from a webactivity , can you please let me know how it can be done ?<br>




<br>I have made a small native python activity (<a href="https://github.com/puneetgkaur/pygame_camera" target="_blank">here</a>) {some basic gui toolbars yet to be included, just a gtk window with a webcam output as of now }<br>





</div><br>I have put the activity code in /home/puneet/sugar-build/build/out/install/lib/python2.7/site-packages, so that it can accessible by other python classes<br><br>Have imported this class in apisocket.py, where I try to launch activity by calling :<br>





<br>python_activity_class_name(self._activity)<br><br><br></div><div>The code can reach the python class from javascript but is not able to launch the window.<br></div><div><br></div>It gives the error :<br><span style="background-color:rgb(249,203,156)"><br>





Traceback (most recent call last):<br>  File "build/bdist.linux-i686/egg/gwebsockets/server.py", line 127, in _message_write_cb<br>gi._glib.GError: Error sending data: Broken pipe<br>1397922466.607808 ERROR root: No activities are running<br>





1397922466.609076 WARNING root: icon_size is deprecated. Use pixel_size instead.<br>Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.<br>Window manager warning: Got a request to focus 0x6000ee (main.py) with a timestamp of 0.  This shouldn't happen!<br>





Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.<br>Window manager warning: Got a request to focus the no_focus_window with a timestamp of 0.  This shouldn't happen!</span><br>





<br></div><div>So the strategy behind the methodology is to pass on the control from the webactivity to the python activity and then back from python activity to webactivity when the user clicks to capture<br><br></div>But the issue is that probably we are not allowed to to launch another activity while in webactivity, is that true ?<br>





<br></div>does someone has a few ideas as to how it can be done ?<br><br><br></div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>