Is there any way to use the socket port lower than 1024 (eg. 223) in Android platform

by » Sun, 15 Mar 2009 13:13:54 GMT

Sponsored Links
 Is there any way to use the socket port lower than 1024 with class
MulticastSocket? My application has to use this port to receive data
from other official tool which I can not change.  But happend when I new a MulticastSocket instance.
I've added INTERNET permission and I can create the socket if I change
it to other port bigger than 1023.

Source code : sock = New MulticastSocket(223)

I/System.out(  279): SocketException happend
W/System.err(  279): Permissions do not allow
action on socket
W/System.err(  279):    at
(Native Method)
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at<init>
W/System.err(  279):    at<init>
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at$1800
W/System.err(  279):    at$H.handleMessage
W/System.err(  279):    at android.os.Handler.dispatchMessage
W/System.err(  279):    at android.os.Looper.loop(
W/System.err(  279):    at
W/System.err(  279):    at java.lang.reflect.Method.invokeNative
(Native Method)
W/System.err(  279):    at java.lang.reflect.Method.invoke(
W/System.err(  279):    at
W/System.err(  279):    at
W/System.err(  279):    at dalvik.system.NativeStart.main(Native


Other Threads

1. How to get click position in TextView?

I need to process words on which user clicked (touched) in the
TextView. But there seems to be no way to figure out which word was
TextView.getSelectionStart() always returns 0 even if I use

I have also tried EditText, but it pops up the on-screen keyboard
every time user clicks the text. And I don't want the text to be
editable anyway, and the cursor should not be visible.

Also I have tried to use setInputMethod() to use my own InputMethod
class that overrides onTouchEvent() to get the coordinates of the
click point. But than there is no way to convert the coordinates to
character position in the text.

Is there any other way?
Any advice is greatly appreciated.
Thanks a lot,


2. My presentation analyzing Android bootup time

Hi all,

I have seen traffic on this list indicating some interest
in reducing the bootup time of Android.  I've spent some
time recently looking at this, and made a presentation at
LinuxCon last week with some of my results and observations.

Unfortunately, I didn't make any concrete progress on reducing
the bootup time. But I have, I think, highlighted the areas
that need work in order to make improvements.

The presentation and supporting materials are at:

If anyone has additional information, please consider
adding it to that page, or to the general Android
booting page, at:

I'll be continuing to work on this, but wanted to
make my results so far available for others to use.

 -- Tim

Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Network Entertainment


3. Round Thumbs in Seek Bar

4. Google Earth Api's

5. How to write ContentProvider for content not stored in a file nor DB?

6. Starting an Activity from a callback class

7. Approved for App Inventor