[android-developers] Re: Spinner in ListView Activity

2010-10-18 Thread Bret Foreman
Are you calling the super of the onClick method in the onClickListener? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: isUserAMonkey throws exception

2010-10-18 Thread Bret Foreman
No, it does not. The same error occurs - it complains that the isUserAMonkey method is undefined. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from

[android-developers] Re: isUserAMonkey throws exception

2010-10-18 Thread Bret Foreman
As a work-around I just created my own flag which I set when I want to test. After reading about how unreliable the isUserAMonkey method is for other people, it seems like keep my existing solution is prudent, at least until the next version of the SDK. -- You received this message because you

[android-developers] Re: Select behavior of a TextView

2010-10-18 Thread Bret Foreman
Well, a little more experimentation shows that the select behavior works correctly when the child is a TextView but not when the child is a LinearLayout with a TextView inside. Could this be a bug in ExpandableListView or am I just not understanding something? -- You received this message

[android-developers] Re: Should I use synchronized for a boolean variable

2010-10-18 Thread Bret Foreman
Even if you just have one reader and one writer, you'll need to serialize access to the flag (with a mutex, for example). Otherwise, you might get an IOException if the flag is being written by one thread at the same time another thread tries to read it. -- You received this message because you

[android-developers] Re: Should I use synchronized for a boolean variable

2010-10-18 Thread Bret Foreman
http://www.ibm.com/developerworks/java/library/j-jtp06197.html I'll stick with IBM's opinion. Note that they explicitly use a boolean as an example. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: TextView visibility problem

2010-10-18 Thread Bret Foreman
I just tried the hierarchyviewer and I'm getting the following exception as soon as I click Request Layout. I restarted the server and it didn't make any difference. Exception in thread AWT-EventQueue-0 java.lang.NullPointerException at

[android-developers] Failure installing Market Licensing

2010-10-18 Thread Bret Foreman
I'm getting the following failure when attempting to install the Market Licensing package with SDK version 8. Any ideas what might be wrong? Downloading Market Licensing package, revision 1 Installing Market Licensing package, revision 1 Unzip failed: C:\Program Files\Motorola\MOTODEV Studio for

[android-developers] Re: Select behavior of a TextView

2010-10-18 Thread Bret Foreman
This is almost certainly a bug in ExpandableListView. I've submitted bug report 11967, which includes a simple test project that demonstrates the bug. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Freeing DB resources

2010-10-18 Thread Bret Foreman
SQLite has locking on by default and you can have any number of threads accessing it concurrently if you leave it in locking mode. Opening and closing the database and/or the cursors is not especially expensive. One trick that improves performance is to re-use the cursor after you close it so the

[android-developers] Re: prefetch database values

2010-10-18 Thread Bret Foreman
Sounds like this is what you need: http://developer.android.com/resources/samples/SampleSyncAdapter/index.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

[android-developers] Opinions wanted on ExpandableListView - debug or rewrite?

2010-10-19 Thread Bret Foreman
My current app development is stalled due to Issue 11967 (http:// code.google.com/p/android/issues/detail?id=11967) and I'm thinking about the best way forward. One approach is to download the ExpandableListView source and debug the problem. But there is evidence from the API that this

[android-developers] Re: Select behavior of a TextView

2010-10-19 Thread Bret Foreman
One workaround might be to overrride the onDraw method of the TextView - set the paintbrush color and then call the super. But I'm not sure how all that might work. On Oct 19, 10:04 am, TreKing treking...@gmail.com wrote: On Mon, Oct 18, 2010 at 8:38 PM, Bret

[android-developers] Re: Select behavior of a TextView

2010-10-19 Thread Bret Foreman
Well, the workaround turned out to be extremely simple: Instead of using a TextView, use this. It works at both the Group and Child level: class BugFixTextView extends TextView { public BugFixTextView(Context context) {

[android-developers] ConcurrentModificationException in SQLite

2010-10-19 Thread Bret Foreman
I'm doing some stress testing of my SQLite database using the testing monkey and I got the following exception, which appears to be from inside SQLite. My app has many threads accessing the database but all of them do so in locking mode so I don't think this exception is my fault. Any opinions on

[android-developers] Re: ConcurrentModificationException in SQLite

2010-10-19 Thread Bret Foreman
Slowing down the monkey causes this exception to go away. There is probably a race condition inside SQLite - a condition that is never going to come up in realistic user situations but only under heavy synthetic loads. Still, it should probably be studied and fixed, just to prevent the rare case

[android-developers] Re: What buttons does every Android phone have to have?

2010-10-20 Thread Bret Foreman
As Android makes its way into automotive console applications, don't be surprised if some of these rules change. There are regulatory restrictions about what buttons are allowed to function when the vehicle is moving at speed. Of course, app developers will respond by replacing many of the

[android-developers] Re: Help!!! Unknown Error - java.lang.NullPointerException :: Android Packaging Problem

2010-10-20 Thread Bret Foreman
This sounds more like a problem with your dev system than with your code. Try re-installing Eclipse and the SDK. Export all your Eclipse preferences first, of course (File-Export-General-Preferences). -- You received this message because you are subscribed to the Google Groups Android Developers

[android-developers] Getting the Market ID

2010-10-20 Thread Bret Foreman
I'd like to fetch and store (on my back end server) the Market ID of the users of my app. I'll match this against the user IDs of my service to help detect software pirates and other monkey business. How do I find the Market ID that was used to purchase the app? -- You received this message

[android-developers] Uploading an app to the Market for testing

2010-10-21 Thread Bret Foreman
I've just added LVL and server-based licensing into my (as-yet unpublished) app. It appears that the license testing requires that the app exist in the Android Market. Is there a way to publish an app to the Market but keep it hidden while I test? -- You received this message because you are

[android-developers] Re: Android serial port

2010-10-22 Thread Bret Foreman
Check out the Beagle Board and also Andrino. I believe they both have serial ports and Android libs to access them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

[android-developers] User ID of purchaser

2010-10-22 Thread Bret Foreman
Is there a way I can get the Google Marketplace ID of the purchaser of my app? I mean from within the app at runtime. I want to send it to my back-end service database to help detect pirates. -- You received this message because you are subscribed to the Google Groups Android Developers group.

[android-developers] Re: Distributing free licenses to paid apps

2010-10-22 Thread Bret Foreman
Jeez, folks. Google can barely keep the Market running as it is and you're asking for more features? I vote they work on making the system they have reasonably reliable first. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Keyboard log for reference

2010-10-22 Thread Bret Foreman
This sounds like a security problem, since your kb app could pick up passwords and everything else the user typed. You could do this easily within your own app, though, by overriding the onKeyDown methods in the appropriate widgets. -- You received this message because you are subscribed to the

[android-developers] Re: add child views to main view

2010-10-23 Thread Bret Foreman
Well View.addView is a good start. I'm not sure what you mean by move though. Are you talking about changing focus, moving a cursor, setting a view as selected, or something else? On Oct 23, 9:29 am, ArcDroid jacobrjohn...@gmail.com wrote: Hello, I am trying to figure out how to add a child

[android-developers] Re: displaying nearby schools and airports in google maps android

2010-10-23 Thread Bret Foreman
I have an app that shows airports as an overlay on Google Maps and I got the lat-lon data from here: http://www.partow.net/miscellaneous/airportdatabase/ I sucked the data into a spreadsheet and converted it from deg-min-sec to decimal degrees, then exported it to CSV which goes into /res/raw

[android-developers] Setting up a user account on an AVD

2010-10-23 Thread Bret Foreman
I have an Android 2.2 SDK 8 AVD and I want to set up a user account so I can test server licensing. I've created a gmail account for that purpose. I go to Settings-Accounts Sync-Add Account and enter the account details. It says receiving account information, then puts up a Server Settings screen

[android-developers] Re: Can you code in Android? Could you spare some free time to help people with brain injury?

2010-10-23 Thread Bret Foreman
Cognitive science is a great hobby of mine. I'm not sure I could contribute much coding time but I'd love to follow the project. Is there a collaboration website, discussion group, or wiki I could join? -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Setting up a user account on an AVD

2010-10-23 Thread Bret Foreman
Well, I'm going by this: Signing in to a Google account on an emulator If you are testing licensing on an emulator, you need to sign in to a Google account on the emulator. If you do not see an option to create a new Google account, the problem might be that your AVD is running a standard

[android-developers] Re: Setting up a user account on an AVD

2010-10-23 Thread Bret Foreman
I don't think it's a networking problem. I can log into the gmail account with the browser on the AVD. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe

[android-developers] Re: User ID of purchaser

2010-10-23 Thread Bret Foreman
though I won't pirate your app, I want to make sure i dont install it so you can't stealing my personal info without my consent. Actually, doing that might even be contrary to privacy laws in Canada. - brill On Oct 22, 12:06 pm, Bret Foreman bret.fore...@gmail.com wrote: Is there a way I can

[android-developers] Re: User ID of purchaser

2010-10-23 Thread Bret Foreman
By the way, I figured out how to do this. And the user gets warned by the Market that the app needs permission to access the AccountManager so nothing happens behind anyone's back. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to

[android-developers] Re: Intent, launchmodes, intent-flags etc.: How to and best practices for starting/handling Activities

2010-10-23 Thread Bret Foreman
One architectural problem with Android is that Intents are overloaded with many different purposes - they carry data, specify actions, launch choosers, kick off services, and much more. On top of that, Android allows most objects, including Intents, to be specified either dynamically in Java or

[android-developers] Re: ListView and Memory Leaks

2010-10-24 Thread Bret Foreman
I would also try exporting the project from Eclipse into an apk file and installing that. It may be something about how it's installed differently between Eclipse and Ant. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Application still Running After Exit

2010-10-24 Thread Bret Foreman
Since most apps of even moderate complexity make liberal use of the preferences database and also SQLite, restarting the app isn't going to produces a known good state. A real factory reset is not going to happen without either some complex re-init code in the app or else a reinstall. -- You

[android-developers] Re: Looking for android dev (2-10 yrs) Bangalore

2010-10-24 Thread Bret Foreman
My freshman year in college, there was a guy in our dorm who was famous for his approach to women. We would go out to a bar with him and he would start asking one woman after another if they would sleep with him. The guy was relentless and shameless. And the thing is, he might get turned down 50

[android-developers] Re: Recents

2010-10-24 Thread Bret Foreman
Dianne, I think you've missed a key aspect of the word 'task'. The use of the word derives from the idea of computer multi-tasking. In it's original CS sense, it means running several computer programs in a round-robin fashion so that each gets a slice of the processor. You're right that it has

[android-developers] Re: Application still Running After Exit

2010-10-25 Thread Bret Foreman
Does Clear Data restore the preferences to their default state? On Oct 25, 9:37 am, Dianne Hackborn hack...@android.com wrote: On Sun, Oct 24, 2010 at 9:20 PM, Bret Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingbret.fore...@gmail.comwrote: Since most apps of even

[android-developers] Re: Android Emulator: Accounts Sync

2010-10-25 Thread Bret Foreman
Actually, I haven't been able to get it to work even for a 2.2 AVD. I get a server error and a NullPointer exception in the logcat. On Oct 23, 2:03 pm, g b descartave...@gmail.com wrote: From: Xavier Ducrohet Note that this only works in the Google APIs add-on, and only in 2.2. Any reason

[android-developers] Re: Google Android platform for robotics (serial connection support).

2010-10-25 Thread Bret Foreman
This is a nice setup: http://www.amarino-toolkit.net/index.php Note that standard phone hardware usually assumes the phone will be a USB target, not a USB host. This means RS232 dongles won't work without a lot of fiddling around with USB hubs and all that. If you want to support the broadest

[android-developers] Re: How to create a reminder

2010-10-25 Thread Bret Foreman
http://developer.android.com/reference/android/app/AlarmManager.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: Why doesn't Context.bindService() call onStartCommand()?

2010-10-25 Thread Bret Foreman
Doug, If the service is not running, I don't see how you can bind to it. So the binding method has two choices if the service isn't already runing - start the service or throw an exception. -- You received this message because you are subscribed to the Google Groups Android Developers group. To

[android-developers] Re: MediaRecorder create the file almost 10 seconds later after start recording

2010-10-25 Thread Bret Foreman
Did you try calling flush() on the Stream? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: how to keep images inside the JAR and How to access the files

2010-10-26 Thread Bret Foreman
You can put images into /res/drawable and access them with R.drawable.imagename. You can also create multiple resolutions of the image and put files by the same name into drawable-hdpi, drawable- ldpi, and so on. On Oct 26, 7:38 am, RamaMohan rama.mohan...@gmail.com wrote: Hi , I am creating an

[android-developers] isUserAMonkey bug (and workaround) documented as issue 12166

2010-10-26 Thread Bret Foreman
People in other threads here have complained about isUserAMonkey throwing an exception but I couldn't find a bug report about it. I was able to demonstrate the behavior on a Motorola Droid and also created a workaround, which can be found on b.android.com at issue 12166. It would be nice if people

[android-developers] Re: GK:How to give conditions in android XMLs

2010-10-26 Thread Bret Foreman
When you say 'operator', do you mean carrier, user, or phone manufacturer? Which classes and methods are operator specific? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Recommendations for Android app development and test hardware

2010-10-26 Thread Bret Foreman
If you can make a good business case for you app, you can get devices at cost (and sometimes even free) from the manufacturers. This includes beta version of new devices. The best example is Motorola's Motodev program, which has been quite helpful to me. -- You received this message because you

[android-developers] Re: guitar tuner

2010-10-26 Thread Bret Foreman
Here's the MediaRecorder doc: http://developer.android.com/reference/android/media/MediaRecorder.html As a first cut I would set up two files, record to one while doing an FFT on the other. Alternate the roles of the files every 200mS and display the latest frequency. Do you have experience with

[android-developers] Re: guitar tuner

2010-10-26 Thread Bret Foreman
On further reflection, I realize that you don't really need a full FFT, since you are not interested in anything except the fundamental. Check a basic signal processing text and you should find a way to truncate the FFT and save a lot of processing. -- You received this message because you are

[android-developers] Re: SQLite Database Issues

2010-10-26 Thread Bret Foreman
I think you should add logic that implements a backoff delay and retry when the table is not found. 100 mS between tries and 5 tries for a total of 1/2 second. In the rare case where it has to retry, the user should never notice. I have a lot of multi-threaded SQLite access and I had to implement

[android-developers] Cherrypal tablet

2010-10-26 Thread Bret Foreman
Has anyone tried one of these yet? http://www.cherrypal.com/home.htm -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: SQLite Database Issues

2010-10-26 Thread Bret Foreman
If everyone is read-only then there should be no collisions. Read- locks and write-locks are different. A write-lock prevents everyone else from reading or writing. A read-lock prevents anyone else from writing but allows any number of other readers. This is true for schema reads and writes too,

[android-developers] Re: How to restart application.

2010-10-26 Thread Bret Foreman
Or we all explain the problems we all have and Mark solves them all in sequence like a chess grand master moving from game to game and checkmating each opponent in turn. ;) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: sqlite

2010-10-28 Thread Bret Foreman
Do an update and check how many rows got updated. If 0, then insert a new row. If 1, do nothing. If more than 1, throw an exception. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Angry DROID2 Owner

2010-10-28 Thread Bret Foreman
Have you tried uninstalling your games and re-installing them from the Market? You won't have to pay again as long as your google user name is the same. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: How to debug an application that hangs after awhile

2010-10-29 Thread Bret Foreman
Have you looked at the logcat output? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] How different do the broadcast Intents need to be?

2010-10-30 Thread Bret Foreman
I have an IntentService that broadcasts an Intent each time if finishes some work. Each broadcast Intent is identical except that it contains a Bundle with some result information from the IntentService. Evidently, having different data in the Bundle is not enough for Android to think it's a

[android-developers] Re: How different do the broadcast Intents need to be?

2010-11-01 Thread Bret Foreman
Well, I ran a few experiments and haven't yet found a way to make this work. The problem is that I have a set of background threads that are updating various rows in an SQLite database. I also have a UI thread that needs to know about those updates so the widgets can be updated. I believe

[android-developers] Re: Hourglass

2010-11-01 Thread Bret Foreman
I'm working on the same issue. My Activity takes some time to calculate the graphics that will be displayed, about 3 seconds in some complex cases. That's just long enough that the user often hits the button again. If an hourglass is not an option, I suppose I can throw up some sort of splash, do

[android-developers] Re: How to speed up a single simple SQLite INSERT?

2010-11-01 Thread Bret Foreman
The index must be updated with each insert. If you don't need fast selects then removing the index should help a little. You can also turn off locking (the default is on) if you don't need to worry about multiple process access. -- You received this message because you are subscribed to the

[android-developers] Re: How different do the broadcast Intents need to be?

2010-11-03 Thread Bret Foreman
The background threads are in IntentServices and I've run into issues no matter what method I use. If I use createPendingResult in the calling Activity then I end up with a PendingIntent object, which does not fit into the startService method that kicks off the IntentService. Perhaps I can use a

[android-developers] Re: How different do the broadcast Intents need to be?

2010-11-04 Thread Bret Foreman
Dianne, Let me back up and give more context. My Activity draws various TextViews and other UI elements with data from a local SQLite database. When it can't find the data it needs locally, it draws a placeholder icon and generates a request to a web service for the data. The interface to the web

[android-developers] Re: iOS UI Patterns Bleeding into Android apps

2010-11-04 Thread Bret Foreman
Tre, If our primordial ancestors had stuck to the accepted design patterns then we would still be living as slime on rocks. Variation is a good thing, even if it breaks with standards. That's how evolution works. If people create apps that are somehow more intuitive to use, they will attract

[android-developers] touch highlight behavior in a ListView

2010-11-04 Thread Bret Foreman
The default touch highlight behavior in a ListView is that the text starts as white on a black background and changes to white on an orange background when a finger is placed on the item. I'm using an ExpandableListView (ELV) which I've modified to include a 3rd level of list items. I see the

[android-developers] Missing ACTION_UP

2010-11-04 Thread Bret Foreman
I've got a view where I override onTouchEvent to detect touching the view with a finger and also to detect lifting the finger from the view. I'm getting the ACTION_DOWN event but not the ACTION_UP event. In fact, onTouchEvent isn't getting called when I life my finger. Could it be that the

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
So I set an onClickListener for the view and got the correct behavior. I do the highlight background in the onTouchEvent and then remove the background in the onClickListener. It's not pretty, but I don't see any other way, since ACTION_UP never seems to occur. However, this creates another

[android-developers] sendBroadcast in IntentServicenot non-re-entrant?

2010-11-04 Thread Bret Foreman
I'm trying an experiment where an Activity makes a number of consecutive calls to an IntentService. Each call kicks off some background work that finishes in a few seconds. So there are multiple concurrent instances of the IntentService running. All the instances finish at around the same time and

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
It's unfortunate that onClick and onTouch do not use the same approach, where the method returns a true if it handled the event and the parent shouldn't get the event a false if the parent should get the event. -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
, if the docs say it clearly, its fine I guess. On 04-Nov-2010 11:38 PM, Bret Foreman bret.fore...@gmail.com wrote: It's unfortunate that onClick and onTouch do not use the same approach, where the method returns a true if it handled the event and the parent shouldn't get the event a false if the parent

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
It occurs to me that this may be a consequence of the _kind_ of view I'm using. In this case, it's a TextView. I notice that the only onTouch event that the default TextView passes to my onTouch method is ACTION_DOWN. I'm guessing I need to set some flags elsewhere to get other events for this

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
Scanning through the TextView docs did not reveal any flags that I think would effect whether or not the ACTION_UP event was passed to onTouch. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
Now here's an AMAZING thing. When I change onTouch to return true (indicating that the event is handled) then the ACTION_UP event _is_ passed to onTouch. So returning false as a result of the ACTION_DOWN somehow tells the stack to pass the subsequent ACTION_UP to onTouch. This is not a fix,

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
It looks like the only workaround is brute force. I can extend TextView to add a myParentView variable and then call the myParentView.onTouchEvent. Of course I'll also return true from onTouch so that I will successfully receive the ACTION_UP event. But what a hack! -- You received this message

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
OK, just for the reference of others, there's the fix, which works. Returning true means the subsequent ACTION_UP is received. calling the onTouchEvent method of the parent ensures that the event gets passed up the stack. Of course, there's another method to set myParent.

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
Ah, good point.That makes the hack a little simpler. It's still an ugly hack. On Nov 4, 1:09 pm, Kostya Vasilyev kmans...@gmail.com wrote: 04.11.2010 23:01, Bret Foreman ?:   Of course, there's another method to set myParent. Could be like this:     arg0.getParent() Or (assuming

[android-developers] Re: Missing ACTION_UP

2010-11-04 Thread Bret Foreman
want to pass the message to the parent anyway? I don't see a need for this. -niko On Nov 4, 3:23 pm, Bret Foreman bret.fore...@gmail.com wrote: Ah, good point.That makes the hack a little simpler. It's still an ugly hack. On Nov 4, 1:09 pm, Kostya Vasilyev kmans...@gmail.com wrote

[android-developers] Re: Tomcat on Android

2010-11-04 Thread Bret Foreman
I've been looking into this too. We have an industrial embedded control application that I'd like to run on Android and control from a remote browser. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Not able to browse from the android emulator

2010-11-04 Thread Bret Foreman
What message are you seeing in the logcat? This sounds like a permissions problem. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send

[android-developers] Re: Tomcat on Android

2010-11-05 Thread Bret Foreman
What we need is something with built-in 3G and WiFi, a small touch- screen, low power consumption, fan-less, and able to tolerate frequent power cycling. It should also have a large installed base (millions), lots of developers familiar with it, and the hardware should be available from a number

[android-developers] Re: Tomcat on Android

2010-11-05 Thread Bret Foreman
Also, an integrated database designed to run on top of NV memory would be helpful. On Nov 5, 8:53 am, Bret Foreman bret.fore...@gmail.com wrote: What we need is something with built-in 3G and WiFi, a small touch- screen, low power consumption, fan-less, and able to tolerate frequent power

[android-developers] Re: How to dump a Sqlite statements txt file into db.

2010-11-05 Thread Bret Foreman
I use the StringSerializer and XmlPullParser classes for this purpose. With XML you can add more fields to the file later and still manage forward and backward compatibility easily. And I hate writing parsers. -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: How different do the broadcast Intents need to be?

2010-11-05 Thread Bret Foreman
a thread to do network fetches in the background.  When an activity wants to show the data, it gets the singleton, asks for the data, and gives a callback to be called when the data is ready (if it wasn't immediately available). On Thu, Nov 4, 2010 at 8:19 AM, Bret Foreman bret.fore...@gmail.com

[android-developers] Re: Anyone have an experience dealing with Ubinuri?

2010-11-05 Thread Bret Foreman
I think Motodev distributes in Korea too, though I don't know what cut they take and they certainly don't give you anything up front. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: ExpandableListView question

2010-11-05 Thread Bret Foreman
I just finished implementing something like this. It was not easy. ExpandableListView has a few bugs which you will have to code around. I've filed one of the bugs in b.android.com, along with a work-around, and I've posted the details of another bug in the forum, also including a work-around.

[android-developers] unable to dismiss a progress dialog

2010-11-05 Thread Bret Foreman
I've got a progress dialog that I'm unable to dismiss and I can't figure out why. The first time through the code, it shows the dialog and dismisses it perfectly. The second time through it fails to dismiss. There is no error in the logcat and no exceptions are thrown, but the dialog remains on

[android-developers] Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
It takes some time to draw my views so I want to put up a progress dialog while I do it. I set up the code like this: public class MyActivityClass { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
toolkit (and the framework in general) is not thread safe. On Sat, Nov 6, 2010 at 10:21 AM, Bret Foreman bret.fore...@gmail.comwrote: It takes some time to draw my views so I want to put up a progress dialog while I do it. I set up the code like this: public class MyActivityClass

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
I should point out, by the way, that Dianne Hackborn recommended my current approach in this thread: http://groups.google.com/group/android-developers/browse_thread/thread/8c3fe5692fb6b0b0/79c04e8bf41843?q=#0079c04e8bf41843 -- You received this message because you are subscribed to the Google

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
and whatever you are doing that's taking a long time to compute. You can also stream the UI by adding Views one after the other using Handler./View.post(Runnable). On Sat, Nov 6, 2010 at 11:24 AM, Bret Foreman bret.fore...@gmail.comwrote: -- You received this message because you are subscribed

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
Streaming the UI creates an added complication - in what way should I notify the user that the UI is finished drawing? Partial data is going to confuse the user unless they know that more is coming. Since this is a limitation imposed by the Android framework, others must have encountered it. Is

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
creating a pool of pre-built Views but there's no guarantee that it will be any faster than the current approach and such a pool is very complex to implement in the Android framework. On Nov 6, 12:01 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Nov 6, 2010 at 2:51 PM, Bret Foreman

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
A few hundred Views in a typical case but it could be up to a couple thousand in some cases. On Nov 6, 12:19 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Nov 6, 2010 at 3:10 PM, Bret Foreman bret.fore...@gmail.com wrote: I've used Traceview extensively on this code - it used to take

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
...@commonsware.com wrote: On Sat, Nov 6, 2010 at 3:29 PM, Bret Foreman bret.fore...@gmail.com wrote: A few hundred Views in a typical case but it could be up to a couple thousand in some cases. And what makes you think that a couple thousand is sensible, on any platform? -- Mark Murphy

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
In what way is it too much? I'm not using much memory and the delay is only a few seconds. It will all be fine if I can figure out how to present the user a progress dialog or other indication that work is in progress. On Nov 6, 12:58 pm, Kumar Bibek coomar@gmail.com wrote: 1000's of views I

[android-developers] Re: Drawing views in an AsyncTask

2010-11-06 Thread Bret Foreman
Since the views are all different sizes, the various ListViews, GridViews, and Adapters don't work. Part of the secret sauce of my app is the algorithm for arranging the views in the most compact way to present the maximum amount of information in the screen space available. The main benefit of

[android-developers] Re: Drawing views in an AsyncTask

2010-11-07 Thread Bret Foreman
Following Romain's suggestion, I changed the code above to look as below. The interesting thing to note is that the behavior remains exactly the same. The dialog gets dismissed when the activity is new but won't dismiss when there is a configuration change. According to my understanding, the

[android-developers] Re: Tomcat on Android

2010-11-07 Thread Bret Foreman
For me, Tomcat is just an example of a complete implementation. For our application we just need HTTP, HTTPS, and some basic server instrumentation and logging to identify problems. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to

[android-developers] Re: unable to dismiss a progress dialog

2010-11-07 Thread Bret Foreman
This issue is more extensively addressed here: http://groups.google.com/group/android-developers/browse_thread/thread/eddf5a148d0f3d5f/051169abf6fd05c0#051169abf6fd05c0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group,

[android-developers] Re: Drawing views in an AsyncTask

2010-11-07 Thread Bret Foreman
I just figured out a slick workaround for this bug. The progress dialog stuff is clearly hosed so I just brute force it. I do a setContentView with the resource R.layout.tellsuserthatworkingisbeingdone, which tells the user to wait a moment. Then I give the framework 100 mS to update the screen,

[android-developers] AVD suddenly can't reach the internet

2010-11-07 Thread Bret Foreman
My AVDs suddenly can't reach the internet. I'm testing using the browser of the AVD. I haven't changed anything that I think is related on my development machine and I can still reach the internet from the development machine. I'm sort of at a loss figuring out how to start debugging this. Is it

<    1   2   3   4   5   6   >