Hmm this is strange. The Eclipse plug-in basically does that. There
should be no other setup to do.

Do you have the standalone DDMS running?

Xav

On Thu, Mar 3, 2011 at 5:32 PM, Panayotis Katsaloulis
<[email protected]> wrote:
>
> On Mar 4, 2011, at 3:15 AM, Xavier Ducrohet wrote:
>
>> ddmlib has opened that port locally. Are you trying to connect to localhost?
>>
>
> Yes, here is the log if I try with telnet
>
> $ telnet 127.0.0.1 8611
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> telnet: Unable to connect to remote host
>
> Probably I need to do some other initialization?
>
> Here is the code I used to get the port (all code snippets below are trimmed 
> a bit for presentation purposes):
>
>        AndroidDebugBridge.init(true);
>       AndroidDebugBridge bridge = 
> AndroidDebugBridge.createBridge("PATH_TO_adb", true);
>        AndroidDebugBridge.addClientChangeListener(new 
> AndroidDebugBridge.IClientChangeListener() {
>
>            public void clientChanged(Client client, int i) {
>                if (client != null && client.getClientData() != null && 
> "client.name".equals(client.getClientData().getClientDescription())) {
>                        // ... found port number and report it
>                       PropertyHelper ph = 
> PropertyHelper.getPropertyHelper(getProject());
>                       ph.setProperty("android.debug.port", 
> client.getDebuggerListenPort(), false);
>                }
>            }
>        });
>
>
> Now, here is the (ant)  code I used to launch the application:
>       <exec executable="${sdk.dir}/platform-tools/adb" failonerror="true">
>            <arg value="shell"/>
>            <arg value="am start -D -n client.name/.Activity"/>
>        </exec>
>
>
> and here is the code to launch the netbeans debugger:
>       <nbjpdaconnect host="127.0.0.1" name="display name" 
> address="${android.debug.port}" transport="dt_socket">
>            <classpath>
>                <path path="${debug.classpath}"/>
>            </classpath>
>        </nbjpdaconnect>
>
>
>
> The only target I used as a dependency is the target "install", from the 
> "vanilla" Android SDK ant build file.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to