Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ldrolez/android-market-api
Automatically exported from code.google.com/p/android-market-api
https://github.com/ldrolez/android-market-api
Last synced: about 1 month ago
JSON representation
Automatically exported from code.google.com/p/android-market-api
- Host: GitHub
- URL: https://github.com/ldrolez/android-market-api
- Owner: ldrolez
- Created: 2015-04-29T19:00:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-11T14:20:13.000Z (over 8 years ago)
- Last Synced: 2023-03-01T15:33:11.573Z (almost 2 years ago)
- Language: Java
- Size: 3 MB
- Stars: 9
- Watchers: 5
- Forks: 5
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An open-source API for the Android Market #
**This is not an official api. I'm not afiliated to google in any way.**
**Export from Google Code, original author: Thiel.Alexandre**This library allow you to ask directly google's official android market servers for information, search for apps, ...
Main target is java but it can be easily adapted to other languages since it's [Google ProtoBuf](https://code.google.com/p/protobuf/) based.
There is a Ruby port by jberkel [here](http://github.com/jberkel/supermarket) and a PHP port by splitfeed [here](https://github.com/koconder/android-market-api-php). These is also a crawler on top of this library by Raunak Gupta [here](https://code.google.com/p/android-marketplace-crawler/).
## Requirement ##
No specific requirement, it use java.net.URL for communication with the google market server, that's all. So it should run without problem on Google App Engine or in an Android app.
Include androidmarketapi-X.Y.jar and protobuf-java-X.Y.Z.jar in your classpath and you're good to go.## Current progress ##
* You can browse market with any carrier or locale you want.
* Search for apps using keywords or package name.
* Retrieve an app info using an app ID.
* Retrieve comments using an app ID.
* Get PNG screenshots and icon## Version History ##
* Version 0.6 : Fix corrupted session when exception occur. Change default android id and default sdk version
* Version 0.5 : Fix random 400 errors, fields recentChanges and promotionalVideo added
* Version 0.4 : Better error handling at login, default to android 2.2 (passion:8)
* Version 0.3 : GetImage api added, now searching for android 2.0 apps## About authentication ##
A google account is required.
You can use the login method with a valid login/password pair
or provide an authsub token for service "android".See [Auth for installed apps](http://code.google.com/intl/fr/apis/accounts/docs/AuthForInstalledApps.html) for more info about authsub.
You can also get a valid authsub token from an android device using the unofficial google clientlogin api for android (client.jar), see details [here](WithAndroid.md).## Basic Command-line usage ##
put the 2 jars in a folder and type :
java -jar androidmarketapi-X.Y.jar myemail mypassword myquery## Basic Java Example ##
```
MarketSession session = new MarketSession();
session.login(email,password);
session.getContext.setAndroidId(myAndroidId);String query = "maps";
AppsRequest appsRequest = AppsRequest.newBuilder()
.setQuery(query)
.setStartIndex(0).setEntriesCount(10)
.setWithExtendedInfo(true)
.build();
session.append(appsRequest, new Callback() {
@Override
public void onResult(ResponseContext context, AppsResponse response) {
// Your code here
// response.getApp(0).getCreator() ...
// see AppsResponse class definition for more infos
}
});
session.flush();
```Check out how to :
* [HowToSearchApps](HowToSearchApps.md)
* [HowToGetAppComments](HowToGetAppsComments.md)
* [HowToGetAppScreenshot](HowToGetAppScreenshot.md)## How can i help ? ##
* Contributions are welcome ! The project is mainly missing documentation and examples...