RosActivity.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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_20) on Thu Apr 26 18:24:31 CEST 2012 -->
  6. <TITLE>
  7. RosActivity
  8. </TITLE>
  9. <META NAME="date" CONTENT="2012-04-26">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="RosActivity";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. </EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;<A HREF="../../../org/ros/android/OrientationPublisher.html" title="class in org.ros.android"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;NEXT CLASS</FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../../index.html?org/ros/android/RosActivity.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="RosActivity.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. org.ros.android</FONT>
  80. <BR>
  81. Class RosActivity</H2>
  82. <PRE>
  83. java.lang.Object
  84. <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">Activity
  85. <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.ros.android.RosActivity</B>
  86. </PRE>
  87. <DL>
  88. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../org/ros/android/android_acm_serial/AcmDeviceActivity.html" title="class in org.ros.android.android_acm_serial">AcmDeviceActivity</A>, <A HREF="../../../org/ros/android/android_tutorial_camera/MainActivity.html" title="class in org.ros.android.android_tutorial_camera">MainActivity</A>, <A HREF="../../../org/ros/android/android_tutorial_image_transport/MainActivity.html" title="class in org.ros.android.android_tutorial_image_transport">MainActivity</A>, <A HREF="../../../org/ros/android/android_tutorial_pubsub/MainActivity.html" title="class in org.ros.android.android_tutorial_pubsub">MainActivity</A>, <A HREF="../../../org/ros/android/android_tutorial_teleop/MainActivity.html" title="class in org.ros.android.android_tutorial_teleop">MainActivity</A></DD>
  89. </DL>
  90. <HR>
  91. <DL>
  92. <DT><PRE>public abstract class <B>RosActivity</B><DT>extends Activity</DL>
  93. </PRE>
  94. <P>
  95. <HR>
  96. <P>
  97. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  98. <A NAME="constructor_summary"><!-- --></A>
  99. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  100. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  101. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  102. <B>Constructor Summary</B></FONT></TH>
  103. </TR>
  104. <TR BGCOLOR="white" CLASS="TableRowColor">
  105. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  106. <CODE>protected </CODE></FONT></TD>
  107. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#RosActivity(java.lang.String, java.lang.String)">RosActivity</A></B>(java.lang.String&nbsp;notificationTicker,
  108. java.lang.String&nbsp;notificationTitle)</CODE>
  109. <BR>
  110. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  111. </TR>
  112. </TABLE>
  113. &nbsp;
  114. <!-- ========== METHOD SUMMARY =========== -->
  115. <A NAME="method_summary"><!-- --></A>
  116. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  117. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  118. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  119. <B>Method Summary</B></FONT></TH>
  120. </TR>
  121. <TR BGCOLOR="white" CLASS="TableRowColor">
  122. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  123. <CODE>&nbsp;java.net.URI</CODE></FONT></TD>
  124. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#getMasterUri()">getMasterUri</A></B>()</CODE>
  125. <BR>
  126. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  127. </TR>
  128. <TR BGCOLOR="white" CLASS="TableRowColor">
  129. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  130. <CODE>protected abstract &nbsp;void</CODE></FONT></TD>
  131. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#init(org.ros.node.NodeMainExecutor)">init</A></B>(org.ros.node.NodeMainExecutor&nbsp;nodeMainExecutor)</CODE>
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called in a background thread once this <CODE>Activity</CODE> has
  134. been initialized with a master <CODE>URI</CODE> via the <A HREF="../../../org/ros/android/MasterChooser.html" title="class in org.ros.android"><CODE>MasterChooser</CODE></A>
  135. and a <A HREF="../../../org/ros/android/NodeMainExecutorService.html" title="class in org.ros.android"><CODE>NodeMainExecutorService</CODE></A> has started.</TD>
  136. </TR>
  137. <TR BGCOLOR="white" CLASS="TableRowColor">
  138. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  139. <CODE>protected &nbsp;void</CODE></FONT></TD>
  140. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#onActivityResult(int, int, Intent)">onActivityResult</A></B>(int&nbsp;requestCode,
  141. int&nbsp;resultCode,
  142. Intent&nbsp;data)</CODE>
  143. <BR>
  144. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  145. </TR>
  146. <TR BGCOLOR="white" CLASS="TableRowColor">
  147. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  148. <CODE>protected &nbsp;void</CODE></FONT></TD>
  149. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#onDestroy()">onDestroy</A></B>()</CODE>
  150. <BR>
  151. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  155. <CODE>protected &nbsp;void</CODE></FONT></TD>
  156. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#onStart()">onStart</A></B>()</CODE>
  157. <BR>
  158. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  159. </TR>
  160. <TR BGCOLOR="white" CLASS="TableRowColor">
  161. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  162. <CODE>&nbsp;void</CODE></FONT></TD>
  163. <TD><CODE><B><A HREF="../../../org/ros/android/RosActivity.html#startActivityForResult(Intent, int)">startActivityForResult</A></B>(Intent&nbsp;intent,
  164. int&nbsp;requestCode)</CODE>
  165. <BR>
  166. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  167. </TR>
  168. </TABLE>
  169. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  170. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  171. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  172. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  173. </TR>
  174. <TR BGCOLOR="white" CLASS="TableRowColor">
  175. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  176. </TR>
  177. </TABLE>
  178. &nbsp;
  179. <P>
  180. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  181. <A NAME="constructor_detail"><!-- --></A>
  182. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  183. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  184. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  185. <B>Constructor Detail</B></FONT></TH>
  186. </TR>
  187. </TABLE>
  188. <A NAME="RosActivity(java.lang.String, java.lang.String)"><!-- --></A><H3>
  189. RosActivity</H3>
  190. <PRE>
  191. protected <B>RosActivity</B>(java.lang.String&nbsp;notificationTicker,
  192. java.lang.String&nbsp;notificationTitle)</PRE>
  193. <DL>
  194. </DL>
  195. <!-- ============ METHOD DETAIL ========== -->
  196. <A NAME="method_detail"><!-- --></A>
  197. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  198. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  199. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  200. <B>Method Detail</B></FONT></TH>
  201. </TR>
  202. </TABLE>
  203. <A NAME="onStart()"><!-- --></A><H3>
  204. onStart</H3>
  205. <PRE>
  206. protected void <B>onStart</B>()</PRE>
  207. <DL>
  208. <DD><DL>
  209. </DL>
  210. </DD>
  211. </DL>
  212. <HR>
  213. <A NAME="onDestroy()"><!-- --></A><H3>
  214. onDestroy</H3>
  215. <PRE>
  216. protected void <B>onDestroy</B>()</PRE>
  217. <DL>
  218. <DD><DL>
  219. </DL>
  220. </DD>
  221. </DL>
  222. <HR>
  223. <A NAME="init(org.ros.node.NodeMainExecutor)"><!-- --></A><H3>
  224. init</H3>
  225. <PRE>
  226. protected abstract void <B>init</B>(org.ros.node.NodeMainExecutor&nbsp;nodeMainExecutor)</PRE>
  227. <DL>
  228. <DD>This method is called in a background thread once this <CODE>Activity</CODE> has
  229. been initialized with a master <CODE>URI</CODE> via the <A HREF="../../../org/ros/android/MasterChooser.html" title="class in org.ros.android"><CODE>MasterChooser</CODE></A>
  230. and a <A HREF="../../../org/ros/android/NodeMainExecutorService.html" title="class in org.ros.android"><CODE>NodeMainExecutorService</CODE></A> has started. Your <CODE>NodeMain</CODE>s
  231. should be started here using the provided <CODE>NodeMainExecutor</CODE>.
  232. <P>
  233. <DD><DL>
  234. <DT><B>Parameters:</B><DD><CODE>nodeMainExecutor</CODE> - the <CODE>NodeMainExecutor</CODE> created for this <CODE>Activity</CODE></DL>
  235. </DD>
  236. </DL>
  237. <HR>
  238. <A NAME="getMasterUri()"><!-- --></A><H3>
  239. getMasterUri</H3>
  240. <PRE>
  241. public java.net.URI <B>getMasterUri</B>()</PRE>
  242. <DL>
  243. <DD><DL>
  244. </DL>
  245. </DD>
  246. </DL>
  247. <HR>
  248. <A NAME="startActivityForResult(Intent, int)"><!-- --></A><H3>
  249. startActivityForResult</H3>
  250. <PRE>
  251. public void <B>startActivityForResult</B>(Intent&nbsp;intent,
  252. int&nbsp;requestCode)</PRE>
  253. <DL>
  254. <DD><DL>
  255. </DL>
  256. </DD>
  257. </DL>
  258. <HR>
  259. <A NAME="onActivityResult(int, int, Intent)"><!-- --></A><H3>
  260. onActivityResult</H3>
  261. <PRE>
  262. protected void <B>onActivityResult</B>(int&nbsp;requestCode,
  263. int&nbsp;resultCode,
  264. Intent&nbsp;data)</PRE>
  265. <DL>
  266. <DD><DL>
  267. </DL>
  268. </DD>
  269. </DL>
  270. <!-- ========= END OF CLASS DATA ========= -->
  271. <HR>
  272. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  273. <A NAME="navbar_bottom"><!-- --></A>
  274. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  275. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  276. <TR>
  277. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  278. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  279. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  280. <TR ALIGN="center" VALIGN="top">
  281. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  282. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  283. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  284. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  285. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  286. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  287. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  288. </TR>
  289. </TABLE>
  290. </TD>
  291. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  292. </EM>
  293. </TD>
  294. </TR>
  295. <TR>
  296. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  297. &nbsp;<A HREF="../../../org/ros/android/OrientationPublisher.html" title="class in org.ros.android"><B>PREV CLASS</B></A>&nbsp;
  298. &nbsp;NEXT CLASS</FONT></TD>
  299. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  300. <A HREF="../../../index.html?org/ros/android/RosActivity.html" target="_top"><B>FRAMES</B></A> &nbsp;
  301. &nbsp;<A HREF="RosActivity.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  302. &nbsp;<SCRIPT type="text/javascript">
  303. <!--
  304. if(window==top) {
  305. document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  306. }
  307. //-->
  308. </SCRIPT>
  309. <NOSCRIPT>
  310. <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  311. </NOSCRIPT>
  312. </FONT></TD>
  313. </TR>
  314. <TR>
  315. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  316. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  317. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  318. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  319. </TR>
  320. </TABLE>
  321. <A NAME="skip-navbar_bottom"></A>
  322. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  323. <HR>
  324. </BODY>
  325. </HTML>