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
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
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
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
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
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
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
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
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
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
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
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
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
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) {
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
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
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
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,
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
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.
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
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
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
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
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
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
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
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
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
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.
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
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);
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
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
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
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
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
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
...@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
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
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
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
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
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,
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,
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
301 - 400 of 515 matches
Mail list logo