[android-developers] Re: WifiInfo. getLinkSpeed : uplink or downlink?

2010-08-10 Thread Bob Kerns
That's because wifi is symmetric. Same speed in both directions. It's likely in many cases that there's an asymmetric link in the route -- certainly HIGHLY likely that there will be something slower. Wifi is unlikely to be your slowest link, so I really don't see any value in checking this. Even

[android-developers] Re: Android Updater SDK (Manager) problem trought proxy

2010-08-10 Thread Bob Kerns
Websense is evil. I suggest getting a laptop, going down to the local coffee shop, updating the SDK, and then copying it to whatever system you want. I also suggest getting a job somewhere that doesn't use websense. Seriously. I would never take a job without a proper internet connection. I

[android-developers] Re: OpenSource REST Client for Android

2010-08-10 Thread Bob Kerns
I haven't written any code myself yet, though I've worked a bit with code written by others: http://restlet.org There's specifically an Android edition. I'm not sure what distinguishes the different editions. On Aug 10, 7:32 am, SAMPATH KUMAR sampat...@gmail.com wrote: Hi All, Is there any

[android-developers] Re: native UDP implementation for android

2010-08-10 Thread Bob Kerns
Typically, overflowing a buffer that's allocated on the stack. 2.1 may be better at detecting them than 1.5, or there could be other differences behind the difference in behavior. You might also get it by mis-declaring the number of arguments -- that is, the function takes N arguments but you

[android-developers] Re: Looper doubt

2010-08-10 Thread Bob Kerns
If you have to ask, you probably don't need it. It's used by other parts of the toolkit, such as the UI thread. That covers the vast majority of the times you'd want to use it. There are cases when doing your own threading when you need to know about its existence, but those are rare. Certainly,

[android-developers] Re: Do we need to call System.gc() ?

2010-08-10 Thread Bob Kerns
This has been discussed a fair bit in the past, if you want to try to look for more details, but the basic issue is that there's a cascade effect... (This was a couple releases ago; it's possible it has been improved since). You call System.gc(). Some finalizers run. This enables other stuff to

[android-developers] Re: Android Updater SDK (Manager) problem trought proxy

2010-08-10 Thread Bob Kerns
://...; to get an SDK update to work. Surely there is a process at your company for requesting websense exceptions for genuine work purposes. On Aug 10, 1:32 pm, Bob Kerns r...@acm.org wrote: Websense is evil. I suggest getting a laptop, going down to the local coffee shop, updating the SDK

[android-developers] Re: native c++ api

2010-08-09 Thread Bob Kerns
The UI framework is in Java. You can't bypass that. But once your UI framework calls out to C++, you can do everything that you can do. Given that the UI framework is in Java, I don't see that bypassing Java/JNI buys you anything. Just why do you think you want to eliminate JNI -- as opposed to

[android-developers] Re: Ant Build increment Version number

2010-08-09 Thread Bob Kerns
Better than using replaceregexp, I'd suggest the following XSLT script, using Ant's xslt task. (Mine is much more complex -- tweaks metadata, removes unneeded broadcast listeners in different versions, etc. Once you get this basic script in place, it's easy to add additional modifications). ?xml

[android-developers] Re: how can I check my app stopped by which home key or other apps

2010-08-09 Thread Bob Kerns
They are NOT two different situations. That's the source of your confusion. They are both a different app being in front of your activity. You mention the call screen and the launcher, but others are possible as well. Once your activity is no longer visible, onStop() is called. If it later

[android-developers] Re: how can I check my app stopped by which home key or other apps

2010-08-09 Thread Bob Kerns
9, 12:25 am, Bob Kerns r...@acm.org wrote: But what you COULD do is write your own launcher, if you really wanted to know if the home key was pressed for some reason. I'm not sure you could find out about it until later, though. Maybe. But what would you do with that information? You're being

[android-developers] Re: Compiling and obfuscating by command line...

2010-08-09 Thread Bob Kerns
perini.dav...@dpsoftware.org wrote: so no news about obfuscating with Proguard? On Aug 2, 11:53 am, Bob Kerns r...@acm.org wrote: Anyway -- it looks to me like your problems stem from not starting from a working ant build and then adding obfuscation. If you follow the documented

[android-developers] Re: getting exception when inserting events in android calendar.

2010-08-09 Thread Bob Kerns
And I'd like to fulfill his second one: what you're doing is asking for trouble. Sad, but true. One could also argue that releasing a calendar a supported API was asking for trouble. As for the nice error message -- you want to change one or the other - either set allDay to false, or set the all

[android-developers] Re: I want to know which app is run?

2010-08-09 Thread Bob Kerns
Also, it will greatly help both your communication and understanding, if you carefully learn and use the correct terms for things. For example, don't use the word app. It's not a technical term, and you could mean either the .apk or Application object. And don't use run. I have no idea what you

[android-developers] Re: Open source devs, read this... someone might try to make money with your project

2010-08-09 Thread Bob Kerns
As much as I hate the DCMA, and its abuses, this is not an abuse, but the sort of case it should be used for. (I'm not a fan of GPL, either, but I support your right to choose it and enforce it.) But one thing you can do -- is post a comment, and regularly modify it (even a trivial mod) to keep

[android-developers] Re: on sdcard, File.canRead() = true, File.canWrite() = false

2010-08-09 Thread Bob Kerns
Kostya and Mark answered your main question; I'll address your ps. Applications are indeed 'other' in the permissions you list below, but applications do have their own uids, so an Application's directory will be owned by its uid. An application with the right permission I'm guessing is put into

[android-developers] Re: AsyncTask and UI activity

2010-08-09 Thread Bob Kerns
I recommend you display a great big message saying do not disturb! while the restore occurs. You can't actually block the user, for example, from the home key, or the power key... So I'd suggest transactionalizing things as much as possible. Read a set of related files (e.g. for one app) all at

[android-developers] Re: ERROR IN C:\Users\lenovo\Desktop\android-sdk_r06-windows\android-sdk-windowsSDK Setup.exe

2010-08-09 Thread Bob Kerns
Has this (https) ever worked for anyone, ever? On Aug 9, 4:05 pm, Kwan Cheng yukwanch...@gmail.com wrote: I think you can fix it by turning force http its on the getting started page On Aug 9, 2010 4:46 PM, izzet.ulas izzet.u...@gmail.com wrote: I've been taking Failed to fetch URL

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-05 Thread Bob Kerns
:44, Bob Kerns r...@acm.org wrote: OK, this is good information. You are, in fact, running out of memory -- somehow. I've see this, but seldom as performance starts to suck for me long before. How exactly are you allocating memory for Java? How are you starting Eclipse? And when

[android-developers] Re: Parent activity runs onCreate before onActivityResult is called (sometimes)!

2010-08-05 Thread Bob Kerns
Activities can be destroyed to free memory. Check out the left side of the activity lifecycle diagram here: http://developer.android.com/intl/de/guide/topics/fundamentals.html#actlife On Aug 4, 10:50 pm, Pent tas...@dinglisch.net wrote: The order is: A: startActivityForResult( B ) B:

[android-developers] Re: Showing the writing keypad by default

2010-08-05 Thread Bob Kerns
guidance. Will definitely follow  the instructions. Best Regards Amit On Aug 2, 10:44 pm, Bob Kerns r...@acm.org wrote: 1) I don't think you REALLY want All to reply to you. :=) 2) I would like to encourage you to learn to use the search function on the SDK documentation site

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-04 Thread Bob Kerns
parameters into the JVM), but it was an artificial configuration. On Aug 3, 9:12 pm, Bob Kerns r...@acm.org wrote: Well, perhaps this illustrates your second point, but: http://tinyurl.com/sun-concurrent-gc Or it may be that they're not concurrent enough for you. Concurrency isn't

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-04 Thread Bob Kerns
There are other uses besides logging, or at least the kind of logging you're thinking of. For example, let's say you have a large complex server with large complex datastructures with long lifetimes, and a high server availability requirement. Let's say you experience a problem in production,

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-04 Thread Bob Kerns
On Aug 3, 10:46 pm, DanH danhi...@ieee.org wrote: Just a few bullet points: -- I've always thought that C #include processing sucked.  Why did they never introduce an #includeonce directive that would have eliminated all the #ifndef stuff to prevent double includes?? Even better, go one

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-04 Thread Bob Kerns
On Aug 4, 6:56 am, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: On 8/3/2010 11:23 PM, Bob Kerns wrote: You have a very limited view of the techniques available. For Java that could be true but my C/C++ fu is just fine thank you. I can't see that I said anything about your C/C++ fu

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-04 Thread Bob Kerns
Your initial googling has led you astray. Ignore any reference you find that is discussing stub classes in the context of remote objects; that is a specialized use of the term, and not relevant to your search. It's not a Java term, BTW. The technique can be used in any language with classes. I've

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Bob Kerns
OK, this is good information. You are, in fact, running out of memory -- somehow. I've see this, but seldom as performance starts to suck for me long before. How exactly are you allocating memory for Java? How are you starting Eclipse? And when you were checking how much memory Eclipse was

[android-developers] Re: Value passed from Javascript to Java through JavaScriptInterface not working

2010-08-04 Thread Bob Kerns
Because the browser's processing is asynchronous. You could stick in a big wait (like you do earlier), and hope it's enough, or check-wait-loop - but a better way is to trigger whatever processing you want to happen on that value, from inside your Value(String) method. Better and more relevant

[android-developers] Re: How to store questions for quiz type application

2010-08-03 Thread Bob Kerns
. On Aug 3, 1:48 pm, Bob Kerns r...@acm.org wrote: I agree. My experience with this sort of thing is that frequently, if you don't start out with a SQL database, you ultimately end up having to convert it later. So often it's better to start there. Here's why. Using a database scales

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
It's long been my opinion that the minimum development environment should be 8 GB, quad core. And, ideally, solid-state disks. Definitely *NOT* a 5200 RPM or slower hard drive! Ever! I run on a 4GB, dual core laptop, SATA 7200 RPM hard drive. But I've also run on 8 GB, quad core, and know what a

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
: On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list the faults of the C language, the preprocessor is very near the top. Just your opinion. That's why C++ went to great lengths to mostly remove the need for using it, with inline functions, constants

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
with Sun's GC scheme is the vast number of parameters -- no one understands them, or how to set them for a given set of circumstances (especially if those circumstances vary dynamically). On Aug 2, 9:57 pm, Bob Kerns r...@acm.org wrote: OT, but I'll bite. What do you consider a really

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
You have a very limited view of the techniques available. On Aug 3, 10:39 am, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list the faults of the C language, the preprocessor is very near the top. Just your opinion

[android-developers] Re: DDMS Allocations tracker not picking up activity when using a real phone

2010-08-03 Thread Bob Kerns
Also, you meant, unless it is rooted. Though I haven't reviewed your list in detail, many at least DO work on a rooted device. On Aug 3, 5:12 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Aug 3, 2010 at 7:58 PM, fadden fad...@android.com wrote: On Aug 3, 3:27 pm, Mark Murphy

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
You missed my point, so let me try to make it more clearly. I wasn't absolving the IDE of blame. I'm saying it interacts with the other offenders, if you have them. So if you have a bloated Firefox, for example, the IDE will start to flail much earlier. In that case, you can buy some time (but

[android-developers] Re: Launching Calendar in AgendaView

2010-08-03 Thread Bob Kerns
On Aug 2, 1:18 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Aug 2, 2010 at 3:21 PM, Bob Kerns r...@acm.org wrote: Unpublished, undocumented, unsupported intents are part of the sin. The more you nail down an API, the more expensive innovation becomes, because the legacy API

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
On Aug 2, 10:30 pm, Frank Weiss fewe...@gmail.com wrote: This thread is a little like schadenfreude to me. A lot of it is about taste - of which arguing about is of little use. I just saw some Java code where every closing brace is commented with // end of if, // end of for, // end of

[android-developers] Re: Launching Calendar in AgendaView

2010-08-03 Thread Bob Kerns
. On Aug 3, 2:23 am, Mark Murphy mmur...@commonsware.com wrote: On Tue, Aug 3, 2010 at 2:28 AM, Bob Kerns r...@acm.org wrote: How are device manufacturers increasing their costs by NOT DELETING the core Google app? Is it a matter of license fees to Google? Ah, I see where you're going. This rolls

[android-developers] Re: How to store questions for quiz type application

2010-08-03 Thread Bob Kerns
I agree. My experience with this sort of thing is that frequently, if you don't start out with a SQL database, you ultimately end up having to convert it later. So often it's better to start there. Here's why. Using a database scales better. If you end up with a large quiz, you'll have to load

[android-developers] Re: Data backup in android

2010-08-03 Thread Bob Kerns
1) No. 2) No. 3) Don't know. 4) Don't know. ...and I'm not yet convinced I care about backing up my data to Android's cloud. Happy? This is not a customer support forum. You do not get to demand responses. If you don't get a response, try the documentation, or google searches. (Of course, that's

[android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread Bob Kerns
Everything -- both the positions and the image widget size -- will be in pixel coordinates. Actually, you don't need to know that -- just that they're the same. Hell, I could even be wrong; I'm not going to take out a microscope and check. If you have different coordinates for your image data (or

[android-developers] Re: onCreate, onStop..... super.onCreate, super.onStop... called before code or after?

2010-08-03 Thread Bob Kerns
I have found that setting the theme needs to happen before the super.onCreate() call. Otherwise, I put it first -- there definitely many things that need to happen later. I've complained before that this isn't well-specified. It really, really should be. On Aug 3, 8:09 am, TreKing

[android-developers] Re: Launching Calendar in AgendaView

2010-08-02 Thread Bob Kerns
I quite agree, it IS a deep dirty hack. And I don't really disagree with your advice, but I have a slightly more nuanced view on deep dirty hacks. I view it as a trade-off -- one that has to be made very objectively and carefully. One must be very careful to exclude showcasing one's hax0r sk1llz

[android-developers] Re: Launching Calendar in AgendaView

2010-08-02 Thread Bob Kerns
I'd also like to make a completely separate point -- not addressed at { Devdroid }. I would argue that third-party vendors who replace one app with another that responds to the same intents WITHOUT DUPLICATING THE CONTRACT EXACTLY are committing a very grave sin, and should be reviled throughout

[android-developers] Re: Compiling and obfuscating by command line...

2010-08-02 Thread Bob Kerns
I disagree. It's off topic. Except for the point about it being harder to decompile Dalvik byte codes, but that's just a matter of some tool development work. And my experience (non-Dalvik, to be sure) is that Class loading time goes up, execution efficiency is reduced is incorrect, that the

[android-developers] Re: How to test OpenGL?

2010-08-02 Thread Bob Kerns
My thought was, why don't you show us exactly HOW you draw these lines? I do take note of your point about some of the lines having endpoints near the edge of the range. Edge cases are more likely to demonstrate bugs. So assuming you aren't doing something confused, you may have some good test

[android-developers] Re: Retrieving XML Document from web service

2010-08-02 Thread Bob Kerns
What Ed is telling you (and the other people trying to help) is that what you are seeing is NOT the format that the server is ending. In fact, it would be somewhat difficult for you to actually see that data in your program and also parse it. What you are seeing is the result of (implicitly)

[android-developers] Re: LVL - A Massive Concern

2010-08-02 Thread Bob Kerns
Or the developer could simply exclude non-market Chinese phones. But I do think that if a user has a Market phone, he's relatively unlikely to subsequently purchase a non-market phone. It can happen -- due to moving to a different country, for example -- but it's unlikely to be a willing choice.

[android-developers] Re: Showing the writing keypad by default

2010-08-02 Thread Bob Kerns
1) I don't think you REALLY want All to reply to you. :=) 2) I would like to encourage you to learn to use the search function on the SDK documentation site. This will be far more helpful to you for this sort of question than asking here. For one thing, you'll get much quicker answers. 3) For you

[android-developers] Re: LVL - A Massive Concern

2010-08-02 Thread Bob Kerns
Good point, but my opinion is that this problem is self-limiting. I don't expect the Archos to be successful without the Market. Even if most users do have access to the market through their phones. On Aug 2, 10:56 am, Mark Carter mjc1...@googlemail.com wrote: On 2 August 2010 19:36, Bob Kerns r

[android-developers] Re: How to test OpenGL?

2010-08-02 Thread Bob Kerns
Robert Green's reply gives some specific points I couldn't because I'm not really an OpenGL person myself, and definitely illustrates how rendering can vary. But while I certainly would NOT expect identical results from different rendering engines, it does sound to me like the differences you

[android-developers] Re: Launching Calendar in AgendaView

2010-08-02 Thread Bob Kerns
We're really not so far apart, though we don't completely agree, either. On Aug 2, 9:57 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, Aug 2, 2010 at 12:28 PM, Bob Kerns r...@acm.org wrote: If they violate the CDD, I agree. IMHO, there is a gray area between honoring the CDD

[android-developers] Re: LVL - A Massive Concern

2010-08-02 Thread Bob Kerns
I suspect the answer is no, but I think it's clearly a best practice. The only problem I see is that the market text size available (as of the last time I updated anyway) is so pathetic, it is really hard to communicate both what your app does, and details like this. But yeah, it's important to

[android-developers] Re: How to create new page / form

2010-08-02 Thread Bob Kerns
Also -- have you tried using the debugger to debug your problem? It doesn't sound like it. Had you done this basic step, I think: 1) You might have found the solution to your problem yourself 2) If not, you would be able to ask a much more specific question. On Aug 2, 11:50 am, TreKing

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
First of all -- if you want to list the faults of the C language, the preprocessor is very near the top. That's why C++ went to great lengths to mostly remove the need for using it, with inline functions, constants, and the like. It's too bad they didn't remove it. It causes all kinds of

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
I claim this is a good thing. You compile it once, you know it will compile and run everywhere. Introspection and/or moving code to platform-specific subclasses (and often into platform-specific jars compiled only on that platform) handle the undefined symbols problem quite nicely. They also

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
OT, but I'll bite. What do you consider a really good GC setup? Sun's GC is good enough that I would hesitate to make blanket statements that it is better than X or worse than X. (Though I will say that the newer Sun GC implementations are clearly better than the older ones). There are a lot of

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
Yes, I've seen a few cases like this. There are ways to cache the runtime call, which can be a bit expensive, but they rely a bit much on convention and are a bit more verbose than you'd like. On Aug 2, 7:02 pm, DanH danhi...@ieee.org wrote: Lots of times it would be nice for logging.  Sometimes

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
Note that you don't need a preprocessor to do this! Just a bit of language support. On Aug 2, 8:01 pm, Bob Kerns r...@acm.org wrote: Yes, I've seen a few cases like this. There are ways to cache the runtime call, which can be a bit expensive, but they rely a bit much on convention

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-02 Thread Bob Kerns
I don't normally do this but +1 On Aug 2, 12:46 pm, DanH danhi...@ieee.org wrote: Preprocessing for j2me is supported by SUN via NetBeans.  It's pretty clear that SUN fully backs preprocessing for j2me if you look at all the support provided. If it were really supported and fully

[android-developers] Re: Missing network functionality?

2010-08-02 Thread Bob Kerns
I've often wondered whether there were some reasons behind this, like pressure from some carriers. On the other hand, the iPhone allows this. I wish it were smart enough to figure out which network actually connects to the Internet, though. I just spent some time in the hospital, where the Cisco

[android-developers] Re: Extending multiple classes

2010-08-01 Thread Bob Kerns
VVMClientApplication is the class where I need to access the VVMService class instance. You don't say why. Are we to assume that VMClientApplication is a subclass of Application? Apparently not: dont I have to extend Application in any class ? So why did you call it VMClientApplication? Are

[android-developers] Re: What is a WeakReference?

2010-07-27 Thread Bob Kerns
. On Jul 26, 3:49 pm, Bob Kerns r...@acm.org wrote: Um, no. For Qt to do what you claim, it would have to traverse all the application data -- including data owned by non-Qt code -- to discover what application objects are still in use. In other words, it would have to implement a GC

[android-developers] Re: What is a WeakReference?

2010-07-27 Thread Bob Kerns
as you view it as the language in question. (It's perfectly reasonable to view it as a sub-language embedded within a host language). On Jul 27, 2:29 am, Bob Kerns r...@acm.org wrote: Not even remotely similar. Note carefully your phrase increments a reference count in the addressed object

[android-developers] Re: Suggestions on howto start service without rebooting device

2010-07-26 Thread Bob Kerns
Well, OtherApp can't directly start the MapApp service, but it can wake up MyApp, which can then start it itself. In most cases, the ideal approach would be for OtherApp to start an activity in MyApp, which can then provide the user-interface to inform the user about what they've just installed,

[android-developers] Re: What is a WeakReference?

2010-07-26 Thread Bob Kerns
Um, slightly too strong a statement. As soon as it's not used outside the cache, it's ELIGIBLE for garbage collection, which is likely to happen soon. There are times this is appropriate for a cache. If the objects you're likely to look up again, are also likely to still be live, but expensive

[android-developers] Re: What is a WeakReference?

2010-07-26 Thread Bob Kerns
Actually, I would disagree with this characterization. In many cases, it's completely infeasible to maintain the information you'd need. For example, if you provide an API that accepts objects, and you maintain some internal information about them -- you have no opportunity to track the client's

[android-developers] Re: What is a WeakReference?

2010-07-26 Thread Bob Kerns
Um, no. For Qt to do what you claim, it would have to traverse all the application data -- including data owned by non-Qt code -- to discover what application objects are still in use. In other words, it would have to implement a GC. Unless your definition of almost exactly the same stuff is a

[android-developers] Re: Electro Magnetic Radiation Sensor with Android

2010-07-25 Thread Bob Kerns
Your problem statement is too vague to be useful. I don't mean so much useful to us, as useful to you. You really need to be a great deal more specific about what you want to sense. The term electromagnetic radiation covers a range from signals with wavelengths many orders of magnitude larger

[android-developers] Re: Encrypt with Android using AES, decrypt with PHP...

2010-07-20 Thread Bob Kerns
Ah, you mean special as in an additional step, rather than special case. Sorry -- yes, in that sense. And, of course, with PHP hardwired to do null padding, the other end must conform. On Jul 19, 9:26 am, Raymond C. Rodgers raym...@badlucksoft.com wrote: Well, I'm not talking security wise,

[android-developers] Re: Encrypt with Android using AES, decrypt with PHP...

2010-07-20 Thread Bob Kerns
A good rule to follow is that you should never, ever, call the getBytes() method, nor any method or constructor in the SDK that has a variant that takes a character encoding. I've fixed an incredible number of bugs from this cause. You almost always want to supply UTF-8 as that encoding, too. On

[android-developers] Re: Avoid non-static inner classes in an activity?

2010-07-20 Thread Bob Kerns
Sorry for the delay in responding -- I haven't been able to keep up with the volume lately -- and I'm amazed at how well you do. On Jul 6, 12:47 pm, Dianne Hackborn hack...@android.com wrote: On Mon, Jul 5, 2010 at 11:56 PM, Bob Kerns r...@acm.org wrote: Actually, they CAN return different

[android-developers] Re: Encrypt with Android using AES, decrypt with PHP...

2010-07-19 Thread Bob Kerns
That's not something special. That's actually what the algorithms are specified to require, and the APIs reflect that. They're not even Android-specific APIs, they're Java APIs, and the algorithms are standards and not tied to language or platform. Ideally, you'd pad with random bytes, instead of

[android-developers] Re: dialog won't show on call

2010-07-18 Thread Bob Kerns
Your analysis is correct, up to the point where you say so it can perhaps start a separate thread, where you get it exactly backwards. It could start a new thread right then and there. Instead, you should say so it can handle it IN THE SAME THREAD. The thread involved is called the UI thread.

[android-developers] Re: object graphs

2010-07-16 Thread Bob Kerns
Why? Cyclic references aren't bad. They are only a problem for languages which use reference counting rather than garbage collection. If you're trying to avoid wasting memory, what you want to look for are objects which are referenced when they're no longer needed. MAT can help you with that,

[android-developers] Re: Market reporting wrong app size

2010-07-16 Thread Bob Kerns
If you have copy protection turned on, your app actually DOES take 2x the .apk size when installed. This is just one of many drawbacks to the copy protection feature. On Jul 16, 7:27 am, H9kDroid htc@gmail.com wrote: On Jul 8, 4:47 am, Stephen Lebed srle...@gmail.com wrote: I've just

[android-developers] Re: Crash with Android Market

2010-07-12 Thread Bob Kerns
If that doesn't work, replacing your phone will probably fix it. :=) Seriously, I've seen this happen. I did restart my phone along the way. And it did eventually start working. I'm not sure the two events were connected, or if it were some external problem. On Jul 12, 12:39 pm, TreKing

[android-developers] Re: Avoid non-static inner classes in an activity?

2010-07-06 Thread Bob Kerns
Actually, they CAN return different Application objects, and are actually documented to do so, if you read it carefully. I don't think it's exactly a bug that they do -- but I do think the platform would be improved by removing getApplicationContext() from the public API somehow. Perhaps by

[android-developers] Re: Resource Alias not resolving

2010-07-04 Thread Bob Kerns
Dianne, I really don't feel that Android's solution here is as complete and universal and helpful as you appear to describe. (I carefully say appear to describe, because I think a good part of the issue is that it is HARD to describe). The assumption you are making appears to be that UI should

[android-developers] Re: Get all text (including encoded) from XML Text Node

2010-07-03 Thread Bob Kerns
I'm a little puzzled by this behavior. This is supposed to be controlled by this: http://developer.android.com/intl/de/reference/javax/xml/parsers/DocumentBuilderFactory.html#setExpandEntityReferences(boolean) which is supposed to default to true. On Jul 2, 8:06 pm, Julius Spencer

[android-developers] Re: TCP IP connection via Mobile Network

2010-07-02 Thread Bob Kerns
Not necessarily. If you need what amounts logically to a reliable connection, simulating it yourself with UDP may not help your scalability, unless you're bpassing a flawed kernel implementation. I can think of a few high traffic sites that use TCP connections exclusively, scaled up beyond your

[android-developers] Re: Bump is letting users send paid apps?

2010-07-02 Thread Bob Kerns
be very expensive to switch, but someday...) On Jun 30, 9:33 pm, Bob Kerns r...@acm.org wrote: Congratulations on a very cute and clever idea. I really hope it catches on -- and that it makes you a lot of money! I can't quite see myself using it until I get Android phones for the family, but I

[android-developers] Re: CallLog.Calls DATE returning negative

2010-07-02 Thread Bob Kerns
Check the documentation, or the calendar. It's not an int, it's a long. On Jul 2, 6:41 am, Zookie i...@zachidev.com wrote: I'm pulling the call log and trying to convert the date of the call to something we can read but the int being returned is a negative number. int dateColumn =

[android-developers] Re: is there an easier way?

2010-07-02 Thread Bob Kerns
Send me your coding sheets, and I'll have them keypunched for you and ship the cards back to you the next day. (And that, my friends, was the state of the art when I began programming). Seriously, you can use whatever tools you want to create the files, and then build them using the ant scripts

[android-developers] Re: Why does not this sleep work?

2010-07-02 Thread Bob Kerns
First, don't rush to learn about threads and threading. There's a lot to learn, it's subtle, mistakes are easy to make but hard to detect and analyze. That's why so many frameworks, including Android, go out of their way to make directly working with threads unnecessary for most people and

[android-developers] Re: problemen met google account

2010-07-02 Thread Bob Kerns
May I suggest that customer support for the phone might be a better place to direct this question? I'm not sure whether your problem is with the unlock code or with your google account information. You don't really give enough information, and I don't think that is a translation issue. I suggest

[android-developers] Re: Loading from a compiled xml file

2010-07-01 Thread Bob Kerns
user Inputs from this dynamically created widgets? Thanks in advance. Regards Abhishek On Jul 1, 9:51 am, Bob Kerns r...@acm.org wrote: Don't put it in the xml/ directory. That does indeed get compiled into a binary format, and you'd need to use the corresponding API for reading

[android-developers] Re: Loading from a compiled xml file

2010-07-01 Thread Bob Kerns
No idea off the top of my head, other than that something you think is true probably isn't. Not exactly a helpful observation... But why not try HTML/ instead of HTML/HTML, and verify that you're getting that. They're equivalent, but going to even simpler XML may lead you to discover the problem

[android-developers] Re: Loading from a compiled xml file

2010-07-01 Thread Bob Kerns
That's a good thing to do, but he'll have to rewrite his code. It would be wise to test that his existing code is working as a baseline, and check it in to revision control, and write a few unit tests, before doing that. Unless his code is trivial, of course. Or his head gets too bloody from

[android-developers] Re: which Java libraries are not included in Android?

2010-07-01 Thread Bob Kerns
Actually, I would argue that your answer is simple, correct, and THE answer to his question, which is likewise simple! If it's not documented as part of the API docs, then it is not part of the MOST of the functionality... referred to in that statement. If it's not documented there, then it's

[android-developers] Re: Bump is letting users send paid apps?

2010-06-30 Thread Bob Kerns
I would be extremely surprised if they do anything other than send the market URL. To do otherwise would be more work, and a worse user experience. My own app, in an upcoming version, will send a link to itself. It was trivial to implement, and I think it's a great marketing tool. I think we'd

[android-developers] Re: Can I start a new activity that’s not specified in the AndroidManifst.xml file?

2010-06-30 Thread Bob Kerns
If you're doing what I think you're doing -- do not use a new class for each activity. Instead, use a single wrapper class, that instantiates and invokes your dynamic class. Pass the name of the class to load and run as an extra value in your intent -- or possibly include it in the getData()

[android-developers] Re: Froyo still breaks compatibility

2010-06-30 Thread Bob Kerns
Yes, Open Source != Open Process. Moving to an open process wouldn't mean that Google would have to give up control; they'd just have to make their incomplete work more visible, and deal somehow with the extra comments and such that result. But it could mean a lot more and better and earlier

[android-developers] Re: Bump is letting users send paid apps?

2010-06-30 Thread Bob Kerns
Congratulations on a very cute and clever idea. I really hope it catches on -- and that it makes you a lot of money! I can't quite see myself using it until I get Android phones for the family, but I think it will be wildly successful among teens! And we all benefit as a result. On Jun 30, 10:50 

[android-developers] Re: Error in an XML file eclipse

2010-06-30 Thread Bob Kerns
There are several possible editors to use to edit these files. I'd suggest trying a different one. First, close the editor that's giving you problems. Right click on the file in the Project Explorer, and choose Open With... Try Android Resource Editor first, as that's probably the one you

[android-developers] Re: java.lang.NullPointerException when trying to edit strings.xml

2010-06-30 Thread Bob Kerns
There may not be; he may have the wrong editor. Even if he has the right editor, a workaround may be to use a different one. See my reply here for more detailed suggestions. http://groups.google.com/group/android-developers/browse_frm/thread/c8be17f1927932f0 On Jun 30, 6:31 pm, Frank Weiss

[android-developers] Re: Loading from a compiled xml file

2010-06-30 Thread Bob Kerns
Don't put it in the xml/ directory. That does indeed get compiled into a binary format, and you'd need to use the corresponding API for reading it. (Or you could recode to use that API, and gain efficiency and space -- but first, you'd like to test the code you've already written, right?) So put

[android-developers] Re: Secure an TCP-Connection

2010-06-30 Thread Bob Kerns
Both the Java and Bouncy Castle act as providers to the standard API. I think really, your question is, how do you create a BKS keystore? Answer: 1) If you don't already have them, extract the certificates and keys you want from your JKS keystore using keytool. 2) Put them into a BKS keystore --

[android-developers] Re: Generate key events on foreground application

2010-06-30 Thread Bob Kerns
You can't, and you shouldn't. This would be a serious security hole. What you can and should do, is let the user send the text to the application of his choice. For example, wrap an ACTION_SEND intent in a chooser, and run that activity, and the user will be prompted with a choice of email, SMS,

[android-developers] Re: is this a bug in android OS

2010-06-26 Thread Bob Kerns
If you are in onCreate(), then you HAVE NOT BOUND THE SERVICE. The call to bindService() just *starts* the process of creating and binding the service. It does not complete until after you return from onCreate(), at which point the service will be actually created, it's onCreate() and onStart()

<    1   2   3   4   5   6   7   8   9   >