Jump to content

Recommended Posts

Posted

Can anyone stop me from wasting any more time on this? @adamw Please!

I need to open an app from a html widget (because I need to send the app an assignment uuid)

I have code that does this from inside a frogcode widget, but it doesn't work in a html widget :( 

I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go.

I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name.

var c = $('div.os_core:first');
var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12";

c.trigger('os.internal.launchapp', {
  name: appID,
  assignment_uuid: "any assignment uuid",
  appModel: new Com.Frog.Model({
    'uuid' : appID,
    'role_name': Object.values(_Roles.serialize()).filter(function(role) {
      return /app\.frogplay$/gim.test(role);
    })[0],
    'extended_data' : {
      'from_package' : true
    }
  })
});   

Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode).

Any ideas?

Thanks

Paul

 

Posted
19 hours ago, pconkie said:

Can anyone stop me from wasting any more time on this? @adamw Please!

I need to open an app from a html widget (because I need to send the app an assignment uuid)

I have code that does this from inside a frogcode widget, but it doesn't work in a html widget :( 

I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go.

I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name.


var c = $('div.os_core:first');
var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12";

c.trigger('os.internal.launchapp', {
  name: appID,
  assignment_uuid: "any assignment uuid",
  appModel: new Com.Frog.Model({
    'uuid' : appID,
    'role_name': Object.values(_Roles.serialize()).filter(function(role) {
      return /app\.frogplay$/gim.test(role);
    })[0],
    'extended_data' : {
      'from_package' : true
    }
  })
});   

Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode).

Any ideas?

Thanks

Paul

 

Can't help....  but am always keen to see what Conkies cooking up.... ?

Posted
On 26/04/2020 at 01:05, pconkie said:

Can anyone stop me from wasting any more time on this? @adamw Please!

I need to open an app from a html widget (because I need to send the app an assignment uuid)

I have code that does this from inside a frogcode widget, but it doesn't work in a html widget :( 

I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go.

I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name.


var c = $('div.os_core:first');
var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12";

c.trigger('os.internal.launchapp', {
  name: appID,
  assignment_uuid: "any assignment uuid",
  appModel: new Com.Frog.Model({
    'uuid' : appID,
    'role_name': Object.values(_Roles.serialize()).filter(function(role) {
      return /app\.frogplay$/gim.test(role);
    })[0],
    'extended_data' : {
      'from_package' : true
    }
  })
});   

Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode).

Any ideas?

Thanks

Paul

 

Try:

FrogOS.openApp(
    'yourappnamehere',
    {
      assignment_uuid: "any assignment uuid",
    }
);

You have to open it with the app name, not the uuid (I think)

  • Thanks 1
Posted
25 minutes ago, adamw said:

Try:


FrogOS.openApp(
    'yourappnamehere',
    {
      assignment_uuid: "any assignment uuid",
    }
);

You have to open it with the app name, not the uuid (I think)

No, nothing.

Could my app not be called what i think it is called?

<script>
    console.log("running?")
    FrogOS.openApp(
        'app.externalapps.42134a12.activityreview',
        {
            assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941",
        }
    );
    FrogOS.openApp(
        'activityreview',
        {
            assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941",
        }
    );
    FrogOS.openApp(
        'Activity Review',
        {
            assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941",
        }
    );
</script>

It does something......I have tried the above (the last one is what it is actually called in frogcode). First one is what it is called in groups and policies.

But no app.  Looks like it can not find the correct url?

Capture.PNG.73c73ffd47ef0f35f2056d5d7df482f7.PNG

 

Posted

Hmm, I would expect the app name to be the same as it appears in your manifest - so probably something like the second example you showed.

Is the app deployed? Also, I'll need to check that we can open Frogcode apps in that way, I never thought about that before!

Posted

I put your question to the experts here at Frog and this is what they have suggested should work!

c.trigger('os.internal.launchapp', {
    data: {
        name: appID,
        appModel: new Com.Frog.Model({
            'uuid' : appID,
            'role_name': Object.values(_Roles.serialize()).filter(function(role) {
              return /app\.frogplay$/gim.test(role);
            })[0],
            'extended_data' : {
              'from_package' : true
            }
          })
    }
});

 

  • Thanks 1
Posted
1 hour ago, adamw said:

I put your question to the experts here at Frog and this is what they have suggested should work!


c.trigger('os.internal.launchapp', {
    data: {
        name: appID,
        appModel: new Com.Frog.Model({
            'uuid' : appID,
            'role_name': Object.values(_Roles.serialize()).filter(function(role) {
              return /app\.frogplay$/gim.test(role);
            })[0],
            'extended_data' : {
              'from_package' : true
            }
          })
    }
});

 

But that looks identical to what i posted!!

However - it does work. Thanks! 

BTW I do consider you an expert.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...