vinay035 / android-market-api

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

Return Copy Protected Apps #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 ldonel...@gmail.com on 19 Mar 2010 at 10:56

GoogleCodeExporter commented 9 years ago
I was able to get this working by using a real Android device id in:
context.setAndroidId("0000000000000000"); 

Original comment by ldonel...@gmail.com on 19 Mar 2010 at 11:26

GoogleCodeExporter commented 9 years ago

Original comment by thiel.al...@gmail.com on 20 Mar 2010 at 8:34

GoogleCodeExporter commented 9 years ago
Dear,

I tested the following code on an real device and had no application in 
response.
I tested with several packages names (protected or not) 
Exemple : pname:sagemilk.com.top1000.rock, pname:com.numerama.widget,
pname:com.tenromans.fastemail.
When I do a simple search, seems that with some key word (Numerama - not 
protected
app), I could find no apps (normal result 1 app).

Regards,

Olivier

MarketSession session = new MarketSession();

session.getContext().setAndroidId(((TelephonyManager)getSystemService(Context.TE
LEPHONY_SERVICE)).getDeviceId());
session.setOperatorSFR()
session.login(EMAIL, PASSWORD);

AppsRequest appsRequest = AppsRequest.newBuilder()
      .setQuery("pname:com.tenromans.fastemail")
      .setStartIndex(1).setEntriesCount(10)
      .setWithExtendedInfo(true)
      .build();

Original comment by yodut...@gmail.com on 1 Apr 2010 at 1:36

GoogleCodeExporter commented 9 years ago
I just tryied to set Android Id with the following value  
Settings.System.getString(getContentResolver(),android.provider.Settings.Secure.
ANDROID_ID)
That changes nothing to my problem.

Regards,

Olivier

Original comment by yodut...@gmail.com on 1 Apr 2010 at 2:01

GoogleCodeExporter commented 9 years ago
If you're working on an emulator then 
android.provider.Settings.Secure.ANDROID_ID
returns and empty string.

Original comment by ldonel...@gmail.com on 1 Apr 2010 at 3:19

GoogleCodeExporter commented 9 years ago
Thanks for answering,

I was working on a real device. 
After testing several search, it appears my problem is :  there is always one 
search
result missing.
If there is only one result, I am never able to display the result 
(I have got : entriesCount = 1, but the application list is empty)
I test with "pub:\"TextLogic Inc\n", I have got : entriesCount =4, and the
application list = 3. (correct result = 4)

Do you have the same result ?

Original comment by yodut...@gmail.com on 6 Apr 2010 at 8:22

GoogleCodeExporter commented 9 years ago
My mistake,

I set .setStartIndex(1) while it must be set at .setStartIndex(0).

Thanks for that great api

Original comment by yodut...@gmail.com on 6 Apr 2010 at 10:15

GoogleCodeExporter commented 9 years ago
Sorry, included sample was stupid

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