Skip to main content

Posts

Showing posts from August, 2011

ආදරණීය X-Files, පොඩි කාලේ පිස්සු මතක, සහ ප්‍රථම ප්‍රේමය

සය්බර් යායේ එක්ස් ෆයිල්ස්  ගැන ලියවෙච්ච පොස්ට් එක නිසා මටත් ලියන්න හිතුනා මගේ එදත් අදත් ප්‍රියතම රුපවාහිනී වැඩසටහන ගැන පුංචි ලියමනක්. මම එක්ස් ෆයිල්ස් බලන්න ගත්තේ මතක හැටියට 7 හරි 8 වසරේදී. මගේ ළඟින් ඉස්කෝලේ වාඩිවෙච්ච යාලුවට තදින්ම එක්ස් ෆයිල්ස් උණ තිබුනා. එයා තමයි මටත් ඉස්කෝලේ ඇවිදින් ඒක ගැන කියවල මට උණ බෝ කරේ.  කුළුඳුල් X-Files කොටස : ඉස්සෙල්ලම බැලුව කොටස තාමත් මතකයි : Our Town. හැබැයි මෙලෝ සංසාරයක් තේරුනේ නම් නෑ. උප සිරැසි තිබුනත්. එදා පළවැනි දවසේ මම අර කාටද මැජික් වගේ කටත් අරන් බලන් හිටියා මිසක්. මොකද සාමාන්‍යෙන් බලලා පුරුදු වැඩසටහන් වගේ නෙවෙයි නේ. මුලින් නම් ගම් මියුසික් මුකුත් යන්න කලින් ඔන්න පෙන්නනවා වෙච්ච සිද්ධිය. මොකක් හරි අමුතු පටලැවිල්ලක් තමයි ඉතින්.  X-Files කතා වර්ග 2 යි සාමාන්‍යෙන් මේකේ කොටස් කොට්ටාශ 2 කට අයිති වෙනවා.  එක්කෝ පිට සක්වල ජීවින් ඉන්න, කලින් සහ ඉදිරියට සම්බන්දකම් ඇති කොටස් මාලාවක කෑල්ලක්. මේ ගණයට අයිති කොටස් වල තමයි අර සිගරට් බොන එපා කරපු පොර ඉන්නේ(CSM). මෝල්ඩර් ගේ නංගි ගැන, ස්කලිගේ පිළිකාව ගැන, ස්කලීගේ බෙල්ලේ තියෙන චිප් එක

Android Adventures - Keeping alive a Bluetooth connection

Continuing my adventures into the Android domain, I wanted to have a Bluetooth connection between two nodes, going indefinitely, until one node sends a termination signal. Between the time of initializing the connection, and termination, the two nodes may exchange messages at random intervals. Now, the Bluetooth chat example provided in http://developer.android.com/resources/samples/BluetoothChat/index.html is very helpful. I did use some of the code, but my client connection was defined in the Activity class itself, as a inner class extending Thread: public class MyActivity extends Activity {  //some code here that does the work in the activity    private class MyThread extends Thread {         private final BluetoothSocket socket;         private final BluetoothDevice device;         private WorkerInfo worker;         public MyThread(WorkerInfo pInfo) {             BluetoothSocket tmp = null;             device = pInfo.getDevice();             worker = p