├── .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 |
85 |
Here are the classes, structs, unions and interfaces with brief descriptions:
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 |
85 |
86 |
This is the complete list of members for CommunicationLib, including all inherited members.
87 |
96 |
97 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/Android-Unity sockets comunication/doc/html/class_communication_lib.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
88 |
89 |
CommunicationLib class.
90 | More...
91 |
92 |
93 | Public Member Functions |
94 | | CommunicationLib () |
95 | | Empty constructor.
|
96 | | CommunicationLib (int sPort, int cPort) |
97 | | Constructor with arguments.
|
98 | void | setTimout (int mSec) |
99 | | Change the timeOut for the server.
|
100 | void | start () |
101 | | throw a thread and start listening for new datagrams.
|
102 | void | stop () |
103 | | stop the listening and clos the connection.
|
104 | string | readMessage () |
105 | | This function return the message received.
|
106 | void | testClient (String s) |
107 | | This function test the server.
|
108 |
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 |
119 |
120 |
121 | CommunicationLib.CommunicationLib |
122 | ( |
123 | | ) |
124 | |
125 |
126 |
127 | |
128 |
129 | inline |
130 |
131 |
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 |
145 |
146 |
147 | CommunicationLib.CommunicationLib |
148 | ( |
149 | int |
150 | sPort, |
151 |
152 |
153 | |
154 | |
155 | int |
156 | cPort |
157 |
158 |
159 | |
160 | ) |
161 | | |
162 |
163 |
164 | |
165 |
166 | inline |
167 |
168 |
169 |
170 |
171 |
Constructor with arguments.
172 |
- Parameters
-
173 |
174 | sPort | an integer for set the server port. |
175 | cPort | an integer for set the client port. |
176 |
177 |
178 |
179 |
- See Also
- CommunicationLib()
180 |
181 |
182 |
183 |
Member Function Documentation
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 | string CommunicationLib.readMessage |
193 | ( |
194 | | ) |
195 | |
196 |
197 |
198 | |
199 |
200 | inline |
201 |
202 |
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 |
217 |
218 |
219 | void CommunicationLib.setTimout |
220 | ( |
221 | int |
222 | mSec | ) |
223 | |
224 |
225 |
226 | |
227 |
228 | inline |
229 |
230 |
231 |
232 |
233 |
Change the timeOut for the server.
234 |
- Parameters
-
235 |
236 | mSec | the time in miliseconds for the timeout. |
237 |
238 |
239 |
240 |
- See Also
- CommunicationLib()
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 | void CommunicationLib.start |
253 | ( |
254 | | ) |
255 | |
256 |
257 |
258 | |
259 |
260 | inline |
261 |
262 |
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 |
276 |
277 |
278 | void CommunicationLib.stop |
279 | ( |
280 | | ) |
281 | |
282 |
283 |
284 | |
285 |
286 | inline |
287 |
288 |
289 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 | void CommunicationLib.testClient |
305 | ( |
306 | String |
307 | s | ) |
308 | |
309 |
310 |
311 | |
312 |
313 | inline |
314 |
315 |
316 |
317 |
318 |
This function test the server.
319 |
- Parameters
-
320 |
321 | s | is the string send to the server. |
322 |
323 |
324 |
325 |
- See Also
- CommunicationLib(), start() and readMessage()
326 |
327 |
328 |
329 |
The documentation for this class was generated from the following file:
330 | - ComunicationLib.cs
331 |
332 |
333 |
334 |
339 |
340 |
341 |
--------------------------------------------------------------------------------
/Android-Unity sockets comunication/doc/html/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |