Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDownloadCount() function returns 0 (zero) #25

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 1 comment
Closed

getDownloadCount() function returns 0 (zero) #25

GoogleCodeExporter opened this issue Mar 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

The following example code always returns zero for the download count.

public void callInfo(String email, String passwd)
{
   try
   {
    MarketSession session = new MarketSession();
    try
    {
             session.login(email, passwd);
    }
    catch (Exception e)
    {
         System.out.println("Login Error: " + e.getMessage());
    }

            String query = "pub:xxxxxx";

            AppsRequest appsRequest = null;
            try
            {
                appsRequest = AppsRequest.newBuilder()
                        .setQuery(query)
                        .setStartIndex(0).setEntriesCount(10)
                        .setWithExtendedInfo(true)
                        .build();
            }
            catch (Exception ex)
            {
                System.out.println("Error Request: " + ex.getMessage());
            }


Callback<AppsResponse> callback = null;
try
{
    callback = new Callback<AppsResponse>()
    {
    public void onResult(ResponseContext context, AppsResponse response)
    {
       int cnt = (int) response.getAppCount();
       for (int i = 0; i < cnt; i++)
       {
                System.out.println(response.getApp(i).getPackageName() + "\tCount: "
        + response.getApp(i).getExtendedInfo().getDownloadsCount() + "\tCountText: "
        + response.getApp(i).getExtendedInfo().getDownloadsCountText());
       }
    }
   };
}
catch (Exception ec)
{
   System.out.println("Error Callback: " + ec.getMessage());
}
session.append(appsRequest, callback);
session.flush();


I am getting 0 (zero) for each app as the download counter, while the text 
field gives me the range of number of downloads correctly.


Original issue reported on code.google.com by tedm0...@gmail.com on 20 Oct 2010 at 10:05

@GoogleCodeExporter
Copy link
Author

The downloadCount field is no longer used by google - it will always turn zero.

Working as it should.

Original comment by strazz@gmail.com on 7 Dec 2010 at 1:00

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant