[android-developers] Re: Multiple development environments on a single machine: Problem changing default 8700 port in ADT/DDMS

2010-02-23 Thread Pawel Kapala
Have anyone experienced similar problem?

On Feb 3, 9:15 am, Pawel Kapala  wrote:
> Hello!
>
> I am trying to set up multiple Android development environments on
> single Linux Debian machine. Everything works fine for one user. But
> whenever second user on the same machine tries to launch Eclipse (with
> ADT) there is an error displayed, that 8700 port is being used.
> Therefore, the second user is unable to debug. I have researched this
> issue myself and tried following solutions, but I am yet unsuccessful:
> 1) I have changed the DDMS port in Eclipse, for the second user to
> 8740 (Window -> Preferences -> Android -> DDMS -> Base local debugger
> port). No use: Eclipse still opens 8700 port for listening (showed by
> netstat and strace).
> 2) I have run the DDMS before running Eclipse, changed the port in it
> to be 8740 (File -> Preferences -> Debugger -> Port of selected VM).
> Not handy to have DDMS running outside Eclipse, Eclipse still opens
> 8700 port for listening.
> 3) Tried looking in the source code of ADT, found the reference where
> the 8700 port is passed and opened, it looks ok though and leaves me
> without a clue.
> 4) I have found several similar threads, but none of them helped my
> case (piled below for reference):
>    
> 4.1)http://groups.google.com/group/android-developers/browse_thread/threa...
>    
> 4.2)http://groups.google.com/group/android-developers/browse_thread/threa...
>    
> 4.3)http://groups.google.com/group/android-developers/browse_thread/threa...
>
> What am I missing? Could anyone give me a pointer?
>
> Using:
> Eclipse 3.5.1
> ADT 0.95
> Debian Lenny
>
> Thanks,
>
> --PawelKapala
> Tieto Corporationwww.tieto.com

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


[android-developers] Multiple development environments on a single machine: Problem changing default 8700 port in ADT/DDMS

2010-02-03 Thread Pawel Kapala
Hello!

I am trying to set up multiple Android development environments on
single Linux Debian machine. Everything works fine for one user. But
whenever second user on the same machine tries to launch Eclipse (with
ADT) there is an error displayed, that 8700 port is being used.
Therefore, the second user is unable to debug. I have researched this
issue myself and tried following solutions, but I am yet unsuccessful:
1) I have changed the DDMS port in Eclipse, for the second user to
8740 (Window -> Preferences -> Android -> DDMS -> Base local debugger
port). No use: Eclipse still opens 8700 port for listening (showed by
netstat and strace).
2) I have run the DDMS before running Eclipse, changed the port in it
to be 8740 (File -> Preferences -> Debugger -> Port of selected VM).
Not handy to have DDMS running outside Eclipse, Eclipse still opens
8700 port for listening.
3) Tried looking in the source code of ADT, found the reference where
the 8700 port is passed and opened, it looks ok though and leaves me
without a clue.
4) I have found several similar threads, but none of them helped my
case (piled below for reference):
   4.1) 
http://groups.google.com/group/android-developers/browse_thread/thread/4d64e407b1cece52/953fc4fe9a25afdc
   4.2) 
http://groups.google.com/group/android-developers/browse_thread/thread/c20d204a48ba9e74/89595408bda14702
   4.3) 
http://groups.google.com/group/android-developers/browse_thread/thread/85ca7f2498e8f89c/e3fd0790c84fa414

What am I missing? Could anyone give me a pointer?

Using:
Eclipse 3.5.1
ADT 0.95
Debian Lenny


Thanks,

--
Pawel Kapala
Tieto Corporation
www.tieto.com

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


[android-developers] Re: Using Bouncycastle in Android

2010-01-07 Thread Pawel Kapala
I've sucessfully written an application using Bouncy Castle (AES256 +
SHA1).
AFAIK the Bouncy Castle provider is the default Android provider.
So you can use it without importing any external libraries.

Try initializing Cipher object with as described here:

http://developer.android.com/reference/javax/crypto/Cipher.html

On Jan 6, 5:17 pm, Arnnei  wrote:
> Hi,
>
> I'm converting a J2ME application to Android using Eclipse + SDK.
>
> The J2ME is using Bouncycastle SHA1.
> I understand that Android now includes Bouncycastle ?
>
> How do I use the Bouncycastle functions.
> What do I have to Import or how do I add the BC libraries to the
> Eclipse.
>
> Thanks
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ServiceConnectionLeaked warning

2010-01-05 Thread Pawel Kapala
Hello!

It seems you're leaking the service connection in some way.
Try doing some logging after you bind and before you unbind to the
service, to see if you have unbound where needed (i.e.
Activity.onDestroy). I guess, in your case, when you restart the
activity 1, without previous unbind, the service connection is leaked.
Do you call unbind in onDestroy method in your activities?

Also try isolating the code, maybe you'll find the solution this way.
Maybe, this also could be helpful in your case:
http://groups.google.com/group/android-developers/browse_thread/thread/b8a7fbd42df6c421/7b76aa66363abd22?hl=en&lnk=gst&q=+ServiceConnectionLeaked+warning+#7b76aa66363abd22

--
Best regards,
Pawel

On Jan 5, 2:11 am, Mike Collins  wrote:
> I'm getting aServiceConnectionLeakedmessage that I don't understand.
>
> There are 3 activities and a remote service, all the activities use
> the same
> remote service.  The main window, activity 1, starts up, auto-starts
> the
> service and binds to it.  The user then starts activity 2 to do
> something.
> The user now wants activity 3, so the code in activity 2 puts some
> data in
> an intent and starts activity 1 via startActivity ().  When activity 1
> is started,
> it reads the data in the intent and starts activity 3.
>
> This all works as expected except that while activity 3 is starting I
> get theServiceConnectionLeakedwarning.  This is odd because the code that
> unbinds from the service has never been called and the service
> connection
> continues to operate just fine.  If the user backs out of the main
> window
> the service is unbound and everything shuts down correctly.
>
> Because the UI design doesn't want activity 2 to stack on top of 3, or
> 3 on top of 2 I use a FLAG_ACTIVITY_CLEAR_TOP flag when starting
> activity 1.  (I tested with this flag removed and the leakwarning
> goes away but
> I wind up with extra activities/windows in the stack).
>
> To make it even a bit weirder, if I run through the same scenario
> again,
> e.g. close activity 3 to get back to activity 1, open 2, switch to 3
> there is no
> leakage the second and successive times, only the first time (near as
> I
> can tell).
>
> any hints, thoughts?
>
> tia,
>   mike
>
> I could pare it all down to an example if that is required/helpful.

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


[android-developers] [Donut-1.6] Two onCreate (and onDestroy) invocations on orientation chage

2010-01-04 Thread Pawel Kapala
Hello.

With following simple code (on clean, new android project):

public class RotationTest extends Activity {

private static final String LOGTAG = "RotationTest";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d(LOGTAG, "onCreate():");
}

@Override
protected void onDestroy() {
super.onDestroy();
Log.d(LOGTAG, "onDestroy():");
}
}

the onCreate/onDestroy pair is called twice when rotating from
landscape -> portrait on Android 1.6 emulator.

Here is the snippet of LogCat (doing rotation to landscape and back to
portrait):
01-04 14:05:35.895: DEBUG/RotationTest(704): onCreate():
01-04 14:13:53.514: DEBUG/RotationTest(704): onDestroy():
01-04 14:13:53.916: DEBUG/RotationTest(704): onCreate():
01-04 14:14:02.035: DEBUG/RotationTest(704): onDestroy():
01-04 14:14:02.604: DEBUG/RotationTest(704): onCreate():
01-04 14:14:02.716: DEBUG/RotationTest(704): onDestroy():
01-04 14:14:03.015: DEBUG/RotationTest(704): onCreate():

On the other hand, when running the application on the G1 phone, the
problem does not occur, when the keyboard is slid (then the rotation
changes).

I've tried to find an open issue or a similar thread but I am yet
unsuccessful.

Could anyone give a pointer or a description of this behavior?

Has anyone experienced it on Eclair or later(!) ?

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


[android-developers] Re: Need help in compiling android source on ubuntu 9.10

2009-12-23 Thread Pawel Kapala
I don't have a clue for you really. You may want to install brand new
system (on a virtual machine or sth, and try to repeat the steps) to
eliminate that your system is misconfigured, or sth else affects your
build. As the matter of fact, I'll have a try and download master
branch and try to compile, and will paste the results here for
reference, in case there is a bug, but not earlier than next month :)

Happy holiday!

--
Best regards,
Pawel

On 23 Gru, 07:02, n179911  wrote:
> I am building on 32 bit system.
>
> I have install all the dependencies but i still get the same error.
>
> 2009/12/20 Paweł Kapała 
>
> > Hi!
>
> > I successfully built android on Ubuntu 9.10 (a week ago or so). Did
> > you take steps as described herehttp://source.android.com/download?
>
> > Also, are you using 32-bit, or 64-bit system?
>
> > I'm not a platform developer, but it looks like something in your
> > system is missing or you have something misconfigured.
>
> > I tried to google-up your error, and it looks like you have some c/c++
> > libraries missing.
>
> > Just a wildshot, try installing:
> > sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf
> > libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
> > libncurses5-dev zlib1g-dev
>
> > --
> > Best regards,
> > Pawel
>
> > On Dec 21, 6:04 am, n179911  wrote:
> > > Hi,
>
> > > i am trying to compile android (download the source of the master
> > > trunk) on ubuntu 9.10.
>
> > > I am getting the following linker error. Can anyone please tell me how
> > > to fix it?
>
> > > Thank you.
>
> > > host Executable: acc (out/host/linux-x86/obj/EXECUTABLES/
> > > acc_intermediates/acc)
> > > /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/
> > > accRuntimeTest_intermediates/runtimeTest.o: in function symbolLookup
> > > (void*, char const*):system/core/libacc/tests/runtimeTest.cpp:66:
> > > error: undefined reference to 'dlsym'
> > > collect2: ld returned 1 exit status
> > > make: *** [out/host/linux-x86/obj/EXECUTABLES/
> > > accRuntimeTest_intermediates/accRuntimeTest] Error 1
> > > make: *** Waiting for unfinished jobs
> > > /usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/acc_intermediates/
> > > main.o: in function symbolLookup(void*, char const*):system/core/
> > > libacc/tests/main.cpp:41: error: undefined reference to 'dlsym'
> > > collect2: ld returned 1 exit status
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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