Giter VIP home page Giter VIP logo

android-market-api's Introduction


Hi
I'm Carlos 'klozz' Jesus

👨‍💻 About Me :

  • :electron: I’m a Android and kernel developer by hobby.
  • 🔭 I’m currently working on Yuki ユキ kernel and clang (based on LLVM)
  • 📱 Currently supported devices Mi 11 Lite 5G NE,Xiaomi 12T Pro, POCO F5 PRO, Redmi Note 7
  • ⚡ I like to optimize and automate things.
  • 💤 Im lazy af

🛠️ Languages, Tools and OS :

Java      cpp  csharp  Java  Java  linux  lua    aarch  jekyll  bash  winbugs  archlinux  ubuntu 

🔥 My Stats :

GitHub Streak
Klozz github stats Klozz github stats trophy

✍️ My web

https://klozz.dev

android-market-api's People

Contributors

alexandrethiel avatar list-mailing avatar luberg avatar strazzere avatar

Watchers

 avatar  avatar

android-market-api's Issues

downloadCount from extendedInfo is alway zero

Hi, I have a problem gettin the number of downalod of application.

This is my code:

AppsRequest appsRequest = AppsRequest.newBuilder()
            .setQuery(query)  
            .setStartIndex(0).setEntriesCount(10)
            .setWithExtendedInfo(true)
            .build();

session.append(appsRequest, new MarketSession.Callback<AppsResponse>() {

            public void onResult(ResponseContext context, AppsResponse response) {
                            for (App app : response.getAppList()) {
                         int numDownload = app.getExtendedInfo().getDownloadsCount();  // <-- this is alway zero
                }

            }
        });


any solution ?

Original issue reported on code.google.com by [email protected] on 24 Sep 2010 at 5:49

SocketException and then NullPointerExceptions

I'm experiencing the following problem: i do get the information about a list 
of apps. Therefore i do session.append + session.flush with a Thread.sleep 
inbetween. After a while i get a SocketException and afterwars only 
NullPointerException, see the stacktraces below.
I'm using version 0.3.

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): Error getting online 
versions

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): 
java.lang.RuntimeException: java.net.SocketException: The socket level is 
invalid

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.MarketSession.executeRawHttpQuery(MarketSession.java:2
59)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.MarketSession.executeProtobuf(MarketSession.java:209)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.MarketSession.flush(MarketSession.java:180)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
de.goddchen.android.appupdate.UpdateCheckService$1.run(UpdateCheckService.java:1
55)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
java.util.Timer$TimerImpl.run(Timer.java:290)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): Caused by: 
java.net.SocketException: The socket level is invalid

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStreamImpl(Native 
Method)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStream(OSNetworkSystem.j
ava:478)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:565)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:61)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.readln(
HttpURLConnection.java:1178)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.readSer
verResponse(HttpURLConnection.java:1250)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doReque
st(HttpURLConnection.java:1546)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getResp
onseCode(HttpURLConnection.java:1273)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.MarketSession.executeRawHttpQuery(MarketSession.java:2
39)

06-22 18:43:08.547 E/de.goddchen.android.appupdate( 3535): ... 4 more

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): Error getting online 
versions

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): 
java.lang.NullPointerException

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.model.Market$Request.access$7(Market.java:7568)

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.model.Market$Request$Builder.addRequestGroup(Market.ja
va:7886)

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): at 
com.gc.android.market.api.MarketSession.append(MarketSession.java:156)

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): at 
de.goddchen.android.appupdate.UpdateCheckService$1.run(UpdateCheckService.java:1
20)

06-22 18:43:08.812 E/de.goddchen.android.appupdate( 3535): at 
java.util.Timer$TimerImpl.run(Timer.java:290)

Original issue reported on code.google.com by [email protected] on 22 Jun 2010 at 5:02

API breakage, HTTP Error code 400

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 12 Feb 2010 at 8:49

RuntimeException with "Bad request 400" for certain start index

What steps will reproduce the problem?

Market API throws bad request "Response code = 400, msg = Bad Request" for
certain indexes. 
    private static MarketSession newSession() {
        MarketSession session = new MarketSession();
        session.login("########", "#####");
        return session;
    }

    public static void main(String[] args) throws Exception {
        MarketSession session = newSession();
        MarketSession.Callback callback = new MarketSession.Callback() {
            public void onResult(ResponseContext context, Object response) {
                showCount();
            }
        };
        AppsRequest appsRequest =
AppsRequest.newBuilder().setStartIndex(190).setEntriesCount(

10).setAppType(AppType.APPLICATION).setWithExtendedInfo(false).build();
        session.append(appsRequest, callback);
        session.flush();
    }

What is the expected output? What do you see instead?

Expected: List some applications, or useful message.
Actual: RuntimeException with bad request. 

What version of the product are you using? On what operating system?
The latest API.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 16 Apr 2010 at 7:03

Return Copy Protected Apps

What steps will reproduce the problem?
1. search for pname:com.tenromans.fastemail

What is the expected output? What do you see instead?
A single result for the com.tenromans.fastemail app.

What version of the product are you using? On what operating system?
Market API version 2.0, the application is built for Android 1.5

Please provide any additional information below.
This app is protected using the "Copy Protection" flag in the Android
market.  The API does not seem to return apps from a query that have "Copy
Protection" on.


Original issue reported on code.google.com by [email protected] on 19 Mar 2010 at 10:56

Multiple requests

First of all. Thanks for sharing your job. 

1. Add request 
2. Make flush
3. Add request to same session
4. Make flush

It cause NullPointrException. It because protobuf builders for request and 
context can't be used twice. 

And previous issue, any request returns  CommentsResponce is actual. 
I fixed this bugs and simplify MarketSession class. You can see my version in 
attached file. 

While I write this text android market become unavailable. It always return  
"Server returned HTTP response code: 400".

PS 
I'm interesting in this project to so feel fre to contact me by email for help 
[email protected]

Original issue reported on code.google.com by [email protected] on 11 Feb 2010 at 9:16

Attachments:

RuntimeException in MarketSession

If in flush method RuntimeException is occur, then subsequent calls to 
MarketSession will fail because of invalid state of "request" parameter. 
"request = Request.newBuilder();" will never be called.

Solution. Use following method:

        request.setContext(ctxt);
        try {
            Response resp = executeProtobuf(request.build());
            int i = 0;
            for (ResponseGroup grp : resp.getResponseGroupList()) {
                Object val = null;
                if (grp.hasAppsResponse())
                    val = grp.getAppsResponse();
                if (grp.hasCategoriesResponse())
                    val = grp.getCategoriesResponse();
                if (grp.hasCommentsResponse())
                    val = grp.getCommentsResponse();
                if (grp.hasImageResponse())
                    val = grp.getImageResponse();
                ((Callback) callbacks.get(i)).onResult(grp.getContext(), val);
                i++;
            }
        } finally {
            request = Request.newBuilder();
            callbacks.clear();
        }


Library version : 0.3

RuntimeException is quite common thing due to 400=Bad Request.

Original issue reported on code.google.com by [email protected] on 15 Sep 2010 at 6:22

Search by package

The Android market has functionality to search by package e.g.,
http://market.android.com/search?q=pname:<package>

That would be an excellent addition.  Right now it looks like the keyword
search is only searching the App Description field.

Original issue reported on code.google.com by [email protected] on 7 Mar 2010 at 12:37

Always missing one search result ?

What steps will reproduce the problem?
1.Any search with pname or pub 
for exemple, 
a-"pname:org.jruby.ruboto.irb"
b-"pub="\nTextogic Inc"


What is the expected output? What do you see instead?
a- the expect output is "title": "Ruboto IRB",
while the output is empty.
I have got entriesCount = 1, but the mReponse.getAppList().size() = 0

b- I am expecting 4 applications, I see only 3.
One more time, I have got  entriesCount = 4, but the
mReponse.getAppList().size() = 3


What version of the product are you using? On what operating system?
0.3



Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 9:17

getDownloadCount() function returns 0 (zero)

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 [email protected] on 20 Oct 2010 at 10:05

RuntimeException with "Bad request 400" for certain start index

The following code is written to get the applications list from 0 to 11

AppsRequest appsRequest = AppsRequest.newBuilder()
                                        .setQuery("app")
                                        .setStartIndex(0).setEntriesCount(11)
                                        .setWithExtendedInfo(false)
                                        .build();

I am getting the following error:

java.lang.RuntimeException: java.lang.RuntimeException: Response code =
400, msg = Bad Request   
    at
com.gc.android.market.api.MarketSession.executeRawHttpQuery(MarketSession.java:2
59)

    at
com.gc.android.market.api.MarketSession.executeProtobuf(MarketSession.java:209)

    at
com.gc.android.market.api.MarketSession.flush(MarketSession.java:180)     

    at com.ramesp.andapp.Settings.getContent(Settings.java:117)           

    at com.ramesp.andapp.Settings.access$0(Settings.java:55)              

    at com.ramesp.andapp.Settings$1.handleMessage(Settings.java:36)       

    at android.os.Handler.dispatchMessage(Handler.java:99)                

    at android.os.Looper.loop(Looper.java:123)                            

    at android.app.ActivityThread.main(ActivityThread.java:4363)          

    at java.lang.reflect.Method.invokeNative(Native Method)               

    at java.lang.reflect.Method.invoke(Method.java:521)                   

    at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)       

    at dalvik.system.NativeStart.main(Native Method)                      

Caused by: java.lang.RuntimeException: Response code = 400, msg = Bad
Request                    
    at
com.gc.android.market.api.MarketSession.executeRawHttpQuery(MarketSession.java:2
40)

    ... 13 more                                                           



Does it mean, I cannot get the search list more than 10 results? Or is
there another way to get it?

Thank you for your Help,
Rames.P.

Original issue reported on code.google.com by [email protected] on 4 May 2010 at 10:48

Add support for 'purchased' field

The proto lacks support for the 'purchased' extended application field (#34).  
It definitely seems to be an int and returns 3 if the user has purchased it.  
I've modified the source to include this field for my projects, but it might 
be useful for other devs to have this pre-included.  Any chance you could add 
this field to the next release?

Original issue reported on code.google.com by [email protected] on 11 May 2010 at 7:23

Can't find 2.0 apps

What steps will reproduce the problem?
1. Search for pname:com.google.earth

What is the expected output? What do you see instead?
An array with Google Earth at the first position. I see an empty array.

I think is useful to access the market as a Nexus One or any 2.0 device.
You are accessing as a 1.5 or 1.6 and you can't retrieve info about new
programs.


Original issue reported on code.google.com by [email protected] on 10 Mar 2010 at 12:27

Remove Eclipse project from svn

I think you should remove the eclipse settings files and bin directory from
the svn repository. These don't need to be versioned and are a bit of pain
to deal if other developers want to use eclipse and/or submit patches.

Original issue reported on code.google.com by [email protected] on 22 Apr 2010 at 8:02

Retrieve release date?

Might it be possible to retrieve the release date of an application? 

Or can this be made possible?

Original issue reported on code.google.com by [email protected] on 9 Jul 2010 at 12:04

Not getting category of app after polling so many entries

Hi,
I have got categories of app with my google account,
I had around 160000 apps. To get categories of these app,I use android market 
api; but after some days or after polling some entries, I am not able to use 
same google account,

Why is it so?
Is it because of polling so many entries?
If yes is there any other option for it? Do I need to change any settings of my 
google account?
Plesae help me with this.

Original issue reported on code.google.com by [email protected] on 17 Jul 2013 at 7:36

How should we get the ANDROID_ID??

Hi, 
I work for a smart phone device company.

I want to update application that is built-in (apk files in system/app) from 
google market.

we already included feature (\frameworks\base\data\etc\~.xml) not to show any 
other person when we open that application in your market, and we used 
<uses-feature> tag in that app in order to filter at market.

With that works, when we upload our application to your market, we checked out 
that applications are only shown in our phone. 

But, when we search applications with using <market open api> that shared to 
other developers, we cannot find our applications at the market.

We can use the search function when we search through mymarket or google market 
but the search function doesn’t work with the application created with the 
use of market open api. 

Apps that has no features can be find easyily, but we cannot find our system 
applications.

So we checked out the differenciations between them and found out 
(RequestContext.Builder.setAndroidId API) is different in 
RequestContext.Builder (about android ID)


We were able to search for the applications that use the distinct features of 
the manufacturer when we configured the setting with the androidID value that 
we got through base64 decoding which is the packet that’s sent out randomly 
when the google market search function is used.  

AndriodID is not IMSI value, not IMEI value, not Settings.Secure.ANDROID_ID 
value.

How should we get the value?  
(We can perform platform signing and we have access to all authorization.)

Another questions is that we need to know the ID and the password when we log 
in to the market and we can figure out the ID through account manager. 

We can get it through the method of getPassword through the accountManager’s 
password and this is not an actual password value but a very long string which 
is in a code. 

It starts with ‘AFcb4KQ…’ and goes on and on. 

I would like to ask for your assistance in getting the password as well.  


Thank you and we will wait for your reply. 


Original issue reported on code.google.com by [email protected] on 7 Nov 2010 at 3:33

Setting ViewType has no affect?

When creating an AppsRequest object, using the #setViewType(view: 
AppsRequest.ViewType) 
method does not appear to have any affect on the results returned from the 
Android Market.  
Namely, setting view type to "FREE" or "PAID" returns the same results as "ALL".

I am using version 0.2.


Original issue reported on code.google.com by [email protected] on 1 Mar 2010 at 5:55

Wrong number of rates

Library version : protobuf-java.2.2.0.jar and androidmarketapi-0.6.jar

Description : When I try to download the detailed info of my apps, the ratings 
count and value are not the same (is minor) that the ones I see in the Android 
publisher page. That used to work but not now. Thanks in advance!

Original issue reported on code.google.com by [email protected] on 15 Apr 2012 at 3:30

apps with <uses-feature android:name="android.software.live_wallpaper" /> aren't retrieved

What steps will reproduce the problem?

session.setOperatorO2();
session.getContext().setDeviceAndSdkVersion("sapphire:7");
session.login("user","passw")
appsRequest = AppsRequest.newBuilder()
                                .setQuery("andforge")
                                .setStartIndex(0).setEntriesCount(10)
                                .setWithExtendedInfo(true)
                                .build();


What is the expected output? What do you see instead?

There should be 9 apps, but instead ...  only 7 are retrieved.


What version of the product are you using? On what operating system?
android-market-api 0.3


Please provide any additional information below.
- All Apps are without! copy protection.

The two missing apps have the line
<uses-feature android:name="android.software.live_wallpaper"></uses-feature>
in their manifest. I'm pretty sure that this is the problem. :(







Original issue reported on code.google.com by [email protected] on 21 Mar 2010 at 8:56

Can not find my app

Library version : 0.3

Description : My app exists in the market and has existed for over a week 
however using the library I can not find it by using pub: pname: or regular 
search.

Searches that are returning 0 for me
"Lucky Suite"
pub:Toxic Bakery
pname:com.ToxicBakery.games.luckysuite

All of these searches work in the android market however which is what I 
find confusing. What am I missing?

Original issue reported on code.google.com by [email protected] on 3 Jun 2010 at 4:09

RuntimeException with "Bad request 400" again

Hello. Please help me.
When I type the following command. It will display Bad request 400.
java -jar androidmarketapi-0.3.jar <email> <mypassword> maps
How can i solve it?
Thank you

Original issue reported on code.google.com by [email protected] on 25 Nov 2010 at 4:15

Response code 503

Library version : current

Description : I make a alot of requests for application information and app
icons. Very often, I recieve "Response code = 503, msg = Service
Unavailable". What is the reason for this? Is the number of requests limited?


Original issue reported on code.google.com by matboehmer on 19 May 2010 at 10:11

app's .apk download

Comment 3 by greenmaomao, Apr 26, 2010
how can i download the query app's .apk file? Thank you very much!

Comment 4 by lberger, May 02 
I would also like to know how to download the query app's .apk file!

Original issue reported on code.google.com by [email protected] on 4 May 2010 at 4:33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.