[android-developers] Re: getting rid of “warning: unmappable character for encoding ascii”

2010-04-17 Thread Bob Kerns
, Lo'oris loo...@gmail.com wrote: On Apr 15, 11:42 pm, Bob Kerns r...@acm.org wrote: I'm afraid that nobody is going to help you, because you don't give enough context to indicate just what tool is giving this message. I don't understand, I told I got this message compiling with ant (ant

[android-developers] Re: Why am i getting same values of different JSON date values?

2010-04-16 Thread Bob Kerns
I am confused. JSON does not have a date format. And you do not show any JSON code! Just what is your question? On Apr 16, 5:26 am, Maxood maqs...@salsoft.net wrote: I do not know the reason why am i getting same values of different JSON date values. Here is my code for parsing date values in

[android-developers] Re: Spinner getting selected string

2010-04-16 Thread Bob Kerns
You have a few options. You can ask the view for the position of the selected item (getSelectedItemPosition()), or the ID you associated with that item (getSelectedItemId()), or register listener with setOnItemSelectedListener(). You can get the associated item with getSelectedItem(). You can get

[android-developers] Re: Android animation not firing immediately

2010-04-16 Thread Bob Kerns
There's nothing to fix; that is what is supposed to happen. Even if it WERE called immediately -- you'd not see any updates to the view until onTouchEvent() exits. You'll need to allow the rest of the system to run between steps of your animation. I'm not sure what to suggest for your tile

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

2010-04-16 Thread Bob Kerns
I understand, and completely concur with, this decision. However, this leaves a major unfilled hole, that is limiting how developers can cooperate. Basically -- an application cannot depend on a service, provider, or other component that it needs being present, unless it provides it itself.

[android-developers] Re: Generating a static HashMap from resources?

2010-04-15 Thread Bob Kerns
Not quite the only way, actually. But it does depend on loading the class that defines the fields AFTER you get your hands on the context. What you can do is to save that context in a static (non-final) field, in a different class. Then, in the class with your fields, you include a static

[android-developers] Re: DrawableBitmap, Canvas and OR

2010-04-15 Thread Bob Kerns
information in e.g. the blue channel and you'll see what I want to do. On 12 Apr, 21:38, Bob Kerns r...@acm.org wrote: And just what useful visual result do you want to happen as a result? OR makes sense for black and white, not forcolor. Or are you using the graphics processor for something

[android-developers] Re: getting rid of “warning: unmappable character for encoding ascii”

2010-04-15 Thread Bob Kerns
I'm afraid that nobody is going to help you, because you don't give enough context to indicate just what tool is giving this message. You should be working entirely in UTF-8, never ASCII. So you need to figure out what tool is working in ASCII, and make it use UTF-8. But first you have to which

[android-developers] Re: Android time synchronization?

2010-04-15 Thread Bob Kerns
I'd bet that 100 microseconds exceeds the resolution of the Android scheduler. If you actually need that much synchronization of action, I think you're out of luck. If you just need that small a skew between timestamp sources, I'm not sure. I'm have no experience with IEEE-1588. However,

[android-developers] Re: SQLite DB, Cursors, CursorIndexOutOfBoundsException problems!! Help!

2010-04-15 Thread Bob Kerns
It looks to me like you're making the classic beginner mistake -- one that even bites experienced database programmers if we're at all inattentive... Cursors start out positioned *before* the first row. You have to actually position them to the first row before you try to access data.

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
I believe your problem is that you don't declare the permissions with the permission/ tag in the Application1 manifest. To verify this, I created two apps, with your manifests. I changed the package name from 'com.android' to 'com.example', because you shouldn't be using com.android, but

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
Of course, you should use something other than @string/hello as the descriptions! It insists on a resource, and I just grabbed those. On Apr 14, 12:53 am, Bob Kerns r...@acm.org wrote: I believe your problem is that you don't declare the permissions with the permission/ tag in the Application1

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
You get your ClientProviderClient like this: Uri uri = Uri.parse(content://com.sabretch.colorEyeD/ yourtable); ContentProviderClient cpc = getContentResolver().acquireContentProviderClient(uri); (This only uses the authority part of the Uri --

[android-developers] Re: Best Practice question: Passing an array to a View

2010-04-14 Thread Bob Kerns
I can't quite see how you're doing MVC here. I see a view, and I see a Game class which looks a bit like it might be a model? Where's the controller? Generally, in MVC, the view registers its interest in the state of the model via the Observer pattern. Thus, the model has no knowledge of the

[android-developers] Re: Installation script

2010-04-14 Thread Bob Kerns
You can't run your own code during installation. You'll need to do this on first run. The best place to do this is in the onCreate() method of your application class. You can record that you've initialized in a SharedPreference, or you can check the filesystem, to see if it's in the desired

[android-developers] Re: Hashtable Serialization (Server/Client App)

2010-04-14 Thread Bob Kerns
I don't have a solution, but I have a couple of recommendations -- either of which would avoid the problem. #1 - don't use object serialization. Convert to an XML or JSON representation instead. XML in particular would be preferred if you're going to store these for an extended time. #2 -- don't

[android-developers] Re: Repeating AsyncTasks t

2010-04-14 Thread Bob Kerns
I think you must be misreading the documentation. If so, let's see if this makes it more clear: Variables are not objects. Variables refer to objects. So when the documentation says you can't reuse an async task, it means you can only run that OBJECT once. But if you create a NEW instance (as

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
, Randika On Apr 14, 1:09 pm, Bob Kerns r...@acm.org wrote: You get your ClientProviderClient like this:                 Uri uri = Uri.parse(content://com.sabretch.colorEyeD/ yourtable);                 ContentProviderClient cpc = getContentResolver().acquireContentProviderClient(uri

[android-developers] Re: Eclipse + ADT + ant +make: Complex project structure

2010-04-14 Thread Bob Kerns
This is rather complex, so it's going to be a bit tricky to answer, I'm afraid. It does sound like you've dealt with a lot of the harder issues. I'm not sure exactly what you mean when you say flavor you want to build. Build as in -- produce a .apk, or do you mean Eclipse build, putting the

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
(cur.moveToNext());         }     } can u give me any suggestion Regards, saikiran On Apr 14, 12:53 pm, Bob Kerns r...@acm.org wrote: I believe your problem is that you don't declare the permissions with the permission/ tag in the Application1 manifest. To verify this, I created two apps

[android-developers] Re: Database insertion timings

2010-04-13 Thread Bob Kerns
It is often better to insert all the data and THEN create the indexes. I couldn't tell you about Sqlite. You may want to create the primary index, but create all the other indexes later. On Apr 12, 5:33 pm, Zsolt Vasvari zvasv...@gmail.com wrote: No, database writing is extremely slow

[android-developers] Re: To save resources, should services use the android:process attribute?

2010-04-13 Thread Bob Kerns
There are a few exceptions. First, let's distinguish between a service which continuously runs, vs one for which there is a continuing need. You NEVER want a service to be continually running, or even frequently running. You'd even strongly prefer to not have it maintain a process. My own app

[android-developers] Re: Service.startForeground() messes with scheduling?

2010-04-13 Thread Bob Kerns
My impression, not well investigated, is that your service is NOT likely to be killed while it is actually running on the main thread doing processing. I'm guessing you're doing this on a separate thread? Your process may be killed, but is less likely to be killed, if you start the service, and

[android-developers] Re: Progress Bar in every row of ListView

2010-04-13 Thread Bob Kerns
I had various issues with progress bars -- sliders in my case -- and even replaced ListView with my own implementation. But I have a guess what my problem was, and of my own making. Just for illustration purposes, here's my code replacing ListView: ViewGroup sliders =

[android-developers] Re: Steps to transfer a simple object from server to android using XML

2010-04-13 Thread Bob Kerns
[Message delayed due to technical difficulties..] raqz and I have been discussing this off-list, so just to sync things up a bit... Raqz asked me about JSON -- possibly in response to your suggestion. It's a good suggestion to consider. I tend to suggest XML by default, because it's more

[android-developers] Re: How to make service run indefinitely even after activity that started the service exited with API call system.exit(0);

2010-04-13 Thread Bob Kerns
Well, it would sure help if you didn't assassinate the process the service is running in! You do not want to call System.exit(). Now, one thing to realize about Android is that processes are killed when not needed -- or sometimes even when needed -- and then restarted later, re-creating the

[android-developers] Re: DrawableBitmap, Canvas and OR

2010-04-12 Thread Bob Kerns
And just what useful visual result do you want to happen as a result? OR makes sense for black and white, not for color. Or are you using the graphics processor for something other than actual graphics? On Apr 12, 3:30 am, Kaj Bjurman kaj.bjur...@gmail.com wrote: Hi, Is it in some way

[android-developers] Re: how to track all http/https requests

2010-04-12 Thread Bob Kerns
HTTPS will not, under any circumstance, let you get access to header or content information from other applications. This would be a security violation of the highest order! Like steal all your money security violation. Like steal your identity security violation. You can use various protocol

[android-developers] Re: How to parse JSON in Java?

2010-04-12 Thread Bob Kerns
Actually, Android omits a LOT of the standard J2SE JDK -- though nothing that would impact a JSON parser. But the usual JSON parser is built into Android. Just do new org.json.JSONObject(json string) On Apr 12, 2:33 am, vworld4u vworl...@gmail.com wrote: You can use JSON Parser readily

[android-developers] Re: Steps to transfer a simple object from server to android using XML

2010-04-12 Thread Bob Kerns
You can also use XmlSerializer to serialize a DOM, together with about a page of code to walk the DOM. That's a whole lot more painful than it ought to be, but it's better than writing XML tags yourself, which if you find yourself doing, you're doing something wrong. On Apr 12, 5:57 am, Mark

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-11 Thread Bob Kerns
No, we're not arguing semantics, we're agreeing. We were both responding to Miguel. (You did leave out being blocked in an IO call, but that's a minor detail). On Apr 10, 6:56 pm, Robert Green rbgrn@gmail.com wrote: Bob, Perhaps we're just arguing semantics.  I was simply saying that you

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-11 Thread Bob Kerns
to sleep to maintain a constant rate, and is quite efficient. I've achieved a smooth display, and the physics progresses a step at each game loop iteration. This has worked well for me. On Sat, Apr 10, 2010 at 12:57 PM, Bob Kerns r...@acm.org wrote: If a thread is hogging the CPU

[android-developers] Re: Service vs Singleton

2010-04-11 Thread Bob Kerns
intervals). On Apr 10, 7:25 pm, Jason LeBlanc jasonalebl...@gmail.com wrote: Since process != application.. just what are the distinctions? On Fri, Apr 9, 2010 at 5:06 PM, Bob Kerns r...@acm.org wrote: Just to point out a couple more things here. 1) a Service's lifetime is NOT, in general

[android-developers] Re: Generating a static HashMap from resources?

2010-04-11 Thread Bob Kerns
Just what are you trying to achieve? If you're actually wanting a hash map, efficiently populated on class loading, then Streets of Boston's approach won't help you -- nor will aapt. To do what you actually ask for, you could write an XSLT script to generate the necessary java code. One of the

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-10 Thread Bob Kerns
If a thread is hogging the CPU, it is *BY DEFINITION* not idle. And vice versa. An idle thread will be waiting on something. Either a synchronization lock, or an object using wait(), or some blocking IO call. This may be buried inside some other code, of course. I would suggest wondering why you

[android-developers] Re: Sending/Receiving Lists anroid - webserver

2010-04-10 Thread Bob Kerns
You may want to pause at this point, and consider whether this is REALLY what you want to do. There are major limitations involved with using object serialization this way, that affect you both now and in the future, and you have to think VERY carefully about the implications of both. The object

[android-developers] Re: How do I get the MD5 fingerprint of my application certificate through code?

2010-04-10 Thread Bob Kerns
. That definitely looks like the certificate to me, not that I'm a certificate expert. I'm still wondering how the maps API does it.  If it's something that they're keeping secret, fair enough I guess, would've been nice.  But still an interesting problem. On Apr 6, 12:10 am, Bob Kerns r...@acm.org

[android-developers] Re: Best practise for storing app. Configuration

2010-04-10 Thread Bob Kerns
every time. On Apr 10, 5:56 am, Bob Kerns r...@acm.org wrote: Your abuse of global variables (i.e. with the static keyword) is giving you memory leaks. On Apr 9, 9:58 am, Gubatron gubat...@gmail.com wrote: Here's a static wrapper I implemented to get and set properties real

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-09 Thread Bob Kerns
I'm not wrong. But it seems you aren't wrong either! I was consulting the source. It's definitely a CheckedTextView. I just confirmed it with the Hierarchy Viewer; there's no discrepancy. But I definitely see the radio button icon. Here's what's going on: The layout: CheckedTextView

[android-developers] Re: multi-touch not working !!

2010-04-09 Thread Bob Kerns
How do you know you lifted them in the same order you put them down? Give your description, I'd expect to see both orders. There are known limitations of the multitouch implementation on all the Android phones out there now. But this doesn't seem to me to be one. Try carefully putting one finger

[android-developers] Re: applying themes to views

2010-04-09 Thread Bob Kerns
Just to clarify/avoid a possible misunderstanding If you are using a WebView to do your album, rather than building it out of Android's widgets (as Nick suggests), then you CAN, of course, use CSS. The Android UI toolkit supports styles and themes, which act somewhat like CSS, but with a

[android-developers] Re: Do Services *really* run in the Background?

2010-04-09 Thread Bob Kerns
I hope you realize that the service won't actually start until *after* the method on the main thread that started it exits. This is true even if you start up another thread to start the service. Starting the service -- even an IntentService -- requires that the main thread be free. (It's somewhat

[android-developers] Re: how to get device's movement speed?

2010-04-09 Thread Bob Kerns
Gravity gives you one frame of reference -- and the compass gives you another. If you're just spinning, this is enough to give you 3D orientation. However, it is trickier if you are also accelerating. Let's say you accelerate horizontally at 1G. To the sensors, that will look the same as

[android-developers] Re: Accelerometer - direction of shake?

2010-04-09 Thread Bob Kerns
The Nyquist theorem states that you need to sample at least 2x the frequency you are sampling to be able to capture it. However, you'll also get various spurious beat signals which can be large compared to the actual signal if you try to push too close to that 2x. That is, if you sample 1 Hz

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-09 Thread Bob Kerns
But he says he's using a content URI? As in going through a content provider? I think we need more information. BTW, it *is* possible to read another app's DB directly, if you sign both with the same cert and give them the same userid. But that's probably not what he wants to do here... On Apr

[android-developers] Re: Best practise for storing app. Configuration

2010-04-09 Thread Bob Kerns
Your abuse of global variables (i.e. with the static keyword) is giving you memory leaks. On Apr 9, 9:58 am, Gubatron gubat...@gmail.com wrote: Here's a static wrapper I implemented to get and set properties real easy package gubatron.android.util; import java.util.Arrays; import

[android-developers] Re: Service vs Singleton

2010-04-09 Thread Bob Kerns
Just to point out a couple more things here. 1) a Service's lifetime is NOT, in general, the same as an Application's lifetime. A service can be deleted when it's not in active use by any activity or intent. This can save memory. 2) Under some circumstances, more than one application may be

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Bob Kerns
Then I think this simplifies the advice we should give you. If you don't know enough about threading to know what a lock is, you should avoid threading for now. It'll be too much to learn at once, and you won't be able to do a good job of either learning about threading, or applying it. I think

[android-developers] Re: dex.jar not loaded from SDK folder

2010-04-09 Thread Bob Kerns
Try: 1) Refreshing the project, and rebuilding. 2) Cleaning the project, and rebuilding. 3) closing and reopening the project, and rebuilding 4) deleting the project (but not deleting the files -- that's a checkbox on the project deletion confirmation dialog), and re- importing it as an

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Bob Kerns
Think of it this way -- there is no such thing as pass-by-value in Java, and no such thing as references, either. Everything is equivalent to a pointer, except there is NO pointer arithmetic, and no - operator, that role being handled by '.', so it LOOKS like a reference with C++ eyes. To add to

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-08 Thread Bob Kerns
heard of the single choice layout that displays a radio button on every list item.  But my guess is that most people who have done any work with ListViews are at least aware of this very basic and useful feature. On Apr 7, 11:35 am, Bob Kerns r...@acm.org wrote: Perhaps -- but since I don't

[android-developers] Re: any lawyer types out there that can get this site down?

2010-04-08 Thread Bob Kerns
It looks to me like they may be doing this to the apps they offer on their site. It might even be with permission -- though if the OP was complaining of their doing it to one of his apps, I guess not. HOWEVER -- as a developer, I can find no way to list my paid app on their site. This makes me

[android-developers] Re: Keeping service alive across configuration changes

2010-04-08 Thread Bob Kerns
Another approach, which may have benefits beyond the configuration change issue, is to make your service only tear down the expensive resource after a delay. Then, if you reconnect before that timeout, you can simply reuse the resource. So if you exit and come back soon into your app, for example,

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Bob Kerns
I'm a bit puzzled why the other respondents didn't pick up this, maybe I missed something in the discussion? But anyway, the basic flaw in your strategy is reading it all into memory at once. There's no need to do so, and that is ALWAYS going to impose a limit on the size of file you can handle,

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-08 Thread Bob Kerns
Apology definitely accepted. Just to illustrate the difficulty -- and why I don't fault you for failing to be clear: None off my car radios EVER had lights that lit up for the buttons. They had buttons that would stay depressed. To set a station, you'd tune to the station, and then PULL OUT the

[android-developers] Re: any lawyer types out there that can get this site down?

2010-04-08 Thread Bob Kerns
any action. I guess this is the flipside of playing on an open platform.. focus on building a better product and worry less about the bottom-feeders. -g On Apr 8, 8:43 am, Michael MacDonald googlec...@antlersoft.com wrote: On 04/08/10 08:23, Bob Kerns wrote: HOWEVER -- as a developer, I

[android-developers] Re: any lawyer types out there that can get this site down?

2010-04-08 Thread Bob Kerns
my lawyer personally contact you. As this is a violation of more than one law, regardless of my past, this is wrong. It was sold to a guy out of Sweden. What he did or does with it is out of my control. Please remove my contact info. On Apr 8, 8:07 pm, Bob Kerns r...@acm.org wrote: Well

[android-developers] Re: any lawyer types out there that can get this site down?

2010-04-08 Thread Bob Kerns
. Don' post info if it is outdated, just by looking at it you can ell. Check whois.net and you can see it was updated daily and is not associated with me. On Apr 8, 9:47 pm, Bob Kerns r...@acm.org wrote: The public record claims you are. If you are not, then you have a problem

[android-developers] Re: handling rotation...

2010-04-07 Thread Bob Kerns
This doesn't save you from ANY of the complexities of the activity lifecycles. It only removes SOME of the reasons you'll transition through them. You should still code for the lifecycle. It makes your job harder, because not only to you get to debug your current problem -- you lose an easy way

[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread Bob Kerns
I've been meaning to ask about this... When I try to run procrank on my device, a Nexus One, I get an error that libpagemap.so is not found (and indeed, it's nowhere on my device). Is this not present by default in non-debug builds? Is there some way I could obtain it? While I'm at it, when the

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-07 Thread Bob Kerns
Perhaps -- but since I don't really understand the question, perhaps question quality had something to do with it? The radio button. What radio button? What's a a simple_list_item_single_choice layout? These things probably seem obvious to you, but they're not to me. So I can only guess at the

[android-developers] Re: Can anyone give me a Socket Client and Server source code?

2010-04-07 Thread Bob Kerns
I would guess that you failed to supply two arguments to Log.d(tag, message), or that you aren't looking for the message using logcat, but expecting it to show up somewhere else. Otherwise, your question is too unclear to answer. You CAN use sockets to communicate with your computer. That, or any

[android-developers] Re: Send email in background

2010-04-06 Thread Bob Kerns
Actually, you CAN send email silently. You can send email from any device capable of an outbound TCP connection on the SMTP port. You can even send it as coming from the user's account. Or, you can pretend to be Obama, or your favorite rock star. You just can't get the built-in email application

[android-developers] Re: Maintaining a free and paid version maybe other version

2010-04-06 Thread Bob Kerns
Just a few comments, from someone who's been releasing software for nearly 30 years. I don't recommend releasing software from an IDE, because you don't have enough control over IDE settings and behavior. That setting you tweak today for this or that test, may make it into the product as a

[android-developers] Re: Listadapter issue

2010-04-06 Thread Bob Kerns
ArrayList would be a better choice; Vector has extraneous method synchronization. But either one suffers from the problem that you'll need to store Integer objects rather than int values, which will cause GC. That should not be a problem here, I just point it out as a difference from using an

[android-developers] Re: Service Object Availability between Activities

2010-04-06 Thread Bob Kerns
at 8:08 PM, Bob Kerns r...@acm.org wrote: It looks like you are trying to access the connection before the onBind() method is called? You should NOT be sleeping the thread. You should be returning, and then picking up your work once onBind() is called. You're actually blocking the service

[android-developers] Re: Reusable Android library packaging: interest?

2010-04-05 Thread Bob Kerns
I've been holding off on replying to this only because I haven't fully collected my thoughts. I hope to write up my recommendations for build approaches, especially for free/paid apps, before really wrapping my mind around it. But since that's taking me a while, I thought I should chime in, yes,

[android-developers] Re: how to DEBUG build an APK?

2010-04-05 Thread Bob Kerns
TreKing -- He doesn't understand what a debug build is. The flag indicates that the DEVICE, not your APPLICATION is a debug build. HeHe -- That's why you can't get at it with Config.DEBUG -- you'd need to reflash your device. You don't make this in Eclipse -- or at least not using the SDK. What

[android-developers] Re: How do I get the MD5 fingerprint of my application certificate through code?

2010-04-05 Thread Bob Kerns
Well, first, there's likely to be no MD5 hash involved at all. DSA with SHA-1 would be the default signature type now, I believe. Hashcode would not be secure. That is, you can construct an alternate app+signature that would produce the same hash code. That may be good enough for you, but I would

[android-developers] Re: Cannot cast from Bitmap to byte[]

2010-04-05 Thread Bob Kerns
Actually, the explanation here is incorrect. You CAN cast from Integer to int, or Double to double, or Boolean to boolean. In fact, the compiler will even do it for you these days. However, those are specific cases of related types. There is no relationship whatsoever between the types Bitmap

[android-developers] Re: Reusable Android library packaging: interest?

2010-04-05 Thread Bob Kerns
I didn't suggest writing any Java code. I didn't suggest writing any ant tasks in Java. I said to create an antlib (though I should have said library of ant definitions to be used with include/), which is entirely in XML. That's part of why I suggested this approach, as it would avoid the need

[android-developers] Re: how to DEBUG build an APK?

2010-04-05 Thread Bob Kerns
Your application is ALWAYS going to see Config.DEBUG as FALSE. You seem stuck on that. Config.DEBUG has nothing to do with your application whatsoever. It has to do with your device. I need to get breakfast, I'm getting grumpy. In addition to the link I sent you, look at this link (which is

[android-developers] Re: Force Close

2010-04-05 Thread Bob Kerns
The println in question is inside Log.d, which you are calling incorrectly. The first argument is an identifier tag; the second should be your message string. I don't really recommend catching exceptions this way, and only printing the message. Especially since the message can be null -- at least

[android-developers] Re: how to DEBUG build an APK?

2010-04-05 Thread Bob Kerns
to achieve the purpose and i also have to look outside of Eclipse IDE and my code to find my machine gun. please forget my problem and have a nice breakfast :) thanks anyway for your comments. On Apr 5, 9:49 am, Bob Kerns r...@acm.org wrote: Your application is ALWAYS going to see Config.DEBUG

[android-developers] Re: para de mandar essas mensagens pro mau hotmail

2010-04-05 Thread Bob Kerns
I'm afraid you'll have to remove yourself from the list; we can't do it for you. Go to the group website and unsubscribe yourself there. http://groups.google.com/group/android-developers/subscribe On Apr 5, 6:56 am, Shirley Mara www.shirley75@gmail.com wrote: não quero receber mais essas

[android-developers] Re: How do I get the MD5 fingerprint of my application certificate through code?

2010-04-05 Thread Bob Kerns
are pretty deep. Let's just say it's never been made practical and robust. On Apr 5, 11:20 am, ko5tik kpriblo...@yahoo.com wrote: On Apr 5, 6:09 pm, Bob Kerns r...@acm.org wrote: Hashcode would not be secure. That is, you can construct an alternate app+signature that would produce the same hash code

[android-developers] Re: Service Object Availability between Activities

2010-04-05 Thread Bob Kerns
It looks like you are trying to access the connection before the onBind() method is called? You should NOT be sleeping the thread. You should be returning, and then picking up your work once onBind() is called. You're actually blocking the service from running until you do return, since it needs

[android-developers] Re: Can´t set the emulator´s dns servers on windows

2010-04-05 Thread Bob Kerns
You don't generally have to use your ISP's DNS servers, you can use any DNS servers you want. I use OpenDNS myself, and ignore Comcast's. However, occasionally some firewall or other security software will block DNS to other servers. So this is worth a try. On Apr 5, 4:03 pm, Brion Emde

[android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread Bob Kerns
In addition to this fine reason, using the provided symbol will allow the compiler to catch any typos, while simultaneously making it clear that you are using a standard value, and allowing you to see the documentation for that value with the mouse. It's a big win all around. On Apr 4, 5:09 am,

[android-developers] Re: Fastest and most reliable Location provider

2010-04-04 Thread Bob Kerns
I should have said to opt for the simplest thing that actually works! Or, to put it another way, as simple as possible, but no simpler. (Neither phrase is mine, but I can't recall the correct attributions.) For the fastest result, I'd start off with both listeners. The network will nearly always

[android-developers] Re: intensive writing to internal memory

2010-04-04 Thread Bob Kerns
If Jason's suggestion of pushing it to a server is inadequate, you can buffer events, and only write them out once a minute or 10 minutes or something. This will put an upper bound on the number of writes performed. You can combine the approaches, and push to the server, and only write to the

[android-developers] Re: How to send AT command in android?

2010-04-03 Thread Bob Kerns
You know, I've always considered these responses to cross-posting to a relevant forum or two to be rude. And I've been doing this longer than there's been anything called Usenet or groups or forums, so this isn't some newbie comment. Traditionally, a cross-post to a small number (2, perhaps 3) of

[android-developers] Re: conditional compilation

2010-04-03 Thread Bob Kerns
... I'm quite suspicious thinking both My projects AND microsoft + google + linux developers all get it so wrong... Emmanuelhttp://androidblogger.blogspot.com/http://www.alocaly.com/ On Apr 1, 6:28 pm, Bob Kerns r...@acm.org wrote: My first response was to say OF COURSE YOU CAN

[android-developers] Re: conditional compilation

2010-04-03 Thread Bob Kerns
:27 pm, Bob Kerns r...@acm.org wrote: I'm a bit puzzled at your response, as you seem to be addressing C/C++ rather than Java? I've probably contributed to the confusion by talking a little bit about C++ vs C.  Perhaps you intend your response to just refer to some aspect of those remarks

[android-developers] Re: I have problem in package resolution

2010-04-03 Thread Bob Kerns
That's not the problem, he's reporting a compiler error. (He may yet have that problem downstream of this one). Darshan, what you've written is not valid Java syntax. You mean one of these two constructors ComponentName(string, string) or ComponentName(context, class). What you've supplied as

[android-developers] Re: Fastest and most reliable Location provider

2010-04-03 Thread Bob Kerns
I don't think you're saving anything significant. It takes only a tiny bit of energy -- VERY tiny -- to register a listener. The things that will make a difference are keeping the various components awake and powered up. For example, keeping the processor awake and running, or keeping the GPS

[android-developers] Re: advice + onclick help

2010-04-03 Thread Bob Kerns
Often you won't. Then someday you will, and won't know what happened to you! Sometimes, the context you need has to be the current activity -- and it won't be. And even worse -- sometimes the context won't even be for your current application -- but rather, the first application that started in

[android-developers] Re: intensive writing to internal memory

2010-04-03 Thread Bob Kerns
I've wondered about this, and don't have any definitive answer to this. However, there are several factors involved. Flash memory involves rewriting entire chunks of data, often larger than a single block, when a single block is written. This can affect how often a given location is written.

[android-developers] Re: How to block incoming call in Android?

2010-04-02 Thread Bob Kerns
On Mon, Mar 22, 2010 at 8:44 PM, Bob Kerns r...@acm.org wrote: What does it mean to block an incoming call? My guess is it just not ring. In that case, it may simply mute the ringer, and register a PhoneStateListener with the TelephonyManager. If it likes the number in onCallStatechanged

[android-developers] Re: conditional compilation

2010-04-01 Thread Bob Kerns
! Emmanuelhttp://androidblogger.blogspot.com/http://www.alocaly.com/ On Mar 30, 12:36 pm, Bob Kerns r...@acm.org wrote: You do not do that in Java. I suggest you should not do that in C++, as there are better ways to do it. I suggest you do not use C. On Mar 30, 2:57 am, Dilip

[android-developers] Re: My location not getting in real device

2010-04-01 Thread Bob Kerns
There is no such thing as a self-closing XML tag. The two lines below -- original and your SHOULD BE version -- are 100% equivalent, and parsers will not distinguish between them. The standard is at: http://www.w3.org/TR/2006/REC-xml11-20060816/ if you'd like to verify. HTML is a different

[android-developers] Re: How to build 2 projects in on apk?

2010-03-31 Thread Bob Kerns
If you don't specify in the manifest that the components should have different process names, they'll be in the same process. You can even put components from different .apk's into the same process by giving them the same process name -- so long as they're signed by the same cert. Or maybe the

[android-developers] Re: conditional compilation

2010-03-31 Thread Bob Kerns
Server. This allows automatic version stamping for the about screen-- though does not yet modify the version name/number in the manifest. On Mar 30, 9:42 am, Bob Kerns r...@acm.org wrote: You can download a Java decompiler and investigate yourself. I suggest this one:http

[android-developers] Re: super.onResume() at beginning or end of method? Does it matter?

2010-03-31 Thread Bob Kerns
It's a good pattern, but I've found some exceptions. For example, the theme I wanted to apply to my PreferenceActivity wouldn't take effect unless I put it before the superclass's onCreate(). To avoid future compatibility issues, the contract really needs to be documented. I've submitted an

[android-developers] Re: Advertising Secrets

2010-03-31 Thread Bob Kerns
How ironic, a black-hat SEO link spammer nicely self-referentially documenting what he's doing. Fortunately, Google is putting the rel='nofollow' attribute on the link, so it won't actually affect the page rank. I hope everyone who mirrors this list does the same, because we shouldn't be

[android-developers] Re: Weird Thing with my posts

2010-03-31 Thread Bob Kerns
I've contacted them, and gotten a response, basically asking that their support address be removed from the list. I've pointed out that there's no way for us to do that, and they should do so. I've also pointed out that their auto-reply thing should not be sending an auto-reply to messages that

[android-developers] Re: Bug or feature?

2010-03-30 Thread Bob Kerns
Be liberal in what you accept, and conservative in what you send. may be Jon Postel's most famous quote, but it is not his best contribution to the internet. It seemed like a good idea at the time, when the number of senders and the complexity were both low. Experience has taught us that being

[android-developers] Re: conditional compilation

2010-03-30 Thread Bob Kerns
You do not do that in Java. I suggest you should not do that in C++, as there are better ways to do it. I suggest you do not use C. On Mar 30, 2:57 am, Dilip Dilip dileep2m...@gmail.com wrote: Hi All,  How to do conditional compilation in JAVA. something like in C, C++ : #ifdef

[android-developers] Re: conditional compilation

2010-03-30 Thread Bob Kerns
generally do not WANT conditional compilation, as it would make your code break when you moved it to another environment. This isn't an issue for C++ or C because the compiled files aren't portable anyway. On Mar 30, 3:36 am, Bob Kerns r...@acm.org wrote: You do not do that in Java. I suggest

[android-developers] Re: conditional compilation

2010-03-30 Thread Bob Kerns
You can download a Java decompiler and investigate yourself. I suggest this one: http://java.decompiler.free.fr/?q=jdgui You'll see that it does indeed optimize when it can. However, unlike a C file which gets linked into a .so or .dll or an executable, Java classes may be combined in different

<    1   2   3   4   5   6   7   8   9   >