Note that there are some explanatory texts on larger screens.

plurals
  1. POParsing a List<List<String>> in Android?
    primarykey
    data
    text
    <p>I'm developing a custom Adsense report tool using <a href="http://code.google.com/apis/adsense/management/complete_guide.html#ret_rep-java" rel="nofollow">Google Java Client Library</a> for <strong>Android</strong>. I've successfully authenticated and can make API calls to the server. but now when I receive the response, I don't know how to parse it and correctly show the result to user.</p> <p>According to the javaDocs, <a href="http://code.google.com/googleapps/appsscript/class_adsense_v1_schema_adsensereportsgenerateresponse.html#getRows" rel="nofollow">AdsenseReportsGenerateResponse.getRows()</a> generates a List> But I'm kinda lost how to properly parse it to get:</p> <pre><code>-Today's earnings -Yesterday's earnings -Last 7 days -Last month -From the beginning of time </code></pre> <p>Here's part of my code related to the question</p> <pre><code> Reports.Generate request = adsense.reports().generate(startDate, endDate); request.setMetric(Arrays.asList("PAGE_VIEWS", "AD_REQUESTS", "AD_REQUESTS_COVERAGE", "CLICKS", "AD_REQUESTS_CTR", "COST_PER_CLICK", "AD_REQUESTS_RPM", "EARNINGS")); request.setDimension(Arrays.asList("DATE", "WEEK", "MONTH")); request.setSort(Arrays.asList("+DATE")); AdsenseReportsGenerateResponse response = request.execute(); //TODO: Here be dragons response.getRows(); </code></pre> <p>Edit: Here is the javaDoc which mentions the <a href="http://javadoc.google-api-java-client.googlecode.com/hg-history/23952a1d2fef7ae22596fe2e920c12f704c301bb/apis/adsense/v1/com/google/api/services/adsense/model/AdsenseReportsGenerateResponse.html#getRows%28%29" rel="nofollow">getRow()</a></p> <p>Hmm it seems nobody on this site can help?!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload