-
-
Save wairagi/1777329 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.test.download; | |
| import com.gc.android.market.api.MarketSession; | |
| import com.gc.android.market.api.MarketSession.Callback; | |
| import com.gc.android.market.api.model.Market.AppsRequest; | |
| import com.gc.android.market.api.model.Market.AppsResponse; | |
| import com.gc.android.market.api.model.Market.GetAssetRequest; | |
| import com.gc.android.market.api.model.Market.GetAssetResponse; | |
| import com.gc.android.market.api.model.Market.ResponseContext; | |
| public class Download { | |
| public static void main(String[] args){ | |
| MarketSession session = new MarketSession(); | |
| //this account should bind to assetId | |
| session.login("***@gmail.com","***"); | |
| session.getContext().setIsSecure(true); | |
| //change asserId | |
| GetAssetRequest assetRequest = GetAssetRequest.newBuilder().setAssetId("7********1").build(); | |
| session.append(assetRequest, new Callback<GetAssetResponse>() { | |
| @Override | |
| public void onResult(ResponseContext context,GetAssetResponse response) { | |
| System.out.println(response.toString()); | |
| } | |
| }); | |
| session.flush(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment