Implementing the UI flows to intercept this is something that
containers are responsible for.  Each container tends to do this in a
different way.

You can subclass jsonrpccontainer.js and implement a better version of this:

  JsonRpcContainer.prototype.requestCreateActivity =
function(activity, priority,
      opt_callback) {
    opt_callback = opt_callback || function() {};

    var req = opensocial.newDataRequest();
    var viewer = opensocial.newIdSpec({'userId' : 'VIEWER'});
    req.add(this.newCreateActivityRequest(viewer, activity), 'key');
    req.send(function(response) {
      opt_callback(response.get('key'));
    });
  };



On Thu, Nov 25, 2010 at 9:31 AM, Justin Wyllie
<[email protected]> wrote:
>
> Hi
> The Spec (0.9) for requestCreateActivity says: 
> opensocial.requestCreateActivity(activity, priority, opt_callback)
> where priority is either
> opensocial.CreateActivityPriority.HIGH or 
> opensocial.CreateActivityPriority.LOW
>
> The spec says. "If the activity is of high importance, it will be created 
> even if this requires asking the user for permission"
>
> My understanding from this is that if it is HIGH the container should ask the 
> user for permission if the gadget wants to create an activity - presumably by 
> calling requestPermission().
>
> But in my test gadget we call requestCreateActivity with HIGH priority and 
> requestPermission is not called. The priority flag is passed to the 
> requestCreateActivity function but that does nothing with it.
>
> So - is this feature just not implemented?
>
> I am using Shindig 2.0 (the PHP version though I don't know if that makes a 
> difference to the Javascript).
> Thanks
> Justin Wyllie
>
>



-- 
Paul Lindner -- [email protected] -- linkedin.com/in/plindner

Reply via email to