Android client not using Module GetResource result

Hi,

I need to consume a webpage in a layout that would take into account which is the display calling it to generate dynamic content.

I tried to modify the Method GetResource of Webpage.module.php adding the displayId as a GET parameter.

// Work out the url
$url = urldecode($this->GetOption('uri'));
$url = (preg_match('/^' . preg_quote('http') . "/", $url)) ? $url : 'http://' . $url;

//added by me
//adding directly get parameters without taking into account others existing GET parameters (others won't exist)
$url .= '?displayId=' . $displayId;

The problem is that while the windows client seems to take it into account, the android client don’t.
Why is this happening?

I have seen also that I can create my own modules. Does the android client support them? Maybe this is the way to go?

Thanks a lot.

Get resource is only called for webpages if they are set to something other than “open natively” - otherwise they… open natively :smile:

The displayId is not a GET parameter - if you have used $_GET somewhere, then that won’t work. It is passed into the GetResource call though, so perhaps you are using that?

Yes, modules are supported by both players.

Cheers,
Dan

Hi Dan,

thanks for the reply.

I’m trying to set the displayId in the webpage url not $_GET.
I’m trying the non “open natively” trick. Could you please tell me the difference?

Cheers

Open Natively doesn’t use GetResource at all… it just opens the URL provided in the Layout directly in the browser on the device.

The other two options call GetResource and save the generated HTML, which is then opened.

Hi Dan,

I have tried to set the webpage to Bestfit and Manual positions. It didn’t work.
I setted a proxy in between and I can see that the android app is never calling getResource SOAP method. Does not matter Webpage Options.

It always calls:

registerDisplay
schedule
requiredFiles
mediaInventory
notifyStatus

Can you please confirm?

EDIT: I have tested Embed Module also without success. I have overriden the getResource method of Embed Module and the android client is not calling getResource but reading the xml in the database directly.

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.