/[projects]/android/admob/javadoc/com/admob/android/ads/AdManager.html
ViewVC logotype

Contents of /android/admob/javadoc/com/admob/android/ads/AdManager.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 337 - (show annotations) (download) (as text)
Wed Sep 23 12:54:05 2009 UTC (14 years, 8 months ago) by torben
File MIME type: text/html
File size: 23704 byte(s)
import admob library
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.6.0_13) on Tue Jul 28 18:25:37 PDT 2009 -->
6 <TITLE>
7 AdManager
8 </TITLE>
9
10 <META NAME="date" CONTENT="2009-07-28">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="AdManager";
19 }
20 }
21 </SCRIPT>
22 <NOSCRIPT>
23 </NOSCRIPT>
24
25 </HEAD>
26
27 <BODY BGCOLOR="white" onload="windowTitle();">
28 <HR>
29
30
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35 <TR>
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/admob/android/ads/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AdManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47 </TR>
48 </TABLE>
49 </TD>
50 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51 </EM>
52 </TD>
53 </TR>
54
55 <TR>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 &nbsp;PREV CLASS&nbsp;
58 &nbsp;<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads"><B>NEXT CLASS</B></A></FONT></TD>
59 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60 <A HREF="../../../../index.html?com/admob/android/ads/AdManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
61 &nbsp;<A HREF="AdManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
62 &nbsp;<SCRIPT type="text/javascript">
63 <!--
64 if(window==top) {
65 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 }
67 //-->
68 </SCRIPT>
69 <NOSCRIPT>
70 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71 </NOSCRIPT>
72
73
74 </FONT></TD>
75 </TR>
76 <TR>
77 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81 </TR>
82 </TABLE>
83 <A NAME="skip-navbar_top"></A>
84 <!-- ========= END OF TOP NAVBAR ========= -->
85
86 <HR>
87 <!-- ======== START OF CLASS DATA ======== -->
88 <H2>
89 <FONT SIZE="-1">
90 com.admob.android.ads</FONT>
91 <BR>
92 Class AdManager</H2>
93 <PRE>
94 java.lang.Object
95 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.admob.android.ads.AdManager</B>
96 </PRE>
97 <HR>
98 <DL>
99 <DT><PRE>public class <B>AdManager</B><DT>extends java.lang.Object</DL>
100 </PRE>
101
102 <P>
103 Provides data required to deliver ads. As a developer if you know more about the user,
104 such as their gender or birthday, you can set those attributes here to deliver more relevant
105 advertisements to your users.
106 <P>
107
108 <P>
109 <HR>
110
111 <P>
112 <!-- ======== NESTED CLASS SUMMARY ======== -->
113
114 <A NAME="nested_class_summary"><!-- --></A>
115 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
116 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
118 <B>Nested Class Summary</B></FONT></TH>
119 </TR>
120 <TR BGCOLOR="white" CLASS="TableRowColor">
121 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
122 <CODE>static&nbsp;class</CODE></FONT></TD>
123 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads">AdManager.Gender</A></B></CODE>
124
125 <BR>
126 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Male and Female genders.</TD>
127 </TR>
128 </TABLE>
129 &nbsp;<!-- =========== FIELD SUMMARY =========== -->
130
131 <A NAME="field_summary"><!-- --></A>
132 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135 <B>Field Summary</B></FONT></TH>
136 </TR>
137 <TR BGCOLOR="white" CLASS="TableRowColor">
138 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139 <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
140 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#SDK_VERSION">SDK_VERSION</A></B></CODE>
141
142 <BR>
143 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This SDK version.</TD>
144 </TR>
145 </TABLE>
146 &nbsp;
147 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
148
149 <A NAME="constructor_summary"><!-- --></A>
150 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
151 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
152 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
153 <B>Constructor Summary</B></FONT></TH>
154 </TR>
155 <TR BGCOLOR="white" CLASS="TableRowColor">
156 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#AdManager()">AdManager</A></B>()</CODE>
157
158 <BR>
159 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
160 </TR>
161 </TABLE>
162 &nbsp;
163 <!-- ========== METHOD SUMMARY =========== -->
164
165 <A NAME="method_summary"><!-- --></A>
166 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
167 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
168 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
169 <B>Method Summary</B></FONT></TH>
170 </TR>
171 <TR BGCOLOR="white" CLASS="TableRowColor">
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173 <CODE>protected static&nbsp;void</CODE></FONT></TD>
174 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#clientError(java.lang.String)">clientError</A></B>(java.lang.String&nbsp;message)</CODE>
175
176 <BR>
177 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delivers a critical error message to the user.</TD>
178 </TR>
179 <TR BGCOLOR="white" CLASS="TableRowColor">
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181 <CODE>static&nbsp;java.util.GregorianCalendar</CODE></FONT></TD>
182 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#getBirthday()">getBirthday</A></B>()</CODE>
183
184 <BR>
185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the birthday of the user.</TD>
186 </TR>
187 <TR BGCOLOR="white" CLASS="TableRowColor">
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189 <CODE>static&nbsp;android.location.Location</CODE></FONT></TD>
190 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#getCoordinates(android.content.Context)">getCoordinates</A></B>(android.content.Context&nbsp;context)</CODE>
191
192 <BR>
193 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the last known location of the user.</TD>
194 </TR>
195 <TR BGCOLOR="white" CLASS="TableRowColor">
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197 <CODE>static&nbsp;<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads">AdManager.Gender</A></CODE></FONT></TD>
198 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#getGender()">getGender</A></B>()</CODE>
199
200 <BR>
201 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the user's gender.</TD>
202 </TR>
203 <TR BGCOLOR="white" CLASS="TableRowColor">
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205 <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
206 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#getPublisherId(android.content.Context)">getPublisherId</A></B>(android.content.Context&nbsp;context)</CODE>
207
208 <BR>
209 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the unique ID assigned to this application by AdMob.</TD>
210 </TR>
211 <TR BGCOLOR="white" CLASS="TableRowColor">
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213 <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
214 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#getUserId(android.content.Context)">getUserId</A></B>(android.content.Context&nbsp;context)</CODE>
215
216 <BR>
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a unique user ID.</TD>
218 </TR>
219 <TR BGCOLOR="white" CLASS="TableRowColor">
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221 <CODE>static&nbsp;boolean</CODE></FONT></TD>
222 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#isInTestMode()">isInTestMode</A></B>()</CODE>
223
224 <BR>
225 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns if the SDK is in test mode or not.</TD>
226 </TR>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>static&nbsp;void</CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#setBirthday(java.util.GregorianCalendar)">setBirthday</A></B>(java.util.GregorianCalendar&nbsp;birthday)</CODE>
231
232 <BR>
233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the birthday of the user.</TD>
234 </TR>
235 <TR BGCOLOR="white" CLASS="TableRowColor">
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237 <CODE>static&nbsp;void</CODE></FONT></TD>
238 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#setBirthday(int, int, int)">setBirthday</A></B>(int&nbsp;year,
239 int&nbsp;month,
240 int&nbsp;day)</CODE>
241
242 <BR>
243 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the birthday of the user.</TD>
244 </TR>
245 <TR BGCOLOR="white" CLASS="TableRowColor">
246 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247 <CODE>static&nbsp;void</CODE></FONT></TD>
248 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#setGender(com.admob.android.ads.AdManager.Gender)">setGender</A></B>(<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads">AdManager.Gender</A>&nbsp;gender)</CODE>
249
250 <BR>
251 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the gender of the user to either male or female.</TD>
252 </TR>
253 <TR BGCOLOR="white" CLASS="TableRowColor">
254 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
255 <CODE>static&nbsp;void</CODE></FONT></TD>
256 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#setInTestMode(boolean)">setInTestMode</A></B>(boolean&nbsp;testing)</CODE>
257
258 <BR>
259 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if ad requests should fetch the test ad or make a real ad request.</TD>
260 </TR>
261 <TR BGCOLOR="white" CLASS="TableRowColor">
262 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263 <CODE>static&nbsp;void</CODE></FONT></TD>
264 <TD><CODE><B><A HREF="../../../../com/admob/android/ads/AdManager.html#setPublisherId(java.lang.String)">setPublisherId</A></B>(java.lang.String&nbsp;id)</CODE>
265
266 <BR>
267 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Programatic way to sets the unique publisher ID assigned to this application by AdMob.</TD>
268 </TR>
269 </TABLE>
270 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
271 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
272 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
273 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
274 </TR>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
277 </TR>
278 </TABLE>
279 &nbsp;
280 <P>
281
282 <!-- ============ FIELD DETAIL =========== -->
283
284 <A NAME="field_detail"><!-- --></A>
285 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
287 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
288 <B>Field Detail</B></FONT></TH>
289 </TR>
290 </TABLE>
291
292 <A NAME="SDK_VERSION"><!-- --></A><H3>
293 SDK_VERSION</H3>
294 <PRE>
295 public static final java.lang.String <B>SDK_VERSION</B></PRE>
296 <DL>
297 <DD>This SDK version. It is passed in every ad request in the <code>client_sdk</code>
298 field. The server can use this for any version-specific logic.
299 <P>
300 <DL>
301 <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.admob.android.ads.AdManager.SDK_VERSION">Constant Field Values</A></DL>
302 </DL>
303
304 <!-- ========= CONSTRUCTOR DETAIL ======== -->
305
306 <A NAME="constructor_detail"><!-- --></A>
307 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
308 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
309 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
310 <B>Constructor Detail</B></FONT></TH>
311 </TR>
312 </TABLE>
313
314 <A NAME="AdManager()"><!-- --></A><H3>
315 AdManager</H3>
316 <PRE>
317 public <B>AdManager</B>()</PRE>
318 <DL>
319 </DL>
320
321 <!-- ============ METHOD DETAIL ========== -->
322
323 <A NAME="method_detail"><!-- --></A>
324 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
325 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
326 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
327 <B>Method Detail</B></FONT></TH>
328 </TR>
329 </TABLE>
330
331 <A NAME="clientError(java.lang.String)"><!-- --></A><H3>
332 clientError</H3>
333 <PRE>
334 protected static void <B>clientError</B>(java.lang.String&nbsp;message)</PRE>
335 <DL>
336 <DD>Delivers a critical error message to the user. These errors mean the ad cannot work.
337 For example if the publisher ID is not configured correctly.
338 <P>
339 <DD><DL>
340 <DT><B>Parameters:</B><DD><CODE>message</CODE> - is a the error message for the user. It should be less than 50 characters
341 if possible.</DL>
342 </DD>
343 </DL>
344 <HR>
345
346 <A NAME="getPublisherId(android.content.Context)"><!-- --></A><H3>
347 getPublisherId</H3>
348 <PRE>
349 public static java.lang.String <B>getPublisherId</B>(android.content.Context&nbsp;context)</PRE>
350 <DL>
351 <DD>Gets the unique ID assigned to this application by AdMob.
352 <P>
353 <DD><DL>
354 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context used to get the user's location.
355 <DT><B>Returns:</B><DD>The publisher ID for this application.</DL>
356 </DD>
357 </DL>
358 <HR>
359
360 <A NAME="setPublisherId(java.lang.String)"><!-- --></A><H3>
361 setPublisherId</H3>
362 <PRE>
363 public static void <B>setPublisherId</B>(java.lang.String&nbsp;id)</PRE>
364 <DL>
365 <DD>Programatic way to sets the unique publisher ID assigned to this application by AdMob.
366 Typically, however, it is set in your AndroidManifest.xml by adding it within the
367 "<code>&lt;application&gt</code>" tag:
368 <pre><code>
369 &lt;meta-data android:name="ADMOB_PUBLISHER_ID" android:value="Your Publisher ID here" /&gt;
370 </code></pre>
371 <P>
372 <DD><DL>
373 <DT><B>Parameters:</B><DD><CODE>id</CODE> - is the publisher ID for this application.</DL>
374 </DD>
375 </DL>
376 <HR>
377
378 <A NAME="isInTestMode()"><!-- --></A><H3>
379 isInTestMode</H3>
380 <PRE>
381 public static boolean <B>isInTestMode</B>()</PRE>
382 <DL>
383 <DD>Returns if the SDK is in test mode or not. Test mode is helpful in development
384 because the same test ad is always returned. Normal ad requests might time out
385 or might not fill so it is possible no ad is returned.
386 <p>
387 <i>Never release you application with test mode enabled!</i> You can only make
388 money by showing real ads so when placing your application in the Market test
389 mode must be <code>false</code>.
390 <P>
391 <DD><DL>
392
393 <DT><B>Returns:</B><DD><code>true</code> if the test ad is always returned or <code>false</code>
394 if normal ad requests are made.</DL>
395 </DD>
396 </DL>
397 <HR>
398
399 <A NAME="setInTestMode(boolean)"><!-- --></A><H3>
400 setInTestMode</H3>
401 <PRE>
402 public static void <B>setInTestMode</B>(boolean&nbsp;testing)</PRE>
403 <DL>
404 <DD>Sets if ad requests should fetch the test ad or make a real ad request. Setting this
405 to <code>true</code> means you should always see the same ad returned. This is useful
406 to make sure you AdMob SDK integration is working. Once you see the ad displayed as
407 you'd expect you should make sure this is <code>false</code> (the default).
408 <p>
409 Typically this is set through your XML layout file using the "<code>admob:testing</code>"
410 attribute. Note that setting test mode on one ad view will enable it for all of them.
411 For example:
412 <pre><code>
413 &lt;com.admob.android.ads.AdView
414 android:layout_width="fill_parent"
415 android:layout_height="wrap_content"
416 admob:testing="true"
417 /&gt;
418 </code></pre>
419 <P>
420 <DD><DL>
421 <DT><B>Parameters:</B><DD><CODE>testing</CODE> - should be set to <code>true</code> to always get the same test ad back.</DL>
422 </DD>
423 </DL>
424 <HR>
425
426 <A NAME="getUserId(android.content.Context)"><!-- --></A><H3>
427 getUserId</H3>
428 <PRE>
429 public static java.lang.String <B>getUserId</B>(android.content.Context&nbsp;context)</PRE>
430 <DL>
431 <DD>Returns a unique user ID.
432 <P>
433 <DD><DL>
434 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context used to get a unique ID for this user.
435 <DT><B>Returns:</B><DD>The unique user ID.</DL>
436 </DD>
437 </DL>
438 <HR>
439
440 <A NAME="getCoordinates(android.content.Context)"><!-- --></A><H3>
441 getCoordinates</H3>
442 <PRE>
443 public static android.location.Location <B>getCoordinates</B>(android.content.Context&nbsp;context)</PRE>
444 <DL>
445 <DD>Returns the last known location of the user.
446 <p>
447 For this to return data the application needs permission to access the location
448 services of the phone. Copy-and-paste one of the following lines into manifest.xml just before the
449 final tag "<code>&lt;/manifest&gt</code>":
450 <pre><code>
451 &lt;uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION" /&gt;
452 &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
453 </code></pre>
454 <p>
455 For the purposes of serving ads the course location is great. It also uses much
456 less battery. Fine location is only recommended if your application already needs
457 the GPS (in which case adding course location is optional).
458 <P>
459 <DD><DL>
460 <DT><B>Parameters:</B><DD><CODE>context</CODE> - is the application's context used to get the user's location.
461 <DT><B>Returns:</B><DD>The last known location of the user or <code>null</code> if
462 it is not known.</DL>
463 </DD>
464 </DL>
465 <HR>
466
467 <A NAME="getBirthday()"><!-- --></A><H3>
468 getBirthday</H3>
469 <PRE>
470 public static java.util.GregorianCalendar <B>getBirthday</B>()</PRE>
471 <DL>
472 <DD>Returns the birthday of the user. This is used to calculate their age.
473 <P>
474 <DD><DL>
475
476 <DT><B>Returns:</B><DD>The birthday of the user or <code>null</code> if it is not known.</DL>
477 </DD>
478 </DL>
479 <HR>
480
481 <A NAME="setBirthday(java.util.GregorianCalendar)"><!-- --></A><H3>
482 setBirthday</H3>
483 <PRE>
484 public static void <B>setBirthday</B>(java.util.GregorianCalendar&nbsp;birthday)</PRE>
485 <DL>
486 <DD>Sets the birthday of the user.
487 <P>
488 <DD><DL>
489 <DT><B>Parameters:</B><DD><CODE>birthday</CODE> - is the user's birthday or <code>null</code> if it is not known.</DL>
490 </DD>
491 </DL>
492 <HR>
493
494 <A NAME="setBirthday(int, int, int)"><!-- --></A><H3>
495 setBirthday</H3>
496 <PRE>
497 public static void <B>setBirthday</B>(int&nbsp;year,
498 int&nbsp;month,
499 int&nbsp;day)</PRE>
500 <DL>
501 <DD>Sets the birthday of the user.
502 <P>
503 <DD><DL>
504 <DT><B>Parameters:</B><DD><CODE>year</CODE> - is the year they were born in (e.g. 1976).<DD><CODE>month</CODE> - is the month they were born in (e.g. 3 for March).<DD><CODE>day</CODE> - is the day they were born on (e.g. 13 for the 13th).</DL>
505 </DD>
506 </DL>
507 <HR>
508
509 <A NAME="getGender()"><!-- --></A><H3>
510 getGender</H3>
511 <PRE>
512 public static <A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads">AdManager.Gender</A> <B>getGender</B>()</PRE>
513 <DL>
514 <DD>Returns the user's gender.
515 <P>
516 <DD><DL>
517
518 <DT><B>Returns:</B><DD>The gender of the user or <code>null</code> if it is not known.</DL>
519 </DD>
520 </DL>
521 <HR>
522
523 <A NAME="setGender(com.admob.android.ads.AdManager.Gender)"><!-- --></A><H3>
524 setGender</H3>
525 <PRE>
526 public static void <B>setGender</B>(<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads">AdManager.Gender</A>&nbsp;gender)</PRE>
527 <DL>
528 <DD>Sets the gender of the user to either male or female.
529 <P>
530 <DD><DL>
531 <DT><B>Parameters:</B><DD><CODE>gender</CODE> - is the user's gender or <code>null</code> if it is not known.</DL>
532 </DD>
533 </DL>
534 <!-- ========= END OF CLASS DATA ========= -->
535 <HR>
536
537
538 <!-- ======= START OF BOTTOM NAVBAR ====== -->
539 <A NAME="navbar_bottom"><!-- --></A>
540 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
541 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
542 <TR>
543 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
544 <A NAME="navbar_bottom_firstrow"><!-- --></A>
545 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
546 <TR ALIGN="center" VALIGN="top">
547 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/admob/android/ads/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
548 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
549 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AdManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
550 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
551 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
552 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
553 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
554 </TR>
555 </TABLE>
556 </TD>
557 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
558 </EM>
559 </TD>
560 </TR>
561
562 <TR>
563 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
564 &nbsp;PREV CLASS&nbsp;
565 &nbsp;<A HREF="../../../../com/admob/android/ads/AdManager.Gender.html" title="enum in com.admob.android.ads"><B>NEXT CLASS</B></A></FONT></TD>
566 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
567 <A HREF="../../../../index.html?com/admob/android/ads/AdManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
568 &nbsp;<A HREF="AdManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
569 &nbsp;<SCRIPT type="text/javascript">
570 <!--
571 if(window==top) {
572 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
573 }
574 //-->
575 </SCRIPT>
576 <NOSCRIPT>
577 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
578 </NOSCRIPT>
579
580
581 </FONT></TD>
582 </TR>
583 <TR>
584 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
585 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
586 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
587 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
588 </TR>
589 </TABLE>
590 <A NAME="skip-navbar_bottom"></A>
591 <!-- ======== END OF BOTTOM NAVBAR ======= -->
592
593 <HR>
594
595 </BODY>
596 </HTML>

  ViewVC Help
Powered by ViewVC 1.1.20