Are setOrderType/setViewType working?

44 views
Skip to first unread message

app nav

unread,
Nov 27, 2011, 12:14:26 PM11/27/11
to Android Market API for PHP
I'm using the following code, but even if I'm setting setViewType as
"AppsRequest_ViewType::PAID", the api will return me a result with
Free apps included. Also, the result will not change even if I set
different parameters to "setOrderType".

$oAppReq= new AppsRequest();
$oAppReq-> setQuery('tennis');
$oAppReq-> setStartIndex(0);
$oAppReq-> setEntriesCount(5);
$oAppReq-> setWithExtendedInfo(true);
$oAppReq-> setOrderType(AppsRequest_OrderType::POPULAR);
$oAppReq-> setViewType(AppsRequest_ViewType::PAID);
$reqGroup= new Request_RequestGroup();
$reqGroup-> setAppsRequest($oAppReq);
$response= $session->execute($reqGroup);
$groups = $response->getResponsegroupArray();

It would be great if you could let me know how to solve this issue.

app nav

unread,
Nov 27, 2011, 12:16:24 PM11/27/11
to Android Market API for PHP
BTW, I've modified the MarketSession.php like following to make this
work with Japanese characters.

$this->context->setDeviceAndSdkVersion("passion:8");
$this->context->setUserLanguage("ja");
$this->context->setUserCountry("JP");

Niklas Nilsson

unread,
Nov 29, 2011, 2:46:17 AM11/29/11
to android-mar...@googlegroups.com
I know that there are some combinations of parameters that just won't
work together, but I haven't checked it out very much. You don't need
to modify MarketSession.php to use other language/country, just do
something like

$session = new MarketSession();
$session->context->setUserLanguage("ja");
$session->context->setUserCountry("JP");

The values in MarketSession.php are for defaults to make sure it works
without entering any values.

Reply all
Reply to author
Forward
0 new messages