[Sugar-devel] launching a native python activity window from web activity

Sam Parkinson sam.parkinson3 at gmail.com
Sat Apr 19 17:54:13 EDT 2014


Hi,

Currently there is no clean way to launch any activity from inside any
other one!

I think someone was working on an intents system, but I don't know the
status of that.

Sam


On Sun, Apr 20, 2014 at 2:38 AM, Puneet Kaur <puneet.gkaur at gmail.com> wrote:

> Hello all,
>
> I am trying to launch native activity from a webactivity , can you please
> let me know how it can be done ?
>
> I have made a small native python activity (here<https://github.com/puneetgkaur/pygame_camera>)
> {some basic gui toolbars yet to be included, just a gtk window with a
> webcam output as of now }
>
> 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
>
> Have imported this class in apisocket.py, where I try to launch activity
> by calling :
>
> python_activity_class_name(self._activity)
>
>
> The code can reach the python class from javascript but is not able to
> launch the window.
>
> It gives the error :
>
> Traceback (most recent call last):
>   File "build/bdist.linux-i686/egg/gwebsockets/server.py", line 127, in
> _message_write_cb
> gi._glib.GError: Error sending data: Broken pipe
> 1397922466.607808 ERROR root: No activities are running
> 1397922466.609076 WARNING root: icon_size is deprecated. Use pixel_size
> instead.
> Window manager warning: CurrentTime used to choose focus window; focus
> window may not be correct.
> Window manager warning: Got a request to focus 0x6000ee (main.py) with a
> timestamp of 0.  This shouldn't happen!
> Window manager warning: CurrentTime used to choose focus window; focus
> window may not be correct.
> Window manager warning: Got a request to focus the no_focus_window with a
> timestamp of 0.  This shouldn't happen!
>
> 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
>
> But the issue is that probably we are not allowed to to launch another
> activity while in webactivity, is that true ?
>
> does someone has a few ideas as to how it can be done ?
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140420/c3d04f56/attachment.html>


More information about the Sugar-devel mailing list