3133551 / android-market-api

Automatically exported from code.google.com/p/android-market-api
0 stars 0 forks source link

RuntimeException with "Bad request 400" for certain start index #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 rame...@gmail.com on 4 May 2010 at 10:48

GoogleCodeExporter commented 9 years ago
The api is based off of what a phone can get.

Your not going to be able to get more than the phone can (anymore, due to 
abuse).

Original comment by strazz@gmail.com on 4 May 2010 at 4:10

GoogleCodeExporter commented 9 years ago
entriesCount must be less or equal 10.
I've added a FAQ section in the wiki

Original comment by thiel.al...@gmail.com on 4 May 2010 at 4:24