[android-developers] Re: Service unable to call Java Class Methods

2010-06-22 Thread Bob Kerns
(Yes, I've read the rest of the conversation, but I'm returning to your original message). First, you debug a Service the same way you debug anything else. You set breakpoints in the appropriate lifecycle methods, or in routines called from those methods. If I recall correctly, this works even if

[android-developers] Re: Accessing Common methods among activities

2010-06-21 Thread Bob Kerns
Not only is it not an Activity, but an Application -- it may not even be YOUR Application in some cases. You should never use getApplicationContext(). Just use the current activity itself, or if you need YOUR application, call getApplication(). Accessing other activities is a mistake. It

[android-developers] Re: Dubious extra call to OnCreate on orientation change

2010-06-21 Thread Bob Kerns
I would claim it's a mistake for these to cause side effects. Create followed by destroy should merely be an expensive null operation. I don't know why it's happening for you; I agree it's strange. One thing that occurs to me -- does your activity allow the background to be seen? Perhaps the

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

2010-06-21 Thread Bob Kerns
a context that isn't tied to an activity life-cycle, which - as i am now learning - may be incorrect. On Jun 20, 9:06 pm, Bob Kerns r...@acm.org wrote: You should read the documentation for getApplicationContext(), and not simply believe what the name says. It does NOT, repeat, NOT, return

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

2010-06-20 Thread Bob Kerns
You should read the documentation for getApplicationContext(), and not simply believe what the name says. It does NOT, repeat, NOT, return your application. Well, it might, but it might not. Return the context of the single, global Application object of the current process. This generally should

[android-developers] Re: Location distanceBetween()

2010-06-14 Thread Bob Kerns
I don't know if I would term anything to do with spherical trig as easy, exactly, even with my background in math. On the other hand, it's simple to program, once you know the right theorems. This is well covered in any serious textbook on nautical navigation. On Jun 13, 10:00 pm, Frank Weiss

[android-developers] Re: Location distanceBetween()

2010-06-14 Thread Bob Kerns
API's as well ? Why even supply ANY API's at all then ? ;) On 14 jun, 08:40, Bob Kerns r...@acm.org wrote: I don't know if I would term anything to do with spherical trig as easy, exactly, even with my background in math. On the other hand, it's simple to program, once you know the right

[android-developers] Re: Howto design activity and Service writing to the same table?

2010-06-14 Thread Bob Kerns
Transactions. Handling this sort of concurrency is largely what databases are all about. Read any introduction to databases. Pay special attention to the so-called ACID properties -- Atomicity, Consistency, Isolation, and Durability. The basic idea is that you choose your transaction boundaries

[android-developers] Re: Bug in Android framework connecting to url?

2010-06-14 Thread Bob Kerns
That URL does not crash for me on my Nexus One with 2.1 Update 1. It also does not get a 403 -- I get a Diamond Grinding Grooving page that looks fine. Could the server be sending different results to different browsers, based on the User-Agent string or other parameters? This is often done

[android-developers] Re: Spinners showing text in white with white background!

2010-06-13 Thread Bob Kerns
If you do that, then users will complain that your spinners are different than every other app on their device. Once device manufacturers start pulling stuff like this, there's no hope for us poor developers. Or our users. On Jun 13, 8:58 pm, Kumar Bibek coomar@gmail.com wrote: A better

[android-developers] Re: java.lang.OutOfMemoryError

2010-06-10 Thread Bob Kerns
an OOM-error). On Jun 9, 9:35 pm, Bob Kerns r...@acm.org wrote: Carefully study the exception type hierarchy. Error and Exception are distinct (and deliberately so). You are not catching OutOfMemoryError. But catching an OutOfMemoryError and retrying is unlikely to succeed. The VM does GC

[android-developers] Re: Manulaly reset event on Android

2010-06-10 Thread Bob Kerns
This is trivial to do with Java. (I say trivial in the sense of how simple the technique is. Knowing how to properly use ANY thread synchronization, even trivial ones, is hard...). Here's a rough sketch. It's been a long time since I've used the windows Event object, and I'm just typing in the

[android-developers] Re: ListView

2010-06-10 Thread Bob Kerns
Prepare to be stunned, I think. I faced a similar issue with horizontal SeekBar's in a vertical scrolling list. I went through a number of iterations trying to get these to play nice. What finally worked, I think would work here, too: An onTouchEvent(MotionEvent) method that tracks how much it

[android-developers] Re: Manulaly reset event on Android

2010-06-10 Thread Bob Kerns
such fundamental as manually reset event. On Jun 10, 2:01 pm, Bob Kerns r...@acm.org wrote: This is trivial to do with Java. (I say trivial in the sense of how simple the technique is. Knowing how to properly use ANY thread synchronization, even trivial ones, is hard...). Here's a rough sketch

[android-developers] Re: prob in attaching txt file while email from internal package file storage

2010-06-09 Thread Bob Kerns
solution as I am unable to attach the file from internal directory. ag On Jun 9, 3:23 am, Bob Kerns r...@acm.org wrote: Please do not construct filenames and Uri's by pasting together strings. The correct way to write this is:                     Uri.fromFile(new File

[android-developers] Re: java.lang.OutOfMemoryError

2010-06-09 Thread Bob Kerns
Carefully study the exception type hierarchy. Error and Exception are distinct (and deliberately so). You are not catching OutOfMemoryError. But catching an OutOfMemoryError and retrying is unlikely to succeed. The VM does GC before throwing the error. It's not entirely pointless, however --

[android-developers] Re: prob in attaching txt file while email from internal package file storage

2010-06-08 Thread Bob Kerns
Please do not construct filenames and Uri's by pasting together strings. The correct way to write this is: Uri.fromFile(new File(Environment.getExternalStorageDirectory(), zibra.txt)) or to make it a bit more clear: File dirFile = Environment.getExternalStorageDirectory();

[android-developers] Re: Can't grok Activity life cycle.

2010-06-08 Thread Bob Kerns
The scarce resource here is memory, NOT time to save and load. If it is taking you too long to save, then you probably have too much memory in use for a good mobile application. If you are careful about how much memory you're using, treating memory as a cache, and writing out changed things as

[android-developers] Re: Failing JUnit tests, not breaking my Ant script like I expect?

2010-06-08 Thread Bob Kerns
If the output is XML, the xslt/ task should suffice. I haven't checked if the Ant folks did the right thing, but hitting an xsl:message element with terminate=yes should abort the build. If the output is text, there are various ways to search through that data, set some property, and as a result

[android-developers] Re: Calling wait in AsyncTask (e.g. inside doInBackground) raises IllegalMonitorStateException

2010-06-06 Thread Bob Kerns
While the others who responded gave you good advice, and also touched on what I'm about to tell you, I'd like to direct your attention to the documentation for the wait() call. The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another

[android-developers] Re: Setting theme in an activity

2010-06-06 Thread Bob Kerns
Try moving the setTheme(R.style.Theme_Blue) call to before the super.onCreate(savedInstanceState) call. On Jun 6, 1:55 am, Sudeep Jha sudeep.neti...@gmail.com wrote:  Hi All, This is my  themes.xml file resources style name=*Theme.Blue* parent=*android:Theme* item

[android-developers] Re: 最近写了两个应用, MMTimer,火车余票查询

2010-06-05 Thread Bob Kerns
can't work. so,Could you like help me ,thanks. 在 2010年6月5日 上午9:45,Bob Kerns r...@acm.org写道: It seems (using Google's translation service) that you say you have a problem, but do you have a question? This looks to me more like an ad On Jun 4, 2:33 am, igo where wuzeju...@gmail.com

[android-developers] Re: 最近写了两个应用, MMTimer,火车余票查询

2010-06-04 Thread Bob Kerns
It seems (using Google's translation service) that you say you have a problem, but do you have a question? This looks to me more like an ad On Jun 4, 2:33 am, igo where wuzeju...@gmail.com wrote: I train ticket query * *http://www.androidin.net/bbs/android-110739-1-1.html * MMTimer

[android-developers] Re: Android to PC communication trough USB

2010-06-01 Thread Bob Kerns
May I ask *why* you don't want to use HTTP? USB isn't really an option. The normal approach is to use the net. I understand completely that there can be disadvantages in different environments, however, very few of those disadvantages have any relationship to the HTTP protocol. My guess is that

[android-developers] Re: Cannot Write file into SDCard

2010-05-31 Thread Bob Kerns
Your description is a little unclear, but I think what you're seeing is that Android does not support simultaneous access between the PC and the SD card. Once you mount the SD card on the PC, it is not available on the device. To access it on the device again, you must first unmount it from the

[android-developers] Re: Same problem

2010-05-31 Thread Bob Kerns
Same problem as what? I suspect you believed you were replying in a way that people would know what same problem refers to. But no, this post just appears by itself, and everyone is puzzled about what you're talking about. Even if this were a reply to another post (which it isn't), people would

[android-developers] Re: Serious Problem with AudioRecord on NexusOne

2010-05-31 Thread Bob Kerns
Just a thought ... does it happen if you are holding a wake lock or partial wake lock? On May 31, 2:07 am, Hunter Peress hunt...@gmail.com wrote: FYI, the source code that I linked is a simpler version that is not service based. I was thinking the service was causing the bug, but it still

[android-developers] Re: CANNOT manage to get ADB working whatever I do.

2010-05-27 Thread Bob Kerns
So far as I can tell, from watching the message traffic going by, your only option is to upgrade to another OS, or downgrade to XP32. I've successfully used Vista 64 and Windows 7 64. I believe Linux would also be an option. You may be able to run a VMWare virtual machine and do it. I've

[android-developers] Re: APKTool - decoding our apps

2010-05-14 Thread Bob Kerns
This whole thread is making me see red, thanks to people spouting off without knowing what they're talking about. I guess it's just an emotional topic. I was going to make the same point as you about Reengineering itself is an illegal use. But since you beat me to it, I'll point out that there

[android-developers] Re: new interpreter for Android

2010-05-13 Thread Bob Kerns
I don't mean to be discouraging; in fact, I'd like to be encouraging of such efforts in general. But I'm not clear on what problem you are solving. Why scripting? Why a new language, as opposed to say using Javascript and adding Android facilities? A bit more explanation of your motivations and

[android-developers] Re: Google should prohibit task killers on Android Market

2010-05-07 Thread Bob Kerns
While I agree that consuming a bunch of memory has an impact -- it means apps have to be killed and restarted more often, for example -- there's no connection to GC. GC is something that happens entirely within your own process, and is not affected by memory usage by other processes. Allocating a

[android-developers] Re: Google should prohibit task killers on Android Market

2010-05-07 Thread Bob Kerns
The battery power frob is great! But I think it may already be good enough to serve for this purpose. The apps that are consuming the most battery power, and the apps that are consuming the most CPU, are typically the same set. I'm not arguing against your suggestion -- even if they were always

[android-developers] Re: Why isn’t multi-touch wor king for imagebuttons?

2010-05-07 Thread Bob Kerns
What about using a TouchDelegate to examine the touches first, and forward them as separate events? I haven't tried it, or even thought about it for more than two minutes, but... On May 4, 10:42 am, niko20 nikolatesl...@yahoo.com wrote: Hi, No, it's because the android team decided to

[android-developers] Re: Possible to call intent image gallery with scrolling to specific image?

2010-05-07 Thread Bob Kerns
Rather than replying in a random unrelated thread, and changing the subject, you should post a message in a new thread. The person you want to reach with the answer to your question may never read this thread! On May 5, 7:13 am, Timo Prill timo.pr...@googlemail.com wrote: hi, is it possible

[android-developers] Re: Best practices for creating multiple app versions from a single codebase?

2010-05-07 Thread Bob Kerns
I don't recommend doing production builds directly in your Eclipse environment. Export a copy, and modify that. In fact, I strongly urge checking out a pristine copy from revision control for real production builds. I derive my build numbers from the Eclipse revision I'm building. I inject that

[android-developers] Re: Struggling with Activity/View framework

2010-05-07 Thread Bob Kerns
The Activity may be killed, but the Application will not be. You can hold onto state there. However, it would be best to carefully study the lifecycle and look to minimize how much information you keep there, and ALLOW information to be discarded (or selected information to be kept) when the

[android-developers] Re: Scala, Android, Eclipse - not including Scala jar?

2010-05-06 Thread Bob Kerns
Glad you got it working! The lesson there is that if you use Proguard, and something odd goes wrong, always try disabling that first -- because the amount of time you can potentially waste is huge! Proguard works pretty well, and is pretty useful. But this, together with its learning curve and

[android-developers] Re: Scala, Android, Eclipse - not including Scala jar?

2010-05-01 Thread Bob Kerns
== Bob Kerns r...@acm.org writes: Bob I would guess in this case that Scala depends on parts of the Java Bob J2SE SDK which are not included in Android. I would be rather Bob surprised if you can get Scala to run on Android, in fact. If you Bob want to try anyway, I may be able to offer suggestions

[android-developers] Re: Android ANT compilation

2010-05-01 Thread Bob Kerns
and nothing to do with the project? Being an ex Emacs user that decided to just start using what everyone else uses, I am very open to Eclipse but it's been a hard one to swallow :)  Thanks for some good tips to make it more palatable Leigh On 5/1/2010 12:40 AM, Bob Kerns wrote: Sigh, Google

[android-developers] Re: Process Crash whilst using JUnit

2010-04-30 Thread Bob Kerns
A couple of thoughts. If it's not consistent when and where it crashes, you may have some type of memory corruption, possibly even a GC bug, though in my experience those are rare beasts. If you have JNI code, (and you do, even if it's not yours), it's more likely in there. Since you've been

[android-developers] Re: How to see all the applicat ions in the Google Market?

2010-04-30 Thread Bob Kerns
There's also http://www.appbrain.com You can link directly to your apps, e.g.: http://www.appbrain.com/app/com.sfsmart.volume.free On Apr 29, 2:07 am, tobias429 ecker...@gmx.de wrote: Try those web-sites:

[android-developers] Re: [OpenGL] change coodinate system

2010-04-30 Thread Bob Kerns
, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z, upVec.x, upVec.y, upVec.z); Enjoy your new left-handed coordinate system. On Apr 28, 7:39 pm, Bob Kerns r...@acm.org wrote: You mean, other than any affine transform that decomposes to include scaling of an odd number of axis

[android-developers] Re: Android ANT compilation

2010-04-30 Thread Bob Kerns
Start by reading the documentation here: http://developer.android.com/intl/de/guide/developing/other-ide.html There's no tool actually within Eclipse to do this, but you could define it as an external tool if you want. On Apr 28, 9:12 pm, veradis tech veradism...@gmail.com wrote: I am using

[android-developers] Re: Android ANT compilation

2010-04-30 Thread Bob Kerns
, 9:48 pm, veradis tech veradism...@gmail.com wrote: Thanks Bob Kerns. My aim is to make the code available for all. I will move the source to SVN, and anyone can download/update it and compile it using ANT. I don't want to use eclipse for this. Thanks Veradis On Sat, Apr 24, 2010 at 9:12

[android-developers] Re: Android ANT build

2010-04-30 Thread Bob Kerns
Already answered for you, in the thread you asked it earlier. Start by reading the documentation here: http://developer.android.com/intl/de/guide/developing/other-ide.html There's no tool actually within Eclipse to do this, but you could define it as an external tool if you want. Really, I

[android-developers] Re: Not calling OnStop when an incoming call is received

2010-04-30 Thread Bob Kerns
Just to emphasize Mark's point: Thousands of people have downloaded my app to *prevent* accidental changes to volume controls, primarily the ringer volume. And many thousands more have downloaded quite a number of other applications that also perform this function. Can you imagine the comment

[android-developers] Re: Android ANT compilation

2010-04-30 Thread Bob Kerns
to do production builds. On Apr 30, 6:56 am, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: What do you debug with?  I would love to leave Eclipse behind. Leigh On 4/30/2010 3:37 AM, Bob Kerns wrote: I didn't evenmention  Eclipse. Use the android tool to set up your ant project

[android-developers] Re: Not calling OnStop when an incoming call is received

2010-04-30 Thread Bob Kerns
(), which isn't even part of the SDK, was not an improvement! On Apr 30, 2:30 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Apr 30, 2010 at 8:46 AM, Bob Kerns r...@acm.org wrote: Just to emphasize Mark's point: Thousands of people have downloaded my app to *prevent* accidental changes

[android-developers] Re: Android ANT compilation

2010-04-30 Thread Bob Kerns
littered with god knows what from each plugin.   Does anyone know which file to check in? NetBeans has a couple of XML files in a directory. Leigh On 4/30/2010 4:09 PM, Bob Kerns wrote: I debug with Eclipse. You should be able to use any Java debugger, but there are none that come close

[android-developers] Re: Android Debugging Issues

2010-04-28 Thread Bob Kerns
BTW, when you edit in the text of a message you're replying to this way, the group software's link to email fails to include your response. I had to go to the web to retrieve it. Extracting out the relevant bit: * That the debugger supports breakpoints, and single stepping? - i added a ttoggle

[android-developers] Re: MultiPart Post File not working on Android 2.1 SDK

2010-04-28 Thread Bob Kerns
What do you mean by does not execute and stays stale? And how are you doing your upload? On Apr 27, 6:20 am, itsmohan itsmoha...@gmail.com wrote: Hi, I'm working on a sample application that does FileUpload using Multipart post, with Andorid 1.6 SDK the application works as expected but

[android-developers] Re: hello android app doesn't run properly

2010-04-28 Thread Bob Kerns
He probably just didn't wait for the Emulator to boot, but sat there puzzled for a few seconds, then killed it, and so the same thing happened the next time as well, etc. That happened to me the first time. On Apr 28, 7:44 am, TreKing treking...@gmail.com wrote: On Tue, Apr 27, 2010 at 12:39 PM,

[android-developers] Re: Issue with MediaPLayer

2010-04-28 Thread Bob Kerns
Setting the audio stream to be STREAM_RING makes no sense. Why would you want to use the volume control for the ringer for your media, rather than the one for the media??? That's just going to confuse your users big-time. Instead, you may want to do

[android-developers] Re: I cannot find a complete list of locales.

2010-04-28 Thread Bob Kerns
Those constants are there just as a convenience. You can create your own. I have no idea how Sun came up with that particular list of convenient locales. This is how Locale.JAPAN is defined. Just follow this pattern to define your own: public static final Locale JAPAN =

[android-developers] Re: The emulator running terrible slow in win2008r2 64bit with 4G RAM

2010-04-28 Thread Bob Kerns
Check the task manager, and see how much CPU your emulator is getting, and how much is being used overall. If the CPU is pegged, and it's the emulator, either something is going wrong in your Android environment on the emulator (maybe your app), or your CPU is running at slow speed for some

[android-developers] Re: Typing English Text Results in Chinese Characters

2010-04-28 Thread Bob Kerns
What you're seeing is called henkan, which I'd translate as conversion. It's the usual way to input Japanese, though there are many others. Back in the 1980's, I had a kanji tablet with over 1000 characters on my desk, to be located and selected one-by-one. Henkan is a better technique. Japanese

[android-developers] Re: Banned from android-developers

2010-04-28 Thread Bob Kerns
What exactly makes you think you're banned? You posted earlier today -- I replied to you. You posted now. It does not seem that you are banned! On Apr 28, 11:30 am, hunterp hunt...@gmail.com wrote: Hello, I consider myself to be an upstanding member of the android developer community. I

[android-developers] Re: WebView not loading properly in 2.1

2010-04-28 Thread Bob Kerns
I also tested it on my N1, with the same results -- nothing I would describe as not loading properly. I highly recommend Flurry. Not only do you get excellent reporting on errors, you can also get detailed reporting on the operation of your application, and user's paths through the application.

[android-developers] Re: Scala, Android, Eclipse - not including Scala jar?

2010-04-28 Thread Bob Kerns
NoClassDefFoundError does not mean what you think it means. It does NOT mean that the class was not found. It means that a class was found -- but could not be loaded without an error. It does not report what that error is, and the only sane way to find out is to use the debugger and catch all

[android-developers] Re: [OpenGL] change coodinate system

2010-04-28 Thread Bob Kerns
You mean, other than any affine transform that decomposes to include scaling of an odd number of axis by a negative value? Nope, other than that infinite number of ways, nope, no way. On Apr 27, 7:13 pm, Juan Aranda-Alvarez juan.arandaalva...@gmail.com wrote: OpenGL works in 3D space, so if you

[android-developers] Re: Getting entity/body from an http post request

2010-04-28 Thread Bob Kerns
The Content-Type for your POST is application/x-www-form-urlencoded. Instead of letting the servlet container parse it, you seem to be wanting to read it yourself. Don't do that. Let the servlet container take care of that. Use the POST method instead of get. Define doPost() instead of doGet().

[android-developers] Re: Android Debugging Issues

2010-04-27 Thread Bob Kerns
Um, by using the debugger, or if you don't want to do that, by looking at the logs? You appear to have gotten an application compiled and built, yet are unaware of the development environment. I can't quite figure how you got to this point in your exploration, so I'm not sure what help you need.

[android-developers] Re: Error When Using a Listener

2010-04-27 Thread Bob Kerns
Please see my questions to the developer in this thread: http://groups.google.com/group/android-developers/browse_frm/thread/2eaf7ad2c2578017 I have the same questions for you. How can you get an app built and onto the device (and then post here), and not be aware of the debugger? Obviously,

[android-developers] Re: Getting a Dev phone.

2010-04-25 Thread Bob Kerns
If you root your phone, you can still see the market. It's only if you replace it with some random build that doesn't include the market that you'd lose access to the market. While it's ideal to match the customer's phones, the differences in a rooted phone are so slight compared to the

[android-developers] Re: Will 900ms of calcs run faster in another thread?

2010-04-25 Thread Bob Kerns
It sounds to me like you're trying to do a Fourier Transform the hard way? You should look at the Fast Fourier Transform algorithm. I bet you're doing WAY more multiplies than you need to be doing. On Apr 22, 8:02 am, BobG bobgard...@aol.com wrote: Thanks for the replies folks. I saw the Real

[android-developers] Re: marketplace + chrome

2010-04-24 Thread Bob Kerns
I'm 90% sure it works for me. I took it as far as I could just now, without actually uploading. I don't think I've been forced to use a different browser in the past. But there's a chance I did so, because I have to log out of Google Groups to log into my market account because they're associated

[android-developers] Re: UnknownHostException

2010-04-24 Thread Bob Kerns
Things to look at: 1) What DNS servers are used by the phones, vs the PC's you're comparing with? 2) Do all the DNS servers on the list work equally well? 3) Is the wifi connection flaky? This will often show up as DNS failures, since DNS lookups are typically the first bit of network activity

[android-developers] Re: Android temporary file

2010-04-24 Thread Bob Kerns
Your exception handling is not well structured, and you don't close your output stream. I'd write it like this: try { FileOutputstream foStream = getBaseContext().openFileOutput(myfile.txt, 0); PrintStream pStream = new PrintStream(foStream); try { pStream.print(This content has been

[android-developers] Re: Android ANT compilation

2010-04-24 Thread Bob Kerns
Your build.xml doesn't look anything at all like what's generated by the 'android' tool. It looks like you've undergone a major manual effort, instead. Why not just use the android tool to set up your project? http://developer.android.com/intl/de/guide/developing/other-ide.html You can create a

[android-developers] Re: 14-year-old Android Developer:

2010-04-23 Thread Bob Kerns
My grades weren't great, though a little better than yours by the time I graduated -- but I did well on the SAT's. And I ended up going to MIT. So it can happen. But you will need to work on it -- you'll have to bring up your grades. But what you've already accomplished should be proof to

[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-23 Thread Bob Kerns
I think what you're seeing is a rocky roll-out of the new PHTP (PHone Transfer Protocol). Perhaps the longer transcontinental network latency was causing protocol timeouts? On Apr 23, 7:07 am, Kevin Gaudin kevin.gau...@gmail.com wrote: Having them SAY that they sent the devices doesn't mean

[android-developers] Re: Will 900ms of calcs run faster in another thread?

2010-04-22 Thread Bob Kerns
Well, I've got you both beat on the old-timer stuff. How about writing interrupt handlers to set bits to indicate which hammers should fire to print characters at the current position of the print drum of an IBM 1132 printer? In assembler, on punch cards. Yeah, I've done the C and VMS thing, too.

[android-developers] Re: Issues with character encoding please help?

2010-04-22 Thread Bob Kerns
No, it's just that I've already told everyone else on the planet (it seems) not to do this! I've been crusading on this for decades... :=) Do not ever use the String(byte[]) constructor. Do not ever pass up an opportunity to explicitly supply a character encoding. Always use UTF-8 when you have

[android-developers] Re: How to execute cd sdcard command

2010-04-22 Thread Bob Kerns
Mark points out all the reasons you shouldn't even be trying to do this. But there's more! I assume you're going to take Mark's advice anyway, but these are things that are likely to cause you trouble someday in the future, so I'll point them out anyway. First, you are trying to cd to some

[android-developers] Re: Weird: It appears as if sometimes my Activity will be resumed but previously set instance variables are null

2010-04-21 Thread Bob Kerns
Or use the debugger, and set breakpoints in each method on the affected class, and step through until you see where the field is being cleared. On Apr 20, 8:23 pm, Dianne Hackborn hack...@android.com wrote: Fwiw, there is definitely no clearing of instance variables when onNewIntent() is

[android-developers] Re: Beginner Question: Is it possible to put each class into it's own java file in Eclispe?

2010-04-21 Thread Bob Kerns
(This may or may not be more information than the OP needed. But there may be confusion there worth clarifying). Actually, Dianne, that's only true of top-level classes with the 'public' modifier. You can have top-level classes that are package- private in the same file -- but no more than one

[android-developers] Re: Android camera problem on HTC Desire

2010-04-21 Thread Bob Kerns
The camera preview API demo crashes on my N1 (2.1-Update 1) as well. I've been meaning to investigate (debugger, bugs database) but haven't gotten around to it yet. On Apr 21, 2:18 am, Jo Vermeulen jo.vermeu...@gmail.com wrote: Yeah, I also noticed that. No idea what the lines about a 'camera

[android-developers] Re: XMPP service, jabber , push notification

2010-04-21 Thread Bob Kerns
Um, why do you assume every Android user has a gmail account? On Apr 21, 1:17 am, SLY sly.andr...@gmail.com wrote: Hi, I am currently working on a project which requires a server to request data from the devices which are currently connected to the server. Meaning, first the server finds out

[android-developers] Re: how to use jmdns

2010-04-21 Thread Bob Kerns
Usually exceptions are your clue as to what went wrong. And debuggers are your best tool for understanding what triggered that exception, and where. Since you don't tell us the exception or where, I'm afraid you have all the information you'll need to figure this out -- and we do not. Good luck.

[android-developers] Re: Android on Symbian

2010-04-21 Thread Bob Kerns
Well, you may have found it annoying -- and I'll even allow that perhaps he intended it to be annoying. But it was also the best possible advice. You read information somewhere that is very specific. You are asking the question here -- a group dedicated to an entirely different topic. Asking

[android-developers] Re: Compile and port Android os in MS104-SH4AG board

2010-04-21 Thread Bob Kerns
Well, TARGET_ARCH=sh make doesn't look right! I'm not familiar with that processor, so I don't know what value you should use for TARGET_ARCH. Perhaps the clue is in this phrase: ルネサステクノ ロジ -- but I often find it harder to understand English as katakana than Japanese as kanji! What is ルネサス

[android-developers] Re: NJ Court finds Owner-Operator to be Employee for Worker's Compensation Purposes

2010-04-21 Thread Bob Kerns
In case anyone was wondering, this is quite as irrelevant as it seems. No need for others to click the link. On Apr 21, 10:20 am, mc730029 mc730...@gmail.com wrote: 39-2-7290 Chaverri v. Cace Trucking Incorporated, App. Div. (per curiam) (8 pp.) This appeal concerns whether an injury of

[android-developers] Re: Unit Testing : Who uses it ?

2010-04-21 Thread Bob Kerns
Well, except that you should apply your rule to unit tests, too. I'm not sure why you'd put in weeks of development on a quad tree, and not write tests for it. But if there's a question about whether you want to be spending weeks of development on a quadtree implementation, a simple

[android-developers] Re: Background processes not being CPU-limited?

2010-04-20 Thread Bob Kerns
Mike, I'm with Robert on this one. Not because you're wrong -- you're not. But because most users don't really want to think about this stuff. I think that if they were asked if they want to enter game mode -- a single choice -- and they can either accept or decline, then users will either

[android-developers] Re: signal 11 SIGSEGV during onResume or onCreate

2010-04-20 Thread Bob Kerns
One suggestion: sprinkle your code with lots of calls to System.gc(). This MAY (or may not) cause the problem to manifest closer to where the corruption occurs. On Apr 19, 6:56 pm, davidm davidbmoff...@gmail.com wrote: Hello, I have been trying to figure this problem out for a few days now.  A

[android-developers] Re: Weird: It appears as if sometimes my Activity will be resumed but previously set instance variables are null

2010-04-20 Thread Bob Kerns
I do this, without any issues at all. How are you getting your Application instance from your activities? not getApplicationContext() I hope... Have you examined the state from the debugger? There may be something you're missing about the state of things. On Apr 19, 11:41 pm, patbenatar

[android-developers] Re: Portrait/landscape question

2010-04-19 Thread Bob Kerns
If you'd like a quick tour of all the options for setRequestedOrientation(), my app, SmartVolume Free, does this, and lets you control what value to supply to setRequestedOrientation() in a preference setting. (The default is to not set it at all, and use the system's setting). Of course, it's

[android-developers] Re: Portrait/landscape question

2010-04-19 Thread Bob Kerns
we could check the display dimensions and set it to Portrait or Landscape on entry to the activity. I guess there's more than one place this decision could be made, with slightly different results, anyway. On Apr 18, 11:44 pm, Bob Kerns r...@acm.org wrote: If you'd like a quick tour of all

[android-developers] Re: requestLocationUpdates issue

2010-04-19 Thread Bob Kerns
of things. I found out a good way for starting/stopping a service here:http://www.brighthub.com/mobile/google-android/articles/34861.aspx What do you think of this one ? Cheers, Tejas On Apr 18, 7:03 pm, Bob Kerns r...@acm.org wrote: OK, I understand your thinking a bit better, so

[android-developers] Re: ArrayIndexOutOfBoundException while reading the file

2010-04-19 Thread Bob Kerns
I suspect you've been having some trouble reading the documentation in English. I've had the experience of reading API documentation in a foreign language, so I know it can be difficult. You probably only got a couple points wrong, but then the confusions piled on top of each other, and it will be

[android-developers] Re: requestLocationUpdates issue

2010-04-19 Thread Bob Kerns
FWIW -- I just did go look at the source for Timer, and cancel() does exactly what I expected. It synchronizes on its internal queue, sets a flag, clears the queue, and does queue.notify(). On Apr 19, 12:20 am, Bob Kerns r...@acm.org wrote: What he's doing there is specific to using a timer

[android-developers] Re: Can i get this layout with List view??

2010-04-19 Thread Bob Kerns
What's wrong? The last line! Please very read carefully the documentation for the ArrayAdapter constructor. You'll need to be sure to understand each word, as it's rather short on explanation. Given the multiple meanings for 'id', you'll see how you got confused! The documentation for the second

[android-developers] Re: Background processes not being CPU-limited?

2010-04-19 Thread Bob Kerns
Well, after looking at your code, my suggestion for advice would be: Do no evil! :=) When I implemented something like this on Symbolics Lisp Machines back in the 1980's, I made the scheduling boost for UI actions be for a limited period of time. Perhaps something like that is going on here? I

[android-developers] Re: requestLocationUpdates issue

2010-04-18 Thread Bob Kerns
Actually, just because something is a background service does NOT mean it is running in a different thread. Background services run in the main thread. I suspect that this point of confusion may be involved in your problem, though I don't quite spot the problem. Also, you have a handler there

[android-developers] Re: requestLocationUpdates issue

2010-04-18 Thread Bob Kerns
provide an example ? On Apr 18, 2:56 am, Bob Kerns r...@acm.org wrote: Actually, just because something is a background service does NOT mean it is running in a different thread. Background services run in the main thread. I suspect that this point of confusion may be involved in your

[android-developers] Re: Android Appending Values Received From Server

2010-04-18 Thread Bob Kerns
What exactly do you mean by second usage? Just pressing the home key and then tapping your program icon won't create a new activity instance, unless the old one has been deleted. You can't depend on it being deleted, in fact, you'd prefer it not be. Study the diagram in the Activity class

[android-developers] Re: Avoid restarting http request on orientation change

2010-04-17 Thread Bob Kerns
You are 100% on the right track; this calls for a service. As for what happens when your activity is no longer running -- well, let's consider that. First, if your activity is simply no longer the current activity -- the user may have pressed Home, for example -- he may switch back to it. You'd

[android-developers] Re: SlidingDrawer handle

2010-04-17 Thread Bob Kerns
It's a quick question you should be asking yourself. More useful than doing it for you, I'll tell you how. Go to your SDK. In the platforms directory, choose your platform version. Inside there is a data directory, and inside that is the system's res directory. Go into the drawables/ directory

[android-developers] Re: Is there a concept like DLL in Androids?

2010-04-17 Thread Bob Kerns
. But as I outlined above, it's an inadequate workaround. On Apr 17, 4:16 am, Mark Murphy mmur...@commonsware.com wrote: Bob Kerns wrote: If I have a service used by several applications, I currently have to supply it in every application, and arrange to negotiate just which one actually provides

[android-developers] Re: Avoid restarting http request on orientation change

2010-04-17 Thread Bob Kerns
cycle docs on the android dev docs. Enjoy :) On Apr 17, 3:45 am, patbenatar patbena...@gmail.com wrote: Awesome. Thanks Bob! This has been very informative. I will pursue this route :) On Apr 16, 11:47 pm, Bob Kerns r...@acm.org wrote: You are 100% on the right track; this calls

<    1   2   3   4   5   6   7   8   9   >