[Sugar-devel] Launch an Activity from another activity.

Gustavo Duarte gus.duarte at gmail.com
Wed Mar 4 17:17:26 EST 2015


Hi guys,

I need create an activity bundle which launches Browser activity, on sugar 0.104


On previously Sugar versions we can create a bundle which execute an
script like this:

#!/bin/sh

while [ -n "$2" ] ; do
    case "$1" in
        -b | --bundle-id)   bundle_id="$2"   ;;
        -a | --activity-id) activity_id="$2" ;;
        -o | --object-id)   object_id="$2"   ;;
        -u | --uri)         uri="$2"         ;;
        *) echo unknown argument $1 $2 ;;
    esac
    shift;shift
done

if [ -z "$bundle_id" -o -z "$activity_id" ] ; then
  echo ERROR: bundle-id and activity-id arguments required
  echo Aborting
  exit 1
fi
exec sugar-launch --uri "http://mysite.edu.uy"  org.laptop.WebActivity


But in 0.104, although it works, two activities are started, the
second one is the browser, and first one is once which never finished
to start.

How is the right way to configure activity.info and the script to
launch another activity ?


Thanks in advance.


Gustavo.


More information about the Sugar-devel mailing list