/[projects]/android/MarketStats/src/dk/thoerup/marketstats/AppsCallback.java
ViewVC logotype

Annotation of /android/MarketStats/src/dk/thoerup/marketstats/AppsCallback.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 665 - (hide annotations) (download)
Fri Apr 23 15:26:21 2010 UTC (14 years, 1 month ago) by torben
File size: 1188 byte(s)
Outcommented debug statements
1 torben 663 package dk.thoerup.marketstats;
2    
3     import java.util.Formatter;
4    
5     import com.gc.android.market.api.MarketSession.Callback;
6     import com.gc.android.market.api.model.Market.App;
7     import com.gc.android.market.api.model.Market.AppsResponse;
8     import com.gc.android.market.api.model.Market.ResponseContext;
9    
10     public class AppsCallback implements Callback<AppsResponse>{
11     private StringBuilder sb;
12    
13     public void setStringBuffer(StringBuilder s) {
14     sb = s;
15     }
16    
17    
18     @Override
19     public void onResult(ResponseContext context, AppsResponse response) {
20     //System.out.println("Response : " + response);
21 torben 665 //sb.append("Response: " + response + "\n");
22 torben 663
23     Formatter form = new Formatter(sb);
24     App app = response.getApp(0);
25     sb.append( "<h2>" + app.getTitle() + "</h2>");
26     sb.append("Ver: " + app.getVersion() + " (" + app.getVersionCode() + ")\n" );
27     sb.append("Ratingcount: " + app.getRatingsCount() + "\n");
28    
29     sb.append("Rating: " );
30     double rating = Double.parseDouble( app.getRating() );
31     form.format("%.4f", rating);
32     sb.append("\n");
33    
34     sb.append("Downloads: " + app.getExtendedInfo().getDownloadsCountText() + " (" + app.getExtendedInfo().getDownloadsCount() + ")\n" );
35    
36     sb.append("\n");
37    
38     }
39    
40    
41     }

  ViewVC Help
Powered by ViewVC 1.1.20