<div dir="ltr">Forgot to CC this the Erlang list... my reply to Joe's request.<br><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Paul Barry</b> <span dir="ltr"><<a href="mailto:paul.james.barry@gmail.com">paul.james.barry@gmail.com</a>></span><br>
Date: 9 April 2013 10:42<br>Subject: Re: [erlang-questions] How to connect android to raspberry pi<br>To: Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>><br><br><br><div dir="ltr"><div><div><div>
<div>Hi Joe.<br><br></div>Please see my Python for Android article on Linux Journal: <a href="http://www.linuxjournal.com/article/10940" target="_blank">http://www.linuxjournal.com/article/10940</a> - you'll need to install the Android SDK, but not all the Eclispe stuff to get it to work.  My little example app is not far off what you need/want re: communicating with a web server running on some device somewhere.  Other examples are in Chapter 8 of my Head First Python book: <a href="http://shop.oreilly.com/product/0636920003434.do" target="_blank">http://shop.oreilly.com/product/0636920003434.do</a><br>

<br></div>Main point: you can do what you need on your Android device in a couple lines of Python.  :-)<br><br></div>Hope this helps.<br><br></div>Paul.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">On 9 April 2013 10:34, Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Dear Aunty Erlang List,</div><div><br></div><div>I would like to write a simple Android Application.</div>

<div><br></div><div>What I want to do is build an Android client running on my phone </div><div>
talking to an Erlang server running on my raspberry pi.</div><div><br></div><div>I know how to do the server bit on the raspberry pi, that's really really easy,</div><div>but do not know how to do the Android bit.</div>


<div><br></div><div>Can anybody refer me to a simple( see footnote [1]) and *minimal* [2]</div><div>example code for Android that does (say) the following:</div><div><br></div><div>   - Puts a single button on the screen of my phone with the word "click"</div>


<div>   - When I press click sends a GET or POST request to a</div><div>     web server with a known IP address and port (this will be my</div><div>     raspberry pi)</div><div><br></div><div>[1] When I say *simple* I mean:</div>


<div><br></div><div>    - All the code is made in emacs by editing text files</div><div>    - There is a makefile</div><div>    - There are some instructions (that work) which tell me how to </div><div>      move the application from my development machine to my phone</div>


<div><br></div><div>What I do not want is:</div><div><br></div><div>    - flexible cross-platform responsive designs</div><div>    - integrated IDE cross-platform</div><div>    - no stupid IDE that asks me questions that I do not understand </div>


<div>    - one click deployment</div><div>    - powerful API with bells and whistles</div><div>    - built-in security, authentication ...</div><div>    - ... </div><div>    - designed for non-programmers</div><div>    - no programming necessary</div>


<div>    - make your first application and earn $$$ with one click</div><div>  </div><div>[2] Minimal means</div><div><br></div><div>    as few (text) files as possible - and *with* comments</div><div><br></div><div>I want the good old fashion hard method. Sweat blood to make it work,</div>


<div>"read and understand *every* line of code in every file" - no</div><div>dependence on libraries - write the code in emacs - automate with</div><div>"make."</div><div><br></div><div>I know I'm a Dinosaur, and I should use Eclipse, but I always get</div>


<div>stuck at the first question when it asks me questions that I do not understand.</div><div><br></div><div>I am seeking enlightenment, not ease of programming.</div><div><br></div><div>Cheers</div><span><font color="#888888"><div>

<br></div>
<div>/Joe</div><div><br></div></font></span></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Paul Barry, w: <a href="http://paulbarry.itcarlow.ie" target="_blank">http://paulbarry.itcarlow.ie</a> - e: <a href="mailto:paul.barry@itcarlow.ie" target="_blank">paul.barry@itcarlow.ie</a><br>

Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.<br>
</font></span></div>
</div><br><br clear="all"><br>-- <br>Paul Barry, w: <a href="http://paulbarry.itcarlow.ie" target="_blank">http://paulbarry.itcarlow.ie</a> - e: <a href="mailto:paul.barry@itcarlow.ie" target="_blank">paul.barry@itcarlow.ie</a><br>
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.<br>
</div></div>