├── .gitignore ├── Android-Unity sockets comunication ├── .gitattributes ├── .gitignore ├── Client.java ├── CommunicationLib.dll ├── README.md ├── README.txt └── doc │ ├── html │ ├── annotated.html │ ├── bc_s.png │ ├── bdwn.png │ ├── class_communication_lib-members.html │ ├── class_communication_lib.html │ ├── classes.html │ ├── closed.png │ ├── doxygen.css │ ├── doxygen.png │ ├── dynsections.js │ ├── ftv2blank.png │ ├── ftv2cl.png │ ├── ftv2doc.png │ ├── ftv2folderclosed.png │ ├── ftv2folderopen.png │ ├── ftv2lastnode.png │ ├── ftv2link.png │ ├── ftv2mlastnode.png │ ├── ftv2mnode.png │ ├── ftv2mo.png │ ├── ftv2node.png │ ├── ftv2ns.png │ ├── ftv2plastnode.png │ ├── ftv2pnode.png │ ├── ftv2splitbar.png │ ├── ftv2vertline.png │ ├── functions.html │ ├── functions_func.html │ ├── index.html │ ├── jquery.js │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── search │ │ ├── all_63.html │ │ ├── all_63.js │ │ ├── all_72.html │ │ ├── all_72.js │ │ ├── all_73.html │ │ ├── all_73.js │ │ ├── all_74.html │ │ ├── all_74.js │ │ ├── classes_63.html │ │ ├── classes_63.js │ │ ├── close.png │ │ ├── functions_63.html │ │ ├── functions_63.js │ │ ├── functions_72.html │ │ ├── functions_72.js │ │ ├── functions_73.html │ │ ├── functions_73.js │ │ ├── functions_74.html │ │ ├── functions_74.js │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ └── search_r.png │ ├── sync_off.png │ ├── sync_on.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css │ └── latex │ ├── Makefile │ ├── annotated.tex │ ├── class_communication_lib.tex │ ├── doxygen.sty │ ├── make.bat │ └── refman.tex ├── DataBaseHelperWithUpdateOption ├── DataBaseHelper.java └── README.md ├── DrawableBackgroundDownloader ├── DrawableBackgroundDownloader.java └── readme.md ├── LoadImageFromAssets ├── LoadImageFromAssets.java └── README.md ├── README.md ├── VoiceRecognitionActivity ├── README.md └── VoiceRecognitionActivity.java ├── dividers ├── README.md ├── Thumbs.db ├── cool_divider_horizontal.xml ├── cool_divider_vertical.xml ├── gradient.xml └── images │ ├── Thumbs.db │ ├── cool_divider.jpg │ └── cool_divider_vertical.jpg ├── routes googleMaps v2 ├── JSONParser.java ├── README.md └── Route.java └── set of animations ├── ActivitiesAnimationExample ├── .settings │ └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── ic_launcher-web.png ├── libs │ └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res │ ├── anim │ │ ├── not_move_out.xml │ │ ├── push_bot_in.xml │ │ ├── push_bot_in_with_fade.xml │ │ ├── push_bot_out.xml │ │ ├── push_bot_out_with_fade.xml │ │ ├── push_left_in.xml │ │ ├── push_left_in_with_fade.xml │ │ ├── push_left_out.xml │ │ ├── push_left_out_with_fade.xml │ │ ├── push_right_in.xml │ │ ├── push_right_in_with_fade.xml │ │ ├── push_right_out.xml │ │ ├── push_right_out_with_fade.xml │ │ ├── push_top_in.xml │ │ ├── push_top_in_with_fade.xml │ │ ├── push_top_out.xml │ │ ├── push_top_out_with_fade.xml │ │ ├── rotate_in.xml │ │ └── rotate_out.xml │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── layout │ │ ├── activity_main.xml │ │ └── hello.xml │ ├── menu │ │ └── main.xml │ ├── values-sw600dp │ │ └── dimens.xml │ ├── values-sw720dp-land │ │ └── dimens.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── values │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml └── src │ └── com │ └── valle │ └── activitiesanimation │ ├── Hello.java │ └── MainActivity.java ├── README.md └── res └── anim ├── not_move_out.xml ├── push_bot_in.xml ├── push_bot_in_with_fade.xml ├── push_bot_out.xml ├── push_bot_out_with_fade.xml ├── push_left_in.xml ├── push_left_in_with_fade.xml ├── push_left_out.xml ├── push_left_out_with_fade.xml ├── push_right_in.xml ├── push_right_in_with_fade.xml ├── push_right_out.xml ├── push_right_out_with_fade.xml ├── push_top_in.xml ├── push_top_in_with_fade.xml ├── push_top_out.xml └── push_top_out_with_fade.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | 18 | # Eclipse project files 19 | .classpath 20 | .project 21 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/Client.java: -------------------------------------------------------------------------------- 1 | import java.net.DatagramPacket; 2 | import java.net.DatagramSocket; 3 | import java.net.InetAddress; 4 | 5 | import android.util.Log; 6 | 7 | 8 | 9 | 10 | /** 11 | * @Class Client 12 | * @brief This Class allows the communication with Unity throw sockets. 13 | */ 14 | public class Client implements Runnable { 15 | 16 | private String messageToSend =""; 17 | private String messageReceived = ""; 18 | String SERVERIP = "127.0.0.1"; 19 | int SERVERPORT = 6001; 20 | 21 | 22 | public void run() { 23 | // TODO Auto-generated method stub 24 | try { 25 | 26 | // Retrieve the ServerName 27 | InetAddress serverAddr = InetAddress.getByName(SERVERIP); 28 | 29 | Log.d("UDP", "C: Connecting..."); 30 | 31 | 32 | /* Create new UDP-Socket */ 33 | DatagramSocket socket = new DatagramSocket(6000); 34 | 35 | messageToSend = messageToSend +"\0"; 36 | 37 | /* Prepare some data to be sent. */ 38 | byte[] buf = (messageToSend).getBytes(); 39 | 40 | /* Create UDP-packet with 41 | * data & destination(url+port) */ 42 | DatagramPacket packet = new DatagramPacket(buf, buf.length, serverAddr, SERVERPORT); 43 | Log.d("UDP", "C: Sending: '" + messageToSend + "'"); 44 | 45 | /* Send out the packet */ 46 | socket.send(packet); 47 | Log.d("UDP", "C: Sent."); 48 | Log.d("UDP", "C: Done."); 49 | 50 | 51 | socket.close(); 52 | 53 | } catch (Exception e) { 54 | Log.e("UDP", "C: Error", e); 55 | } 56 | } 57 | 58 | 59 | 60 | public void setMessage(String s){ 61 | messageToSend = s; 62 | } 63 | } -------------------------------------------------------------------------------- /Android-Unity sockets comunication/CommunicationLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/CommunicationLib.dll -------------------------------------------------------------------------------- /Android-Unity sockets comunication/README.md: -------------------------------------------------------------------------------- 1 | For use the CommunicationClass, you only have to copy the CommunicationLib.dll to your projet folder. For see the documentation of the library in html look in doc/html/index.html 2 | 3 | If you have any issue post in http://forum.unity3d.com/threads/145162-mini-Lib-for-communication-with-Android?p=993222#post993222 4 | 5 | By tato469 -------------------------------------------------------------------------------- /Android-Unity sockets comunication/README.txt: -------------------------------------------------------------------------------- 1 | For use the CommunicationClass, you only have to copy the CommunicationLib.dll to your projet folder. 2 | For see the documentation of the library in html look in doc/html/index.html 3 | 4 | If you have any issue post in http://forum.unity3d.com/threads/145162-mini-Lib-for-communication-with-Android?p=993222#post993222 5 | 6 | By tato469 -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: Class List 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 |
66 | 67 |
71 |  All Classes Functions
72 | 73 | 74 |
75 | 78 |
79 | 80 |
81 |
82 |
Class List
83 |
84 |
85 |
Here are the classes, structs, unions and interfaces with brief descriptions:
86 | 87 | 88 |
\CCommunicationLibCommunicationLib class
89 |
90 |
91 | 92 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/bc_s.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/bdwn.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/class_communication_lib-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: Member List 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 | 66 |
70 |  All Classes Functions
71 | 72 | 73 |
74 | 77 |
78 | 79 |
80 |
81 |
82 |
CommunicationLib Member List
83 |
84 |
85 | 86 |

This is the complete list of members for CommunicationLib, including all inherited members.

87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
CommunicationLib()CommunicationLibinline
CommunicationLib(int sPort, int cPort)CommunicationLibinline
readMessage()CommunicationLibinline
setTimout(int mSec)CommunicationLibinline
start()CommunicationLibinline
stop()CommunicationLibinline
testClient(String s)CommunicationLibinline
96 | 97 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/class_communication_lib.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: CommunicationLib Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 | 66 |
70 |  All Classes Functions
71 | 72 | 73 |
74 | 77 |
78 | 79 |
80 |
81 |
82 | Public Member Functions | 83 | List of all members
84 |
85 |
CommunicationLib Class Reference
86 |
87 |
88 | 89 |

CommunicationLib class. 90 | More...

91 | 92 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |

93 | Public Member Functions

 CommunicationLib ()
 Empty constructor.
 CommunicationLib (int sPort, int cPort)
 Constructor with arguments.
void setTimout (int mSec)
 Change the timeOut for the server.
void start ()
 throw a thread and start listening for new datagrams.
void stop ()
 stop the listening and clos the connection.
string readMessage ()
 This function return the message received.
void testClient (String s)
 This function test the server.
109 |

Detailed Description

110 |

CommunicationLib class.

111 |

This class allows to comunicate Unity with an external call thorught datagrams packet UDP. The message to send must to be of the string type and the Ip is ever localhost ("127.0.0.1").

112 |

Constructor & Destructor Documentation

113 | 114 |
115 |
116 | 117 | 118 | 128 | 130 | 131 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |
CommunicationLib.CommunicationLib ()
127 |
129 | inline
132 |
133 | 134 |

Empty constructor.

135 |

When is called, set the default ports for the communication 4444 for server and 4448 for client.

136 | 137 |
138 |
139 | 140 |
141 |
142 | 143 | 144 | 165 | 167 | 168 |
145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 |
CommunicationLib.CommunicationLib (int sPort,
int cPort 
)
164 |
166 | inline
169 |
170 | 171 |

Constructor with arguments.

172 |
Parameters
173 | 174 | 175 | 176 |
sPortan integer for set the server port.
cPortan integer for set the client port.
177 |
178 |
179 |
See Also
CommunicationLib()
180 | 181 |
182 |
183 |

Member Function Documentation

184 | 185 |
186 |
187 | 188 | 189 | 199 | 201 | 202 |
190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 |
string CommunicationLib.readMessage ()
198 |
200 | inline
203 |
204 | 205 |

This function return the message received.

206 |
Returns
returns the message in a string form.
207 |
See Also
CommunicationLib() and start()
208 | 209 |
210 |
211 | 212 |
213 |
214 | 215 | 216 | 227 | 229 | 230 |
217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 |
void CommunicationLib.setTimout (int mSec)
226 |
228 | inline
231 |
232 | 233 |

Change the timeOut for the server.

234 |
Parameters
235 | 236 | 237 |
mSecthe time in miliseconds for the timeout.
238 |
239 |
240 |
See Also
CommunicationLib()
241 | 242 |
243 |
244 | 245 |
246 |
247 | 248 | 249 | 259 | 261 | 262 |
250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 |
void CommunicationLib.start ()
258 |
260 | inline
263 |
264 | 265 |

throw a thread and start listening for new datagrams.

266 |
See Also
CommunicationLib()
267 | 268 |
269 |
270 | 271 |
272 |
273 | 274 | 275 | 285 | 287 | 288 |
276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 |
void CommunicationLib.stop ()
284 |
286 | inline
289 |
290 | 291 |

stop the listening and clos the connection.

292 |
See Also
CommunicationLib() and start()
293 | 294 |
295 |
296 | 297 |
298 |
299 | 300 | 301 | 312 | 314 | 315 |
302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 |
void CommunicationLib.testClient (String s)
311 |
313 | inline
316 |
317 | 318 |

This function test the server.

319 |
Parameters
320 | 321 | 322 |
sis the string send to the server.
323 |
324 |
325 |
See Also
CommunicationLib(), start() and readMessage()
326 | 327 |
328 |
329 |
The documentation for this class was generated from the following file: 332 |
333 | 334 | 339 | 340 | 341 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: Class Index 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 |
66 | 67 |
71 |  All Classes Functions
72 | 73 | 74 |
75 | 78 |
79 | 80 |
81 |
82 |
Class Index
83 |
84 |
85 |
C
86 | 87 | 89 | 90 | 91 | 92 |
  C  
88 |
CommunicationLib   
93 |
C
94 |
95 | 96 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/closed.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/doxygen.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/dynsections.js: -------------------------------------------------------------------------------- 1 | function toggleVisibility(linkObj) 2 | { 3 | var base = $(linkObj).attr('id'); 4 | var summary = $('#'+base+'-summary'); 5 | var content = $('#'+base+'-content'); 6 | var trigger = $('#'+base+'-trigger'); 7 | var src=$(trigger).attr('src'); 8 | if (content.is(':visible')===true) { 9 | content.hide(); 10 | summary.show(); 11 | $(linkObj).addClass('closed').removeClass('opened'); 12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 13 | } else { 14 | content.show(); 15 | summary.hide(); 16 | $(linkObj).removeClass('closed').addClass('opened'); 17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 18 | } 19 | return false; 20 | } 21 | 22 | function updateStripes() 23 | { 24 | $('table.directory tr'). 25 | removeClass('even').filter(':visible:even').addClass('even'); 26 | } 27 | function toggleLevel(level) 28 | { 29 | $('table.directory tr').each(function(){ 30 | var l = this.id.split('_').length-1; 31 | var i = $('#img'+this.id.substring(3)); 32 | var a = $('#arr'+this.id.substring(3)); 33 | if (l 2 | 3 | 4 | 5 | 6 | My Project: Class Members 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 | 71 |
72 | 73 |
77 |  All Classes Functions
78 | 79 | 80 |
81 | 84 |
85 | 86 |
87 |
Here is a list of all documented class members with links to the class documentation for each member:
107 |
108 | 109 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/functions_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: Class Members - Functions 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 | 65 | 71 |
72 | 73 |
77 |  All Classes Functions
78 | 79 | 80 |
81 | 84 |
85 | 86 |
87 |   107 |
108 | 109 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Project: Main Page 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
My Project 25 |
26 |
30 |
31 | 32 | 33 | 36 | 58 |
59 | 60 |
64 |  All Classes Functions
65 | 66 | 67 |
68 | 71 |
72 | 73 |
74 |
75 |
My Project Documentation
76 |
77 |
78 |
79 | 80 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/nav_f.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/nav_g.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/nav_h.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/open.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['communicationlib',['CommunicationLib',['../class_communication_lib.html',1,'CommunicationLib'],['../class_communication_lib.html#a88995ee179197790ce3f14d694ecd2a2',1,'CommunicationLib.CommunicationLib()'],['../class_communication_lib.html#ab0d8f834a72f744e96bbc8c0f2acb158',1,'CommunicationLib.CommunicationLib(int sPort, int cPort)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_72.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['readmessage',['readMessage',['../class_communication_lib.html#a19cff7840f216399f333a5caf24923f7',1,'CommunicationLib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['settimout',['setTimout',['../class_communication_lib.html#a0e67a5f5465c6a04c7bda7bec79bc6a6',1,'CommunicationLib']]], 4 | ['start',['start',['../class_communication_lib.html#a5c5fffa4340549546e9929274da1c513',1,'CommunicationLib']]], 5 | ['stop',['stop',['../class_communication_lib.html#a322c14edef317eec3dcf24b5c91dcec1',1,'CommunicationLib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/all_74.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['testclient',['testClient',['../class_communication_lib.html#afd007743f316982a54593d49b88f5bcc',1,'CommunicationLib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/classes_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/classes_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['communicationlib',['CommunicationLib',['../class_communication_lib.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/search/close.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['communicationlib',['CommunicationLib',['../class_communication_lib.html#a88995ee179197790ce3f14d694ecd2a2',1,'CommunicationLib.CommunicationLib()'],['../class_communication_lib.html#ab0d8f834a72f744e96bbc8c0f2acb158',1,'CommunicationLib.CommunicationLib(int sPort, int cPort)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_72.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['readmessage',['readMessage',['../class_communication_lib.html#a19cff7840f216399f333a5caf24923f7',1,'CommunicationLib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['settimout',['setTimout',['../class_communication_lib.html#a0e67a5f5465c6a04c7bda7bec79bc6a6',1,'CommunicationLib']]], 4 | ['start',['start',['../class_communication_lib.html#a5c5fffa4340549546e9929274da1c513',1,'CommunicationLib']]], 5 | ['stop',['stop',['../class_communication_lib.html#a322c14edef317eec3dcf24b5c91dcec1',1,'CommunicationLib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/functions_74.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['testclient',['testClient',['../class_communication_lib.html#afd007743f316982a54593d49b88f5bcc',1,'CommunicationLib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/Android-Unity sockets comunication/doc/html/search/mag_sel.png -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/search.css: -------------------------------------------------------------------------------- 1 | /*---------------- Search Box */ 2 | 3 | #FSearchBox { 4 | float: left; 5 | } 6 | 7 | #MSearchBox { 8 | white-space : nowrap; 9 | position: absolute; 10 | float: none; 11 | display: inline; 12 | margin-top: 8px; 13 | right: 0px; 14 | width: 170px; 15 | z-index: 102; 16 | background-color: white; 17 | } 18 | 19 | #MSearchBox .left 20 | { 21 | display:block; 22 | position:absolute; 23 | left:10px; 24 | width:20px; 25 | height:19px; 26 | background:url('search_l.png') no-repeat; 27 | background-position:right; 28 | } 29 | 30 | #MSearchSelect { 31 | display:block; 32 | position:absolute; 33 | width:20px; 34 | height:19px; 35 | } 36 | 37 | .left #MSearchSelect { 38 | left:4px; 39 | } 40 | 41 | .right #MSearchSelect { 42 | right:5px; 43 | } 44 | 45 | #MSearchField { 46 | display:block; 47 | position:absolute; 48 | height:19px; 49 | background:url('search_m.png') repeat-x; 50 | border:none; 51 | width:116px; 52 | margin-left:20px; 53 | padding-left:4px; 54 | color: #909090; 55 | outline: none; 56 | font: 9pt Arial, Verdana, sans-serif; 57 | } 58 | 59 | #FSearchBox #MSearchField { 60 | margin-left:15px; 61 | } 62 | 63 | #MSearchBox .right { 64 | display:block; 65 | position:absolute; 66 | right:10px; 67 | top:0px; 68 | width:20px; 69 | height:19px; 70 | background:url('search_r.png') no-repeat; 71 | background-position:left; 72 | } 73 | 74 | #MSearchClose { 75 | display: none; 76 | position: absolute; 77 | top: 4px; 78 | background : none; 79 | border: none; 80 | margin: 0px 4px 0px 0px; 81 | padding: 0px 0px; 82 | outline: none; 83 | } 84 | 85 | .left #MSearchClose { 86 | left: 6px; 87 | } 88 | 89 | .right #MSearchClose { 90 | right: 2px; 91 | } 92 | 93 | .MSearchBoxActive #MSearchField { 94 | color: #000000; 95 | } 96 | 97 | /*---------------- Search filter selection */ 98 | 99 | #MSearchSelectWindow { 100 | display: none; 101 | position: absolute; 102 | left: 0; top: 0; 103 | border: 1px solid #90A5CE; 104 | background-color: #F9FAFC; 105 | z-index: 1; 106 | padding-top: 4px; 107 | padding-bottom: 4px; 108 | -moz-border-radius: 4px; 109 | -webkit-border-top-left-radius: 4px; 110 | -webkit-border-top-right-radius: 4px; 111 | -webkit-border-bottom-left-radius: 4px; 112 | -webkit-border-bottom-right-radius: 4px; 113 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 114 | } 115 | 116 | .SelectItem { 117 | font: 8pt Arial, Verdana, sans-serif; 118 | padding-left: 2px; 119 | padding-right: 12px; 120 | border: 0px; 121 | } 122 | 123 | span.SelectionMark { 124 | margin-right: 4px; 125 | font-family: monospace; 126 | outline-style: none; 127 | text-decoration: none; 128 | } 129 | 130 | a.SelectItem { 131 | display: block; 132 | outline-style: none; 133 | color: #000000; 134 | text-decoration: none; 135 | padding-left: 6px; 136 | padding-right: 12px; 137 | } 138 | 139 | a.SelectItem:focus, 140 | a.SelectItem:active { 141 | color: #000000; 142 | outline-style: none; 143 | text-decoration: none; 144 | } 145 | 146 | a.SelectItem:hover { 147 | color: #FFFFFF; 148 | background-color: #3D578C; 149 | outline-style: none; 150 | text-decoration: none; 151 | cursor: pointer; 152 | display: block; 153 | } 154 | 155 | /*---------------- Search results window */ 156 | 157 | iframe#MSearchResults { 158 | width: 60ex; 159 | height: 15em; 160 | } 161 | 162 | #MSearchResultsWindow { 163 | display: none; 164 | position: absolute; 165 | left: 0; top: 0; 166 | border: 1px solid #000; 167 | background-color: #EEF1F7; 168 | } 169 | 170 | /* ----------------------------------- */ 171 | 172 | 173 | #SRIndex { 174 | clear:both; 175 | padding-bottom: 15px; 176 | } 177 | 178 | .SREntry { 179 | font-size: 10pt; 180 | padding-left: 1ex; 181 | } 182 | 183 | .SRPage .SREntry { 184 | font-size: 8pt; 185 | padding: 1px 5px; 186 | } 187 | 188 | body.SRPage { 189 | margin: 5px 2px; 190 | } 191 | 192 | .SRChildren { 193 | padding-left: 3ex; padding-bottom: .5em 194 | } 195 | 196 | .SRPage .SRChildren { 197 | display: none; 198 | } 199 | 200 | .SRSymbol { 201 | font-weight: bold; 202 | color: #425E97; 203 | font-family: Arial, Verdana, sans-serif; 204 | text-decoration: none; 205 | outline: none; 206 | } 207 | 208 | a.SRScope { 209 | display: block; 210 | color: #425E97; 211 | font-family: Arial, Verdana, sans-serif; 212 | text-decoration: none; 213 | outline: none; 214 | } 215 | 216 | a.SRSymbol:focus, a.SRSymbol:active, 217 | a.SRScope:focus, a.SRScope:active { 218 | text-decoration: underline; 219 | } 220 | 221 | span.SRScope { 222 | padding-left: 4px; 223 | } 224 | 225 | .SRPage .SRStatus { 226 | padding: 2px 5px; 227 | font-size: 8pt; 228 | font-style: italic; 229 | } 230 | 231 | .SRResult { 232 | display: none; 233 | } 234 | 235 | DIV.searchresults { 236 | margin-left: 10px; 237 | margin-right: 10px; 238 | } 239 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/html/search/search.js: -------------------------------------------------------------------------------- 1 | // Search script generated by doxygen 2 | // Copyright (C) 2009 by Dimitri van Heesch. 3 | 4 | // The code in this file is loosly based on main.js, part of Natural Docs, 5 | // which is Copyright (C) 2003-2008 Greg Valure 6 | // Natural Docs is licensed under the GPL. 7 | 8 | var indexSectionsWithContent = 9 | { 10 | 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 11 | 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 12 | 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" 13 | }; 14 | 15 | var indexSectionNames = 16 | { 17 | 0: "all", 18 | 1: "classes", 19 | 2: "functions" 20 | }; 21 | 22 | function convertToId(search) 23 | { 24 | var result = ''; 25 | for (i=0;i do a search 283 | { 284 | this.Search(); 285 | } 286 | } 287 | 288 | this.OnSearchSelectKey = function(evt) 289 | { 290 | var e = (evt) ? evt : window.event; // for IE 291 | if (e.keyCode==40 && this.searchIndex0) // Up 297 | { 298 | this.searchIndex--; 299 | this.OnSelectItem(this.searchIndex); 300 | } 301 | else if (e.keyCode==13 || e.keyCode==27) 302 | { 303 | this.OnSelectItem(this.searchIndex); 304 | this.CloseSelectionWindow(); 305 | this.DOMSearchField().focus(); 306 | } 307 | return false; 308 | } 309 | 310 | // --------- Actions 311 | 312 | // Closes the results window. 313 | this.CloseResultsWindow = function() 314 | { 315 | this.DOMPopupSearchResultsWindow().style.display = 'none'; 316 | this.DOMSearchClose().style.display = 'none'; 317 | this.Activate(false); 318 | } 319 | 320 | this.CloseSelectionWindow = function() 321 | { 322 | this.DOMSearchSelectWindow().style.display = 'none'; 323 | } 324 | 325 | // Performs a search. 326 | this.Search = function() 327 | { 328 | this.keyTimeout = 0; 329 | 330 | // strip leading whitespace 331 | var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); 332 | 333 | var code = searchValue.toLowerCase().charCodeAt(0); 334 | var hexCode; 335 | if (code<16) 336 | { 337 | hexCode="0"+code.toString(16); 338 | } 339 | else 340 | { 341 | hexCode=code.toString(16); 342 | } 343 | 344 | var resultsPage; 345 | var resultsPageWithSearch; 346 | var hasResultsPage; 347 | 348 | if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') 349 | { 350 | resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; 351 | resultsPageWithSearch = resultsPage+'?'+escape(searchValue); 352 | hasResultsPage = true; 353 | } 354 | else // nothing available for this search term 355 | { 356 | resultsPage = this.resultsPath + '/nomatches.html'; 357 | resultsPageWithSearch = resultsPage; 358 | hasResultsPage = false; 359 | } 360 | 361 | window.frames.MSearchResults.location = resultsPageWithSearch; 362 | var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); 363 | 364 | if (domPopupSearchResultsWindow.style.display!='block') 365 | { 366 | var domSearchBox = this.DOMSearchBox(); 367 | this.DOMSearchClose().style.display = 'inline'; 368 | if (this.insideFrame) 369 | { 370 | var domPopupSearchResults = this.DOMPopupSearchResults(); 371 | domPopupSearchResultsWindow.style.position = 'relative'; 372 | domPopupSearchResultsWindow.style.display = 'block'; 373 | var width = document.body.clientWidth - 8; // the -8 is for IE :-( 374 | domPopupSearchResultsWindow.style.width = width + 'px'; 375 | domPopupSearchResults.style.width = width + 'px'; 376 | } 377 | else 378 | { 379 | var domPopupSearchResults = this.DOMPopupSearchResults(); 380 | var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; 381 | var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; 382 | domPopupSearchResultsWindow.style.display = 'block'; 383 | left -= domPopupSearchResults.offsetWidth; 384 | domPopupSearchResultsWindow.style.top = top + 'px'; 385 | domPopupSearchResultsWindow.style.left = left + 'px'; 386 | } 387 | } 388 | 389 | this.lastSearchValue = searchValue; 390 | this.lastResultsPage = resultsPage; 391 | } 392 | 393 | // -------- Activation Functions 394 | 395 | // Activates or deactivates the search panel, resetting things to 396 | // their default values if necessary. 397 | this.Activate = function(isActive) 398 | { 399 | if (isActive || // open it 400 | this.DOMPopupSearchResultsWindow().style.display == 'block' 401 | ) 402 | { 403 | this.DOMSearchBox().className = 'MSearchBoxActive'; 404 | 405 | var searchField = this.DOMSearchField(); 406 | 407 | if (searchField.value == this.searchLabel) // clear "Search" term upon entry 408 | { 409 | searchField.value = ''; 410 | this.searchActive = true; 411 | } 412 | } 413 | else if (!isActive) // directly remove the panel 414 | { 415 | this.DOMSearchBox().className = 'MSearchBoxInactive'; 416 | this.DOMSearchField().value = this.searchLabel; 417 | this.searchActive = false; 418 | this.lastSearchValue = '' 419 | this.lastResultsPage = ''; 420 | } 421 | } 422 | } 423 | 424 | // ----------------------------------------------------------------------- 425 | 426 | // The class that handles everything on the search results page. 427 | function SearchResults(name) 428 | { 429 | // The number of matches from the last run of . 430 | this.lastMatchCount = 0; 431 | this.lastKey = 0; 432 | this.repeatOn = false; 433 | 434 | // Toggles the visibility of the passed element ID. 435 | this.FindChildElement = function(id) 436 | { 437 | var parentElement = document.getElementById(id); 438 | var element = parentElement.firstChild; 439 | 440 | while (element && element!=parentElement) 441 | { 442 | if (element.nodeName == 'DIV' && element.className == 'SRChildren') 443 | { 444 | return element; 445 | } 446 | 447 | if (element.nodeName == 'DIV' && element.hasChildNodes()) 448 | { 449 | element = element.firstChild; 450 | } 451 | else if (element.nextSibling) 452 | { 453 | element = element.nextSibling; 454 | } 455 | else 456 | { 457 | do 458 | { 459 | element = element.parentNode; 460 | } 461 | while (element && element!=parentElement && !element.nextSibling); 462 | 463 | if (element && element!=parentElement) 464 | { 465 | element = element.nextSibling; 466 | } 467 | } 468 | } 469 | } 470 | 471 | this.Toggle = function(id) 472 | { 473 | var element = this.FindChildElement(id); 474 | if (element) 475 | { 476 | if (element.style.display == 'block') 477 | { 478 | element.style.display = 'none'; 479 | } 480 | else 481 | { 482 | element.style.display = 'block'; 483 | } 484 | } 485 | } 486 | 487 | // Searches for the passed string. If there is no parameter, 488 | // it takes it from the URL query. 489 | // 490 | // Always returns true, since other documents may try to call it 491 | // and that may or may not be possible. 492 | this.Search = function(search) 493 | { 494 | if (!search) // get search word from URL 495 | { 496 | search = window.location.search; 497 | search = search.substring(1); // Remove the leading '?' 498 | search = unescape(search); 499 | } 500 | 501 | search = search.replace(/^ +/, ""); // strip leading spaces 502 | search = search.replace(/ +$/, ""); // strip trailing spaces 503 | search = search.toLowerCase(); 504 | search = convertToId(search); 505 | 506 | var resultRows = document.getElementsByTagName("div"); 507 | var matches = 0; 508 | 509 | var i = 0; 510 | while (i < resultRows.length) 511 | { 512 | var row = resultRows.item(i); 513 | if (row.className == "SRResult") 514 | { 515 | var rowMatchName = row.id.toLowerCase(); 516 | rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' 517 | 518 | if (search.length<=rowMatchName.length && 519 | rowMatchName.substr(0, search.length)==search) 520 | { 521 | row.style.display = 'block'; 522 | matches++; 523 | } 524 | else 525 | { 526 | row.style.display = 'none'; 527 | } 528 | } 529 | i++; 530 | } 531 | document.getElementById("Searching").style.display='none'; 532 | if (matches == 0) // no results 533 | { 534 | document.getElementById("NoMatches").style.display='block'; 535 | } 536 | else // at least one result 537 | { 538 | document.getElementById("NoMatches").style.display='none'; 539 | } 540 | this.lastMatchCount = matches; 541 | return true; 542 | } 543 | 544 | // return the first item with index index or higher that is visible 545 | this.NavNext = function(index) 546 | { 547 | var focusItem; 548 | while (1) 549 | { 550 | var focusName = 'Item'+index; 551 | focusItem = document.getElementById(focusName); 552 | if (focusItem && focusItem.parentNode.parentNode.style.display=='block') 553 | { 554 | break; 555 | } 556 | else if (!focusItem) // last element 557 | { 558 | break; 559 | } 560 | focusItem=null; 561 | index++; 562 | } 563 | return focusItem; 564 | } 565 | 566 | this.NavPrev = function(index) 567 | { 568 | var focusItem; 569 | while (1) 570 | { 571 | var focusName = 'Item'+index; 572 | focusItem = document.getElementById(focusName); 573 | if (focusItem && focusItem.parentNode.parentNode.style.display=='block') 574 | { 575 | break; 576 | } 577 | else if (!focusItem) // last element 578 | { 579 | break; 580 | } 581 | focusItem=null; 582 | index--; 583 | } 584 | return focusItem; 585 | } 586 | 587 | this.ProcessKeys = function(e) 588 | { 589 | if (e.type == "keydown") 590 | { 591 | this.repeatOn = false; 592 | this.lastKey = e.keyCode; 593 | } 594 | else if (e.type == "keypress") 595 | { 596 | if (!this.repeatOn) 597 | { 598 | if (this.lastKey) this.repeatOn = true; 599 | return false; // ignore first keypress after keydown 600 | } 601 | } 602 | else if (e.type == "keyup") 603 | { 604 | this.lastKey = 0; 605 | this.repeatOn = false; 606 | } 607 | return this.lastKey!=0; 608 | } 609 | 610 | this.Nav = function(evt,itemIndex) 611 | { 612 | var e = (evt) ? evt : window.event; // for IE 613 | if (e.keyCode==13) return true; 614 | if (!this.ProcessKeys(e)) return false; 615 | 616 | if (this.lastKey==38) // Up 617 | { 618 | var newIndex = itemIndex-1; 619 | var focusItem = this.NavPrev(newIndex); 620 | if (focusItem) 621 | { 622 | var child = this.FindChildElement(focusItem.parentNode.parentNode.id); 623 | if (child && child.style.display == 'block') // children visible 624 | { 625 | var n=0; 626 | var tmpElem; 627 | while (1) // search for last child 628 | { 629 | tmpElem = document.getElementById('Item'+newIndex+'_c'+n); 630 | if (tmpElem) 631 | { 632 | focusItem = tmpElem; 633 | } 634 | else // found it! 635 | { 636 | break; 637 | } 638 | n++; 639 | } 640 | } 641 | } 642 | if (focusItem) 643 | { 644 | focusItem.focus(); 645 | } 646 | else // return focus to search field 647 | { 648 | parent.document.getElementById("MSearchField").focus(); 649 | } 650 | } 651 | else if (this.lastKey==40) // Down 652 | { 653 | var newIndex = itemIndex+1; 654 | var focusItem; 655 | var item = document.getElementById('Item'+itemIndex); 656 | var elem = this.FindChildElement(item.parentNode.parentNode.id); 657 | if (elem && elem.style.display == 'block') // children visible 658 | { 659 | focusItem = document.getElementById('Item'+itemIndex+'_c0'); 660 | } 661 | if (!focusItem) focusItem = this.NavNext(newIndex); 662 | if (focusItem) focusItem.focus(); 663 | } 664 | else if (this.lastKey==39) // Right 665 | { 666 | var item = document.getElementById('Item'+itemIndex); 667 | var elem = this.FindChildElement(item.parentNode.parentNode.id); 668 | if (elem) elem.style.display = 'block'; 669 | } 670 | else if (this.lastKey==37) // Left 671 | { 672 | var item = document.getElementById('Item'+itemIndex); 673 | var elem = this.FindChildElement(item.parentNode.parentNode.id); 674 | if (elem) elem.style.display = 'none'; 675 | } 676 | else if (this.lastKey==27) // Escape 677 | { 678 | parent.searchBox.CloseResultsWindow(); 679 | parent.document.getElementById("MSearchField").focus(); 680 | } 681 | else if (this.lastKey==13) // Enter 682 | { 683 | return true; 684 | } 685 | return false; 686 | } 687 | 688 | this.NavChild = function(evt,itemIndex,childIndex) 689 | { 690 | var e = (evt) ? evt : window.event; // for IE 691 | if (e.keyCode==13) return true; 692 | if (!this.ProcessKeys(e)) return false; 693 | 694 | if (this.lastKey==38) // Up 695 | { 696 | if (childIndex>0) 697 | { 698 | var newIndex = childIndex-1; 699 | document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); 700 | } 701 | else // already at first child, jump to parent 702 | { 703 | document.getElementById('Item'+itemIndex).focus(); 704 | } 705 | } 706 | else if (this.lastKey==40) // Down 707 | { 708 | var newIndex = childIndex+1; 709 | var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); 710 | if (!elem) // last child, jump to parent next parent 711 | { 712 | elem = this.NavNext(itemIndex+1); 713 | } 714 | if (elem) 715 | { 716 | elem.focus(); 717 | } 718 | } 719 | else if (this.lastKey==27) // Escape 720 | { 721 | parent.searchBox.CloseResultsWindow(); 722 | parent.document.getElementById("MSearchField").focus(); 723 | } 724 | else if (this.lastKey==13) // Enter 725 | { 726 | return true; 727 | } 728 | return false; 729 | } 730 | } 731 | 732 | function setKeyActions(elem,action) 733 | { 734 | elem.setAttribute('onkeydown',action); 735 | elem.setAttribute('onkeypress',action); 736 | elem.setAttribute('onkeyup',action); 737 | } 738 | 739 | function setClassAttr(elem,attr) 740 | { 741 | elem.setAttribute('class',attr); 742 | elem.setAttribute('className',attr); 743 | } 744 | 745 | function createResults() 746 | { 747 | var results = document.getElementById("SRResults"); 748 | for (var e=0; e ... 90 | \newenvironment{DoxyPre}{% 91 | \small% 92 | \begin{alltt}% 93 | }{% 94 | \end{alltt}% 95 | \normalsize% 96 | } 97 | 98 | % Used by @code ... @endcode 99 | \newenvironment{DoxyCode}{% 100 | 101 | 102 | \begin{scriptsize}\begin{alltt}% 103 | }{% 104 | \end{alltt}\end{scriptsize}% 105 | } 106 | 107 | % Used by @example, @include, @includelineno and @dontinclude 108 | \newenvironment{DoxyCodeInclude}{% 109 | \DoxyCode% 110 | }{% 111 | \endDoxyCode% 112 | } 113 | 114 | % Used by @verbatim ... @endverbatim 115 | \newenvironment{DoxyVerb}{% 116 | \footnotesize% 117 | \verbatim% 118 | }{% 119 | \endverbatim% 120 | \normalsize% 121 | } 122 | 123 | % Used by @verbinclude 124 | \newenvironment{DoxyVerbInclude}{% 125 | \DoxyVerb% 126 | }{% 127 | \endDoxyVerb% 128 | } 129 | 130 | % Used by numbered lists (using '-#' or
    ...
) 131 | \newenvironment{DoxyEnumerate}{% 132 | \enumerate% 133 | }{% 134 | \endenumerate% 135 | } 136 | 137 | % Used by bullet lists (using '-', @li, @arg, or
    ...
) 138 | \newenvironment{DoxyItemize}{% 139 | \itemize% 140 | }{% 141 | \enditemize% 142 | } 143 | 144 | % Used by description lists (using
...
) 145 | \newenvironment{DoxyDescription}{% 146 | \description% 147 | }{% 148 | \enddescription% 149 | } 150 | 151 | % Used by @image, @dotfile, and @dot ... @enddot 152 | % (only if caption is specified) 153 | \newenvironment{DoxyImage}{% 154 | \begin{figure}[H]% 155 | \begin{center}% 156 | }{% 157 | \end{center}% 158 | \end{figure}% 159 | } 160 | 161 | % Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc 162 | % (only if no caption is specified) 163 | \newenvironment{DoxyImageNoCaption}{% 164 | }{% 165 | } 166 | 167 | % Used by @attention 168 | \newenvironment{DoxyAttention}[1]{% 169 | \begin{DoxyDesc}{#1}% 170 | }{% 171 | \end{DoxyDesc}% 172 | } 173 | 174 | % Used by @author and @authors 175 | \newenvironment{DoxyAuthor}[1]{% 176 | \begin{DoxyDesc}{#1}% 177 | }{% 178 | \end{DoxyDesc}% 179 | } 180 | 181 | % Used by @date 182 | \newenvironment{DoxyDate}[1]{% 183 | \begin{DoxyDesc}{#1}% 184 | }{% 185 | \end{DoxyDesc}% 186 | } 187 | 188 | % Used by @invariant 189 | \newenvironment{DoxyInvariant}[1]{% 190 | \begin{DoxyDesc}{#1}% 191 | }{% 192 | \end{DoxyDesc}% 193 | } 194 | 195 | % Used by @note 196 | \newenvironment{DoxyNote}[1]{% 197 | \begin{DoxyDesc}{#1}% 198 | }{% 199 | \end{DoxyDesc}% 200 | } 201 | 202 | % Used by @post 203 | \newenvironment{DoxyPostcond}[1]{% 204 | \begin{DoxyDesc}{#1}% 205 | }{% 206 | \end{DoxyDesc}% 207 | } 208 | 209 | % Used by @pre 210 | \newenvironment{DoxyPrecond}[1]{% 211 | \begin{DoxyDesc}{#1}% 212 | }{% 213 | \end{DoxyDesc}% 214 | } 215 | 216 | % Used by @copyright 217 | \newenvironment{DoxyCopyright}[1]{% 218 | \begin{DoxyDesc}{#1}% 219 | }{% 220 | \end{DoxyDesc}% 221 | } 222 | 223 | % Used by @remark 224 | \newenvironment{DoxyRemark}[1]{% 225 | \begin{DoxyDesc}{#1}% 226 | }{% 227 | \end{DoxyDesc}% 228 | } 229 | 230 | % Used by @return 231 | \newenvironment{DoxyReturn}[1]{% 232 | \begin{DoxyDesc}{#1}% 233 | }{% 234 | \end{DoxyDesc}% 235 | } 236 | 237 | % Used by @since 238 | \newenvironment{DoxySince}[1]{% 239 | \begin{DoxyDesc}{#1}% 240 | }{% 241 | \end{DoxyDesc}% 242 | } 243 | 244 | % Used by @see 245 | \newenvironment{DoxySeeAlso}[1]{% 246 | \begin{DoxyDesc}{#1}% 247 | }{% 248 | \end{DoxyDesc}% 249 | } 250 | 251 | % Used by @version 252 | \newenvironment{DoxyVersion}[1]{% 253 | \begin{DoxyDesc}{#1}% 254 | }{% 255 | \end{DoxyDesc}% 256 | } 257 | 258 | % Used by @warning 259 | \newenvironment{DoxyWarning}[1]{% 260 | \begin{DoxyDesc}{#1}% 261 | }{% 262 | \end{DoxyDesc}% 263 | } 264 | 265 | % Used by @internal 266 | \newenvironment{DoxyInternal}[1]{% 267 | \paragraph*{#1}% 268 | }{% 269 | } 270 | 271 | % Used by @par and @paragraph 272 | \newenvironment{DoxyParagraph}[1]{% 273 | \begin{list}{}% 274 | {% 275 | \settowidth{\labelwidth}{40pt}% 276 | \setlength{\leftmargin}{\labelwidth}% 277 | \setlength{\parsep}{0pt}% 278 | \setlength{\itemsep}{-4pt}% 279 | \renewcommand{\makelabel}{\entrylabel}% 280 | }% 281 | \item[#1]% 282 | }{% 283 | \end{list}% 284 | } 285 | 286 | % Used by parameter lists 287 | \newenvironment{DoxyParams}[2][]{% 288 | \begin{DoxyDesc}{#2}% 289 | \item[] \hspace{\fill} \vspace{-40pt}% 290 | \settowidth{\labelwidth}{40pt}% 291 | \setlength{\LTleft}{0pt}% 292 | \setlength{\tabcolsep}{0.01\textwidth}% 293 | \ifthenelse{\equal{#1}{}}% 294 | {\begin{longtable}{|>{\raggedleft\hspace{0pt}}p{0.15\textwidth}|% 295 | p{0.815\textwidth}|}}% 296 | {\ifthenelse{\equal{#1}{1}}% 297 | {\begin{longtable}{|>{\centering}p{0.10\textwidth}|% 298 | >{\raggedleft\hspace{0pt}}p{0.15\textwidth}|% 299 | p{0.685\textwidth}|}}% 300 | {\begin{longtable}{|>{\centering}p{0.10\textwidth}|% 301 | >{\centering\hspace{0pt}}p{0.15\textwidth}|% 302 | >{\raggedleft\hspace{0pt}}p{0.15\textwidth}|% 303 | p{0.515\textwidth}|}}% 304 | }\hline% 305 | }{% 306 | \end{longtable}% 307 | \end{DoxyDesc}% 308 | } 309 | 310 | % Used for fields of simple structs 311 | \newenvironment{DoxyFields}[1]{% 312 | \begin{DoxyDesc}{#1}% 313 | \item[] \hspace{\fill} \vspace{-40pt}% 314 | \settowidth{\labelwidth}{40pt}% 315 | \setlength{\LTleft}{0pt}% 316 | \setlength{\tabcolsep}{0.01\textwidth}% 317 | \begin{longtable}{|>{\raggedleft\hspace{0pt}}p{0.15\textwidth}|% 318 | p{0.15\textwidth}|% 319 | p{0.635\textwidth}|}% 320 | \hline% 321 | }{% 322 | \end{longtable}% 323 | \end{DoxyDesc}% 324 | } 325 | 326 | % is used for parameters within a detailed function description 327 | \newenvironment{DoxyParamCaption}{% 328 | \renewcommand{\item}[2][]{##1 {\em ##2}}% 329 | }{% 330 | } 331 | 332 | % Used by return value lists 333 | \newenvironment{DoxyRetVals}[1]{% 334 | \begin{DoxyDesc}{#1}% 335 | \begin{description}% 336 | \item[] \hspace{\fill} \vspace{-25pt}% 337 | \setlength{\tabcolsep}{0.01\textwidth}% 338 | \begin{longtable}{|>{\raggedleft\hspace{0pt}}p{0.25\textwidth}|% 339 | p{0.77\textwidth}|}% 340 | \hline% 341 | }{% 342 | \end{longtable}% 343 | \end{description}% 344 | \end{DoxyDesc}% 345 | } 346 | 347 | % Used by exception lists 348 | \newenvironment{DoxyExceptions}[1]{% 349 | \begin{DoxyDesc}{#1}% 350 | \begin{description}% 351 | \item[] \hspace{\fill} \vspace{-25pt}% 352 | \definecolor{tableShade}{HTML}{F8F8F8}% 353 | \rowcolors{1}{white}{tableShade}% 354 | \arrayrulecolor{gray}% 355 | \setlength{\tabcolsep}{0.01\textwidth}% 356 | \begin{longtable}{|>{\raggedleft\hspace{0pt}}p{0.25\textwidth}|% 357 | p{0.77\textwidth}|}% 358 | \hline% 359 | }{% 360 | \end{longtable}% 361 | \end{description}% 362 | \end{DoxyDesc}% 363 | } 364 | 365 | % Used by template parameter lists 366 | \newenvironment{DoxyTemplParams}[1]{% 367 | \begin{DoxyDesc}{#1}% 368 | \begin{description}% 369 | \item[] \hspace{\fill} \vspace{-25pt}% 370 | \definecolor{tableShade}{HTML}{F8F8F8}% 371 | \rowcolors{1}{white}{tableShade}% 372 | \arrayrulecolor{gray}% 373 | \setlength{\tabcolsep}{0.01\textwidth}% 374 | \begin{longtable}{|>{\raggedleft\hspace{0pt}}p{0.25\textwidth}|% 375 | p{0.77\textwidth}|}% 376 | \hline% 377 | }{% 378 | \end{longtable}% 379 | \end{description}% 380 | \end{DoxyDesc}% 381 | } 382 | 383 | \newcommand{\doxyref}[3]{\textbf{#1} (\textnormal{#2}\,\pageref{#3})} 384 | \newenvironment{DoxyCompactList} 385 | {\begin{list}{}{ 386 | \setlength{\leftmargin}{0.5cm} 387 | \setlength{\itemsep}{0pt} 388 | \setlength{\parsep}{0pt} 389 | \setlength{\topsep}{0pt} 390 | \renewcommand{\makelabel}{\hfill}}} 391 | {\end{list}} 392 | \newenvironment{DoxyCompactItemize} 393 | { 394 | \begin{itemize} 395 | \setlength{\itemsep}{-3pt} 396 | \setlength{\parsep}{0pt} 397 | \setlength{\topsep}{0pt} 398 | \setlength{\partopsep}{0pt} 399 | } 400 | {\end{itemize}} 401 | \newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp} 402 | \newlength{\tmplength} 403 | \newenvironment{TabularC}[1] 404 | { 405 | \setlength{\tmplength} 406 | {\linewidth/(#1)-\tabcolsep*2-\arrayrulewidth*(#1+1)/(#1)} 407 | \par\begin{xtabular*}{\linewidth} 408 | {*{#1}{|>{\PBS\raggedright\hspace{0pt}}p{\the\tmplength}}|} 409 | } 410 | {\end{xtabular*}\par} 411 | \newcommand{\entrylabel}[1]{ 412 | {\parbox[b]{\labelwidth-4pt}{\makebox[0pt][l]{% 413 | \usefont{OT1}{phv}{bc}{n}\color{darkgray}#1}\vspace{1.5\baselineskip}}}} 414 | \newenvironment{Desc} 415 | {\begin{list}{} 416 | { 417 | \settowidth{\labelwidth}{40pt} 418 | \setlength{\leftmargin}{\labelwidth} 419 | \setlength{\parsep}{0pt} 420 | \setlength{\itemsep}{-4pt} 421 | \renewcommand{\makelabel}{\entrylabel} 422 | } 423 | } 424 | {\end{list}} 425 | \newsavebox{\xrefbox} 426 | \newlength{\xreflength} 427 | \newcommand{\xreflabel}[1]{% 428 | \sbox{\xrefbox}{#1}% 429 | \setlength{\xreflength}{\wd\xrefbox}% 430 | \ifthenelse{\xreflength>\labelwidth}{% 431 | \begin{minipage}{\textwidth}% 432 | \setlength{\parindent}{0pt}% 433 | \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% 434 | \end{minipage}% 435 | }{% 436 | \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% 437 | }}% 438 | \newenvironment{DoxyRefList}{% 439 | \begin{list}{}{% 440 | \setlength{\labelwidth}{10pt}% 441 | \setlength{\leftmargin}{\labelwidth}% 442 | \addtolength{\leftmargin}{\labelsep}% 443 | \renewcommand{\makelabel}{\xreflabel}% 444 | }% 445 | }% 446 | {\end{list}} 447 | \newenvironment{DoxyRefDesc}[1] 448 | {\begin{list}{}{% 449 | \renewcommand\makelabel[1]{\textbf{##1}} 450 | \settowidth\labelwidth{\makelabel{#1}} 451 | \setlength\leftmargin{\labelwidth+\labelsep}}} 452 | {\end{list}} 453 | \newenvironment{Indent} 454 | {\begin{list}{}{\setlength{\leftmargin}{0.5cm}} 455 | \item[]\ignorespaces} 456 | {\unskip\end{list}} 457 | \setlength{\parindent}{0cm} 458 | \setlength{\parskip}{0.2cm} 459 | \addtocounter{secnumdepth}{2} 460 | \usepackage[T1]{fontenc} 461 | \makeatletter 462 | \renewcommand{\paragraph}{\@startsection{paragraph}{4}{0ex}% 463 | {-1.0ex}% 464 | {1.0ex}% 465 | {\usefont{OT1}{phv}{bc}{n}\color{darkgray}}} 466 | \renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{0ex}% 467 | {-1.0ex}% 468 | {1.0ex}% 469 | {\usefont{OT1}{phv}{bc}{n}\color{darkgray}}} 470 | \makeatother 471 | \allsectionsfont{\usefont{OT1}{phv}{bc}{n}\selectfont\color{darkgray}} 472 | \stepcounter{secnumdepth} 473 | \stepcounter{tocdepth} 474 | \definecolor{comment}{rgb}{0.5,0.0,0.0} 475 | \definecolor{keyword}{rgb}{0.0,0.5,0.0} 476 | \definecolor{keywordtype}{rgb}{0.38,0.25,0.125} 477 | \definecolor{keywordflow}{rgb}{0.88,0.5,0.0} 478 | \definecolor{preprocessor}{rgb}{0.5,0.38,0.125} 479 | \definecolor{stringliteral}{rgb}{0.0,0.125,0.25} 480 | \definecolor{charliteral}{rgb}{0.0,0.5,0.5} 481 | \definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} 482 | \definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} 483 | \definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} 484 | \definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} 485 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/latex/make.bat: -------------------------------------------------------------------------------- 1 | del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf 2 | 3 | pdflatex refman 4 | echo ---- 5 | makeindex refman.idx 6 | echo ---- 7 | pdflatex refman 8 | 9 | setlocal enabledelayedexpansion 10 | set count=5 11 | :repeat 12 | set content=X 13 | for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" refman.log' ) do set content="%%~T" 14 | if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" refman.log' ) do set content="%%~T" 15 | if !content! == X goto :skip 16 | set /a count-=1 17 | if !count! EQU 0 goto :skip 18 | 19 | echo ---- 20 | pdflatex refman 21 | goto :repeat 22 | :skip 23 | endlocal 24 | -------------------------------------------------------------------------------- /Android-Unity sockets comunication/doc/latex/refman.tex: -------------------------------------------------------------------------------- 1 | \documentclass{book} 2 | \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} 3 | \usepackage{makeidx} 4 | \usepackage{natbib} 5 | \usepackage{graphicx} 6 | \usepackage{multicol} 7 | \usepackage{float} 8 | \usepackage{listings} 9 | \usepackage{color} 10 | \usepackage{ifthen} 11 | \usepackage[table]{xcolor} 12 | \usepackage{textcomp} 13 | \usepackage{alltt} 14 | \usepackage{ifpdf} 15 | \ifpdf 16 | \usepackage[pdftex, 17 | pagebackref=true, 18 | colorlinks=true, 19 | linkcolor=blue, 20 | unicode 21 | ]{hyperref} 22 | \else 23 | \usepackage[ps2pdf, 24 | pagebackref=true, 25 | colorlinks=true, 26 | linkcolor=blue, 27 | unicode 28 | ]{hyperref} 29 | \usepackage{pspicture} 30 | \fi 31 | \usepackage[utf8]{inputenc} 32 | \usepackage{mathptmx} 33 | \usepackage[scaled=.90]{helvet} 34 | \usepackage{courier} 35 | \usepackage{sectsty} 36 | \usepackage{amssymb} 37 | \usepackage[titles]{tocloft} 38 | \usepackage{doxygen} 39 | \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=8,numbers=left } 40 | \makeindex 41 | \setcounter{tocdepth}{3} 42 | \renewcommand{\footrulewidth}{0.4pt} 43 | \renewcommand{\familydefault}{\sfdefault} 44 | \hfuzz=15pt 45 | \setlength{\emergencystretch}{15pt} 46 | \hbadness=750 47 | \tolerance=750 48 | \begin{document} 49 | \hypersetup{pageanchor=false,citecolor=blue} 50 | \begin{titlepage} 51 | \vspace*{7cm} 52 | \begin{center} 53 | {\Large My Project }\\ 54 | \vspace*{1cm} 55 | {\large Generated by Doxygen 1.8.1.2}\\ 56 | \vspace*{0.5cm} 57 | {\small Thu Jul 26 2012 10:24:48}\\ 58 | \end{center} 59 | \end{titlepage} 60 | \clearemptydoublepage 61 | \pagenumbering{roman} 62 | \tableofcontents 63 | \clearemptydoublepage 64 | \pagenumbering{arabic} 65 | \hypersetup{pageanchor=true,citecolor=blue} 66 | \chapter{Class Index} 67 | \input{annotated} 68 | \chapter{Class Documentation} 69 | \input{class_communication_lib} 70 | \printindex 71 | \end{document} 72 | -------------------------------------------------------------------------------- /DataBaseHelperWithUpdateOption/DataBaseHelper.java: -------------------------------------------------------------------------------- 1 | package com.yourpackage; 2 | 3 | import java.io.File; 4 | import java.io.FileOutputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.io.OutputStream; 8 | 9 | import android.content.Context; 10 | import android.content.SharedPreferences; 11 | import android.database.sqlite.SQLiteDatabase; 12 | import android.database.sqlite.SQLiteOpenHelper; 13 | import android.preference.PreferenceManager; 14 | import android.util.Log; 15 | 16 | /** 17 | * NOTE: For export mysql to sqlite3 -> http://osenxpsuite.net/download.htm 18 | */ 19 | public class DataBaseHelper extends SQLiteOpenHelper { 20 | 21 | private static final String DATABASE_NAME = "your_database_name"; //example if it is in assets folder -> mydatabase.sqlite 22 | private static final int DATABASE_VERSION = 1; //actual version 23 | private static final String SP_KEY_DB_VER = "db_ver_YOUR_APP_NAME"; // 24 | private static final String TAG = "DATABASE_YOUR_APP_NAME"; 25 | private final Context mContext; 26 | 27 | public DataBaseHelper(Context context) { 28 | super(context, DATABASE_NAME, null, DATABASE_VERSION); 29 | mContext = context; 30 | initialize(); 31 | } 32 | 33 | /** 34 | * Initializes database. Creates database if doesn't exist. 35 | */ 36 | private void initialize() { 37 | if (databaseExists()) { 38 | SharedPreferences prefs = PreferenceManager 39 | .getDefaultSharedPreferences(mContext); 40 | int dbVersion = prefs.getInt(SP_KEY_DB_VER, 1); 41 | Log.d(TAG, "ACTUAL_DATABASE_VERSION:"+DATABASE_VERSION+" DATABASE_VERSION:"+dbVersion); 42 | if (DATABASE_VERSION != dbVersion) { 43 | File dbFile = mContext.getDatabasePath(DATABASE_NAME); 44 | if (!dbFile.delete()) { 45 | Log.w(TAG, "Unable to update database"); 46 | } 47 | } 48 | } 49 | if (!databaseExists()) { 50 | createDatabase(); 51 | } 52 | } 53 | 54 | /** 55 | * Returns true if database file exists, false otherwise. 56 | * @return 57 | */ 58 | private boolean databaseExists() { 59 | File dbFile = mContext.getDatabasePath(DATABASE_NAME); 60 | return dbFile.exists(); 61 | } 62 | 63 | /** 64 | * Creates database by copying it from assets directory. 65 | */ 66 | private void createDatabase() { 67 | String parentPath = mContext.getDatabasePath(DATABASE_NAME).getParent(); 68 | String path = mContext.getDatabasePath(DATABASE_NAME).getPath(); 69 | 70 | File file = new File(parentPath); 71 | if (!file.exists()) { 72 | if (!file.mkdir()) { 73 | Log.w(TAG, "Unable to create database directory"); 74 | return; 75 | } 76 | } 77 | 78 | InputStream is = null; 79 | OutputStream os = null; 80 | try { 81 | is = mContext.getAssets().open(DATABASE_NAME); 82 | os = new FileOutputStream(path); 83 | 84 | byte[] buffer = new byte[1024]; 85 | int length; 86 | while ((length = is.read(buffer)) > 0) { 87 | os.write(buffer, 0, length); 88 | } 89 | os.flush(); 90 | SharedPreferences prefs = PreferenceManager 91 | .getDefaultSharedPreferences(mContext); 92 | SharedPreferences.Editor editor = prefs.edit(); 93 | editor.putInt(SP_KEY_DB_VER, DATABASE_VERSION); 94 | editor.commit(); 95 | } catch (IOException e) { 96 | e.printStackTrace(); 97 | } finally { 98 | if (is != null) { 99 | try { 100 | is.close(); 101 | } catch (IOException e) { 102 | e.printStackTrace(); 103 | } 104 | } 105 | if (os != null) { 106 | try { 107 | os.close(); 108 | } catch (IOException e) { 109 | e.printStackTrace(); 110 | } 111 | } 112 | } 113 | Log.i(TAG, "Database created"); 114 | } 115 | 116 | @Override 117 | public void onCreate(SQLiteDatabase db) { 118 | } 119 | 120 | @Override 121 | public void onUpgrade(SQLiteDatabase db, int oldVersion, 122 | int newVersion) { 123 | } 124 | } -------------------------------------------------------------------------------- /DataBaseHelperWithUpdateOption/README.md: -------------------------------------------------------------------------------- 1 | ##DatabaseHelper 2 | 3 | This class Extends from SQLiteOpenHelper and allows update the local database. 4 | NOTE: For export mysql to sqlite3 -> http://osenxpsuite.net/download.htm -------------------------------------------------------------------------------- /DrawableBackgroundDownloader/DrawableBackgroundDownloader.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import java.io.InputStream; 3 | import java.net.MalformedURLException; 4 | import java.net.URL; 5 | import java.net.URLConnection; 6 | import java.util.Collections; 7 | import java.util.HashMap; 8 | import java.util.LinkedList; 9 | import java.util.Map; 10 | import java.util.WeakHashMap; 11 | import java.util.concurrent.ExecutorService; 12 | import java.util.concurrent.Executors; 13 | 14 | import android.graphics.drawable.Drawable; 15 | import android.os.Handler; 16 | import android.os.Message; 17 | import android.widget.ImageView; 18 | 19 | 20 | 21 | 22 | /** 23 | * This Class is for download images and assign the drawable to an ImageView. 24 | * 25 | */ 26 | public class DrawableBackgroundDownloader { 27 | 28 | private final Map mCache = new HashMap(); 29 | private final LinkedList mChacheController = new LinkedList (); 30 | private ExecutorService mThreadPool; 31 | private final Map mImageViews = Collections.synchronizedMap(new WeakHashMap()); 32 | public static int MAX_CACHE_SIZE = 80; 33 | public int THREAD_POOL_SIZE = 3; 34 | 35 | 36 | 37 | /** 38 | * Constructor 39 | */ 40 | public DrawableBackgroundDownloader() { 41 | mThreadPool = Executors.newFixedThreadPool(THREAD_POOL_SIZE); 42 | } 43 | 44 | 45 | /** 46 | * Clears all instance data and stops running threads 47 | */ 48 | public void Reset() { 49 | ExecutorService oldThreadPool = mThreadPool; 50 | mThreadPool = Executors.newFixedThreadPool(THREAD_POOL_SIZE); 51 | oldThreadPool.shutdownNow(); 52 | 53 | mChacheController.clear(); 54 | mCache.clear(); 55 | mImageViews.clear(); 56 | } 57 | 58 | /** 59 | * Load the drawable associated to a url and assign it to an image, you can set a placeholder to replace this drawable. 60 | * @param url Is the url of the image. 61 | * @param imageView The image to assign the drawable. 62 | * @param placeholder A drawable that is show during the image is downloading. 63 | */ 64 | public void loadDrawable(final String url, final ImageView imageView,Drawable placeholder) { 65 | if(!mImageViews.containsKey(url)) 66 | mImageViews.put(imageView, url); 67 | Drawable drawable = getDrawableFromCache(url); 68 | 69 | // check in UI thread, so no concurrency issues 70 | if (drawable != null) { 71 | //Log.d(null, "Item loaded from mCache: " + url); 72 | imageView.setImageDrawable(drawable); 73 | } else { 74 | imageView.setImageDrawable(placeholder); 75 | queueJob(url, imageView, placeholder); 76 | } 77 | } 78 | 79 | 80 | /** 81 | * Return a drawable from the cache. 82 | * @param url url of the image. 83 | * @return a Drawable in case that the image exist in the cache, else returns null. 84 | */ 85 | public Drawable getDrawableFromCache(String url) { 86 | if (mCache.containsKey(url)) { 87 | return mCache.get(url); 88 | } 89 | 90 | return null; 91 | } 92 | 93 | 94 | /** 95 | * Save the image to cache memory. 96 | * @param url The image url 97 | * @param drawable The drawable to save. 98 | */ 99 | private synchronized void putDrawableInCache(String url,Drawable drawable) { 100 | int chacheControllerSize = mChacheController.size(); 101 | if (chacheControllerSize > MAX_CACHE_SIZE) 102 | mChacheController.subList(0, MAX_CACHE_SIZE/2).clear(); 103 | 104 | mChacheController.addLast(drawable); 105 | mCache.put(url, drawable); 106 | 107 | } 108 | 109 | /** 110 | * Queue the job to download the image. 111 | * @param url Image url. 112 | * @param imageView The ImageView where is assigned the drawable. 113 | * @param placeholder The drawable that is show during the image is downloading. 114 | */ 115 | private void queueJob(final String url, final ImageView imageView,final Drawable placeholder) { 116 | /* Create handler in UI thread. */ 117 | final Handler handler = new Handler() { 118 | @Override 119 | public void handleMessage(Message msg) { 120 | String tag = mImageViews.get(imageView); 121 | if (tag != null && tag.equals(url)) { 122 | if (imageView.isShown()) 123 | if (msg.obj != null) { 124 | imageView.setImageDrawable((Drawable) msg.obj); 125 | } else { 126 | imageView.setImageDrawable(placeholder); 127 | //Log.d(null, "fail " + url); 128 | } 129 | } 130 | } 131 | }; 132 | 133 | mThreadPool.submit(new Runnable() { 134 | public void run() { 135 | final Drawable bmp = downloadDrawable(url); 136 | // if the view is not visible anymore, the image will be ready for next time in cache 137 | if (imageView.isShown()) 138 | { 139 | Message message = Message.obtain(); 140 | message.obj = bmp; 141 | //Log.d(null, "Item downloaded: " + url); 142 | 143 | handler.sendMessage(message); 144 | } 145 | } 146 | }); 147 | } 148 | 149 | 150 | /** 151 | * Method that download the image 152 | * @param url The url image. 153 | * @return Returns the drawable associated to this image. 154 | */ 155 | private Drawable downloadDrawable(String url) { 156 | try { 157 | InputStream is = getInputStream(url); 158 | 159 | Drawable drawable = Drawable.createFromStream(is, url); 160 | putDrawableInCache(url,drawable); 161 | return drawable; 162 | 163 | } catch (MalformedURLException e) { 164 | e.printStackTrace(); 165 | } catch (IOException e) { 166 | e.printStackTrace(); 167 | } 168 | 169 | return null; 170 | } 171 | 172 | /** 173 | * This method manage the connection to download the image. 174 | * @param urlString url of the image. 175 | * @return Returns an InputStream associated with the url image. 176 | * @throws MalformedURLException 177 | * @throws IOException 178 | */ 179 | private InputStream getInputStream(String urlString) throws MalformedURLException, IOException { 180 | URL url = new URL(urlString); 181 | URLConnection connection; 182 | connection = url.openConnection(); 183 | connection.setUseCaches(true); 184 | connection.connect(); 185 | InputStream response = connection.getInputStream(); 186 | 187 | return response; 188 | } 189 | } -------------------------------------------------------------------------------- /DrawableBackgroundDownloader/readme.md: -------------------------------------------------------------------------------- 1 | DrawableBackgroundDownloader 2 | ======= 3 | 4 | This Class helps to download images and assign the drawable to an ImageView. 5 | 6 | Is easy to use just declare: 7 | DrawableBackgroundDownloader drawableDownloader = new DrawableBackgroundDownloader(); 8 | And where do you want to use: 9 | drawableDownloader.loadDrawable(String urlImage, ImageView iView,Drawable drawable); 10 | Where drawable is a Drawable that is showing during image download. -------------------------------------------------------------------------------- /LoadImageFromAssets/LoadImageFromAssets.java: -------------------------------------------------------------------------------- 1 | 2 | import java.io.IOException; 3 | import java.io.InputStream; 4 | 5 | import android.content.Context; 6 | import android.graphics.Bitmap; 7 | import android.graphics.drawable.BitmapDrawable; 8 | import android.graphics.drawable.Drawable; 9 | import android.util.Log; 10 | import android.widget.ImageView; 11 | 12 | /** 13 | * Class for load easily images stored in assets 14 | * @author Fernando Valle 15 | * 16 | */ 17 | public class LoadImageFromAssets { 18 | 19 | Context context; 20 | int l_height=-1, l_width=-1; 21 | int p_height=-1, p_width=-1; 22 | boolean landscape = false; 23 | boolean portrait = false; 24 | 25 | /** 26 | * 27 | * @param c Context 28 | */ 29 | public LoadImageFromAssets(Context c) 30 | { 31 | context = c; 32 | } 33 | 34 | /** 35 | * load the image source from assets to iv, you can load from a folder in assets, 36 | * example /assets/images/image1.jpg => imgPath = "images/image1.jpg" 37 | * @param iv ImageView where show the image 38 | * @param imgPath 39 | */ 40 | public void loadImage(ImageView iv, String imgPath) 41 | { 42 | iv.setImageDrawable(getDrawable(imgPath)); 43 | } 44 | 45 | /** 46 | * Resize the image in the case that in the original image width > height 47 | * @param w width of the image that is showing 48 | * @param h height of the image that is showing 49 | */ 50 | public void resizeIfLandscape(int w,int h) 51 | { 52 | l_height = h; 53 | l_width = w; 54 | landscape = true; 55 | } 56 | 57 | /** 58 | * Resize the image in the case that in the original image width < height 59 | * @param w width of the image that is showing 60 | * @param h height of the image that is showing 61 | */ 62 | public void resizeIfPortrait(int w,int h) 63 | { 64 | p_height = h; 65 | p_width = w; 66 | portrait = true; 67 | } 68 | 69 | /** 70 | * For obtain the Drawable 71 | * @param url The url image. 72 | * @return Returns the drawable associated to this image. 73 | */ 74 | private Drawable getDrawable(String path) { 75 | InputStream is = getInputStream(path); 76 | Drawable drawable = Drawable.createFromStream(is, path); 77 | 78 | Bitmap d = ((BitmapDrawable)drawable).getBitmap(); 79 | Bitmap bitmapOrig = d; 80 | if(landscape) 81 | { 82 | if(d.getHeight() < d.getWidth()) 83 | { 84 | bitmapOrig = Bitmap.createScaledBitmap(d, l_width, l_height, false); 85 | } 86 | } 87 | else if(portrait) 88 | { 89 | if(drawable.getBounds().height() > drawable.getBounds().width()) 90 | { 91 | bitmapOrig = Bitmap.createScaledBitmap(d, p_width, p_height, false); 92 | } 93 | } 94 | 95 | return new BitmapDrawable(context.getResources(),bitmapOrig); 96 | } 97 | 98 | 99 | 100 | 101 | /** 102 | * Read the file and get the InputStream 103 | * @param path 104 | * @return 105 | */ 106 | private InputStream getInputStream(String path) { 107 | 108 | InputStream is = null; 109 | try { 110 | is = context.getAssets().open(path); 111 | } catch (IOException e) { 112 | // TODO Auto-generated catch block 113 | e.printStackTrace(); 114 | } 115 | return is; 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /LoadImageFromAssets/README.md: -------------------------------------------------------------------------------- 1 | LoadImageFromAssets 2 | ======= 3 | 4 | This class allow you load an Image from assets easily. 5 | Example of the use: 6 | 7 | ImageView = findViewById(R.id.myImageView); 8 | LoadImageFromAssets loadImage= new LoadImageFromAssets(context); 9 | loadImage.resizeIfLandscape(640, 480); //Optional 10 | loadImage.loadImage(iv, "images/image1.jpg"); 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Android 2 | ======= 3 | 4 | Some classes useful for Android, tutorials, etc. -------------------------------------------------------------------------------- /VoiceRecognitionActivity/README.md: -------------------------------------------------------------------------------- 1 | Voice Recognition Activity 2 | =========================== 3 | 4 | This is an exampe of activity that implements voice recognition. 5 | You can add a button for example to make it practical. -------------------------------------------------------------------------------- /VoiceRecognitionActivity/VoiceRecognitionActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import java.util.ArrayList; 4 | 5 | import android.app.Activity; 6 | import android.app.AlertDialog; 7 | import android.content.DialogInterface; 8 | import android.content.Intent; 9 | import android.os.Bundle; 10 | import android.speech.RecognizerIntent; 11 | import android.view.View; 12 | import android.view.View.OnClickListener; 13 | import android.widget.Button; 14 | 15 | 16 | public class VoiceRecognitionActivity extends Activity { 17 | 18 | private static final int VOICE_RECOGNITION_REQUEST_CODE = 1234; 19 | 20 | /** 21 | * The function that start the voice recognition. 22 | */ 23 | private void startVoiceRecognitionActivity() { 24 | Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); 25 | intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); 26 | intent.putExtra(RecognizerIntent.EXTRA_PROMPT, ""); 27 | startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE); 28 | } 29 | 30 | /** 31 | * Where you can handle the result of the voice recgnition. 32 | */ 33 | @Override 34 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 35 | if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) { 36 | ArrayList matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); 37 | final CharSequence[] items = new CharSequence[matches.size()]; 38 | for(int i = 0; i < matches.size(); i++){ 39 | items[i] = matches.get(i); 40 | } 41 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 42 | builder.setItems(items, new DialogInterface.OnClickListener() { 43 | public void onClick(DialogInterface dialog, int item) { 44 | //Do what you want with the text 45 | Toast.makeText(MainActivity.this, "text: "+ items[item].toString(), Toast.LENGTH_LONG).show(); 46 | 47 | } 48 | }); 49 | 50 | AlertDialog alert = builder.create(); 51 | alert.show(); 52 | } 53 | super.onActivityResult(requestCode, resultCode, data); 54 | } 55 | } -------------------------------------------------------------------------------- /dividers/README.md: -------------------------------------------------------------------------------- 1 | Dividers 2 | ======= 3 | 4 | Here I will put a collection of XML dividers. 5 | 6 | 7 | 8 | ![cool_divider.jpg](images/cool_divider.jpg "cool_divider.xml") 9 | ![cool_divider_vertical.jpg](images/cool_divider_vertical.jpg "cool_divider_vertical.xml") -------------------------------------------------------------------------------- /dividers/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/dividers/Thumbs.db -------------------------------------------------------------------------------- /dividers/cool_divider_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /dividers/cool_divider_vertical.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | -------------------------------------------------------------------------------- /dividers/gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /dividers/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/dividers/images/Thumbs.db -------------------------------------------------------------------------------- /dividers/images/cool_divider.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/dividers/images/cool_divider.jpg -------------------------------------------------------------------------------- /dividers/images/cool_divider_vertical.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/dividers/images/cool_divider_vertical.jpg -------------------------------------------------------------------------------- /routes googleMaps v2/JSONParser.java: -------------------------------------------------------------------------------- 1 | package your-package; 2 | 3 | /** 4 | * @author zeeshan0026 5 | */ 6 | 7 | import java.io.BufferedInputStream; 8 | import java.io.BufferedReader; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | import java.io.InputStreamReader; 12 | import java.io.UnsupportedEncodingException; 13 | import java.net.HttpURLConnection; 14 | import java.net.URL; 15 | 16 | import org.apache.http.HttpEntity; 17 | import org.apache.http.HttpResponse; 18 | import org.apache.http.client.ClientProtocolException; 19 | import org.apache.http.client.HttpClient; 20 | import org.apache.http.client.methods.HttpPost; 21 | import org.apache.http.impl.client.DefaultHttpClient; 22 | import org.json.JSONObject; 23 | 24 | import android.util.Log; 25 | 26 | public class JSONParser { 27 | 28 | static InputStream is = null; 29 | static JSONObject jObj = null; 30 | static String json = ""; 31 | // constructor 32 | public JSONParser() { 33 | } 34 | public String getJSONFromUrl(String url) { 35 | 36 | // Making HTTP request 37 | try { 38 | 39 | URL urlnew = new URL(url); 40 | HttpURLConnection urlConnection = (HttpURLConnection) urlnew.openConnection(); 41 | is = new BufferedInputStream(urlConnection.getInputStream()); 42 | 43 | 44 | } catch (UnsupportedEncodingException e) { 45 | e.printStackTrace(); 46 | } catch (ClientProtocolException e) { 47 | e.printStackTrace(); 48 | } catch (IOException e) { 49 | e.printStackTrace(); 50 | } 51 | try { 52 | BufferedReader reader = new BufferedReader(new InputStreamReader( 53 | is, "iso-8859-1"), 8); 54 | StringBuilder sb = new StringBuilder(); 55 | String line = null; 56 | while ((line = reader.readLine()) != null) { 57 | sb.append(line + "\n"); 58 | } 59 | 60 | json = sb.toString(); 61 | is.close(); 62 | } catch (Exception e) { 63 | Log.e("Buffer Error", "Error converting result " + e.toString()); 64 | } 65 | Log.d("JSON_RUTA", json); 66 | return json; 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /routes googleMaps v2/README.md: -------------------------------------------------------------------------------- 1 | Routes for googleMaps V2 2 | ======= 3 | 4 | This class allow you draw a route for googleMaps V2 in Android. 5 | You can draw a simple route or add the indicatins of directions in every step. 6 | 7 | Remember that you have to download JSON .jar from: http://www.java2s.com/Code/JarDownload/json/json.jar.zip 8 | -------------------------------------------------------------------------------- /routes googleMaps v2/Route.java: -------------------------------------------------------------------------------- 1 | package your-package; 2 | 3 | 4 | import java.io.UnsupportedEncodingException; 5 | import java.net.URLDecoder; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import org.json.JSONArray; 10 | import org.json.JSONException; 11 | import org.json.JSONObject; 12 | 13 | import android.app.ProgressDialog; 14 | import android.content.Context; 15 | import android.graphics.Color; 16 | import android.os.AsyncTask; 17 | import android.text.Html; 18 | 19 | import com.google.android.gms.maps.GoogleMap; 20 | import com.google.android.gms.maps.model.BitmapDescriptorFactory; 21 | import com.google.android.gms.maps.model.LatLng; 22 | import com.google.android.gms.maps.model.MarkerOptions; 23 | import com.google.android.gms.maps.model.Polyline; 24 | import com.google.android.gms.maps.model.PolylineOptions; 25 | 26 | 27 | /** 28 | * 29 | * @author zeeshan0026 and Fernando Valle 30 | * http://stackoverflow.com/users/1547539/zeeshan0026 31 | * http://stackoverflow.com/users/1826257/fernando-valle 32 | */ 33 | 34 | 35 | //for set language look at the web: https://spreadsheets.google.com/spreadsheet/pub?key=0Ah0xU81penP1cDlwZHdzYWkyaERNc0xrWHNvTTA1S1E&gid=1 36 | // example Spanish "es". 37 | 38 | public class Route { 39 | GoogleMap mMap; 40 | Context context; 41 | String lang; 42 | 43 | 44 | static String LANGUAGE_SPANISH = "es"; 45 | static String LANGUAGE_ENGLISH = "en"; 46 | static String LANGUAGE_FRENCH = "fr"; 47 | static String LANGUAGE_GERMAN = "de"; 48 | static String LANGUAGE_CHINESE_SIMPLIFIED = "zh-CN"; 49 | static String LANGUAGE_CHINESE_TRADITIONAL = "zh-TW"; 50 | 51 | static String TRANSPORT_DRIVING = "driving"; 52 | static String TRANSPORT_WALKING = "walking"; 53 | static String TRANSPORT_BIKE = "bicycling"; 54 | static String TRANSPORT_TRANSIT = "transit"; 55 | 56 | 57 | public boolean drawRoute(GoogleMap map, Context c, ArrayList points, boolean withIndications, String language, boolean optimize) 58 | { 59 | mMap = map; 60 | context = c; 61 | lang = language; 62 | if(points.size() == 2) 63 | { 64 | String url = makeURL(points.get(0).latitude,points.get(0).longitude,points.get(1).latitude,points.get(1).longitude,"driving"); 65 | new connectAsyncTask(url,withIndications).execute(); 66 | return true; 67 | } 68 | else if(points.size() > 2) 69 | { 70 | String url = makeURL(points,"driving",optimize); 71 | new connectAsyncTask(url,withIndications).execute(); 72 | return true; 73 | } 74 | 75 | return false; 76 | 77 | } 78 | 79 | public boolean drawRoute(GoogleMap map, Context c, ArrayList points, String language, boolean optimize) 80 | { 81 | mMap = map; 82 | context = c; 83 | lang = language; 84 | if(points.size() == 2) 85 | { 86 | String url = makeURL(points.get(0).latitude,points.get(0).longitude,points.get(1).latitude,points.get(1).longitude,"driving"); 87 | new connectAsyncTask(url,false).execute(); 88 | return true; 89 | } 90 | else if(points.size() > 2) 91 | { 92 | String url = makeURL(points,"driving",optimize); 93 | new connectAsyncTask(url,false).execute(); 94 | return true; 95 | } 96 | 97 | return false; 98 | 99 | } 100 | 101 | 102 | public boolean drawRoute(GoogleMap map, Context c, ArrayList points, String mode, boolean withIndications, String language, boolean optimize) 103 | { 104 | mMap = map; 105 | context = c; 106 | lang = language; 107 | if(points.size() == 2) 108 | { 109 | String url = makeURL(points.get(0).latitude,points.get(0).longitude,points.get(1).latitude,points.get(1).longitude,mode); 110 | new connectAsyncTask(url,withIndications).execute(); 111 | return true; 112 | } 113 | else if(points.size() > 2) 114 | { 115 | String url = makeURL(points,mode,optimize); 116 | new connectAsyncTask(url,withIndications).execute(); 117 | return true; 118 | } 119 | 120 | return false; 121 | 122 | } 123 | 124 | // 125 | 126 | 127 | public void drawRoute(GoogleMap map, Context c, LatLng source, LatLng dest, boolean withIndications, String language) 128 | { 129 | mMap = map; 130 | context = c; 131 | 132 | String url = makeURL(source.latitude,source.longitude,dest.latitude,dest.longitude,"driving"); 133 | new connectAsyncTask(url,withIndications).execute(); 134 | lang = language; 135 | 136 | } 137 | 138 | 139 | public void drawRoute(GoogleMap map, Context c, LatLng source, LatLng dest, String language) 140 | { 141 | mMap = map; 142 | context = c; 143 | 144 | String url = makeURL(source.latitude,source.longitude,dest.latitude,dest.longitude,"driving"); 145 | new connectAsyncTask(url,false).execute(); 146 | lang = language; 147 | 148 | } 149 | 150 | 151 | public void drawRoute(GoogleMap map, Context c, LatLng source, LatLng dest, String mode, boolean withIndications, String language) 152 | { 153 | mMap = map; 154 | context = c; 155 | 156 | String url = makeURL(source.latitude,source.longitude,dest.latitude,dest.longitude,mode); 157 | new connectAsyncTask(url,withIndications).execute(); 158 | lang = language; 159 | 160 | } 161 | 162 | private String makeURL (ArrayList points, String mode, boolean optimize){ 163 | StringBuilder urlString = new StringBuilder(); 164 | 165 | if(mode == null) 166 | mode = "driving"; 167 | 168 | urlString.append("http://maps.googleapis.com/maps/api/directions/json"); 169 | urlString.append("?origin=");// from 170 | urlString.append( points.get(0).latitude); 171 | urlString.append(','); 172 | urlString.append(points.get(0).longitude); 173 | urlString.append("&destination="); 174 | urlString.append(points.get(points.size()-1).latitude); 175 | urlString.append(','); 176 | urlString.append(points.get(points.size()-1).longitude); 177 | 178 | urlString.append("&waypoints="); 179 | if(optimize) 180 | urlString.append("optimize:true|"); 181 | urlString.append( points.get(1).latitude); 182 | urlString.append(','); 183 | urlString.append(points.get(1).longitude); 184 | 185 | for(int i=2;i decodePoly(String encoded) { 225 | 226 | List poly = new ArrayList(); 227 | int index = 0, len = encoded.length(); 228 | int lat = 0, lng = 0; 229 | 230 | while (index < len) { 231 | int b, shift = 0, result = 0; 232 | do { 233 | b = encoded.charAt(index++) - 63; 234 | result |= (b & 0x1f) << shift; 235 | shift += 5; 236 | } while (b >= 0x20); 237 | int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1)); 238 | lat += dlat; 239 | 240 | shift = 0; 241 | result = 0; 242 | do { 243 | b = encoded.charAt(index++) - 63; 244 | result |= (b & 0x1f) << shift; 245 | shift += 5; 246 | } while (b >= 0x20); 247 | int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1)); 248 | lng += dlng; 249 | 250 | LatLng p = new LatLng( (((double) lat / 1E5)), 251 | (((double) lng / 1E5) )); 252 | poly.add(p); 253 | } 254 | 255 | return poly; 256 | } 257 | 258 | 259 | 260 | 261 | private class connectAsyncTask extends AsyncTask{ 262 | private ProgressDialog progressDialog; 263 | String url; 264 | boolean steps; 265 | connectAsyncTask(String urlPass, boolean withSteps){ 266 | url = urlPass; 267 | steps = withSteps; 268 | 269 | } 270 | @Override 271 | protected void onPreExecute() { 272 | // TODO Auto-generated method stub 273 | super.onPreExecute(); 274 | progressDialog = new ProgressDialog(context); 275 | progressDialog.setMessage("Fetching route, Please wait..."); 276 | progressDialog.setIndeterminate(true); 277 | progressDialog.show(); 278 | } 279 | @Override 280 | protected String doInBackground(Void... params) { 281 | JSONParser jParser = new JSONParser(); 282 | String json = jParser.getJSONFromUrl(url); 283 | return json; 284 | } 285 | @Override 286 | protected void onPostExecute(String result) { 287 | super.onPostExecute(result); 288 | progressDialog.hide(); 289 | if(result!=null){ 290 | drawPath(result,steps); 291 | } 292 | } 293 | } 294 | 295 | private void drawPath(String result, boolean withSteps) { 296 | 297 | try { 298 | //Tranform the string into a json object 299 | final JSONObject json = new JSONObject(result); 300 | JSONArray routeArray = json.getJSONArray("routes"); 301 | JSONObject routes = routeArray.getJSONObject(0); 302 | JSONObject overviewPolylines = routes.getJSONObject("overview_polyline"); 303 | String encodedString = overviewPolylines.getString("points"); 304 | List list = decodePoly(encodedString); 305 | 306 | for(int z = 0; z 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/ic_launcher-web.png -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/libs/android-support-v4.jar -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-17 15 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/not_move_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_bot_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_bot_in_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_bot_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_bot_out_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_left_in_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_left_out_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_right_in_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_right_out_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_top_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_top_in_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/push_top_out_with_fade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/rotate_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/anim/rotate_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tato469/Android/f23c554fb35add3b31a46ec3bd7392545dcd3a5a/set of animations/ActivitiesAnimationExample/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /set of animations/ActivitiesAnimationExample/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 24 | 25 | 32 | 33 | 40 | 41 | 49 | 50 |