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 sta
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 grou
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 rece
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 ti
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 no
Does "Clear Data" restore the preferences to their default state?
On Oct 25, 9:37 am, Dianne Hackborn wrote:
> On Sun, Oct 24, 2010 at 9:20 PM, Bret
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingwrote:
>
> > Since most apps of even moderate complexity make liberal use
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 wrote:
> > From: Xavier Ducrohet
>
> > Note that this only works in the Google APIs add-on, and only in 2.2.
>
> Any reason for that? Doesn't
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 set
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
andr
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.
T
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+unsubscr...
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 wrote:
> Hi ,
> I am creating an SDK .I have got some
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 android-developers@googlegroups
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 a
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 su
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
and
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, l
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 gro
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@goo
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 an
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+unsubscr...@goog
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 differ
other mechanism that will
_always_ deliver messages just as they were sent?
On Oct 30, 12:18 pm, Mark Murphy wrote:
> On Sat, Oct 30, 2010 at 3:14 PM,Bret Foreman wrote:
> > I have an IntentService that broadcasts an Intent each time if
> > finishes some work. Each broadcast Inte
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 t
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 Googl
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 R
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 custo
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 expe
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 finger-d
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 proble
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
clearly, its fine I guess.
>
> On 04-Nov-2010 11:38 PM, "Bret Foreman" 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 even
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 type
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-dev
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, however
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 b
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 wrote:
> 04.11.2010 23:01, Bret Foreman ?:
>
> > Of course, there's another method to set myParent.
>
> Could be like this:
>
> arg
y do you 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 wrote:
>
> > Ah, good point.That makes the hack a little simpler. It's still an
> > ugly hack.
>
> > On Nov
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 andr
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 of
Also, an integrated database designed to run on top of NV memory would
be helpful.
On Nov 5, 8:53 am, Bret Foreman 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 cycling. It sh
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 D
would just make a singleton for my data
> access, that has 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
> immed
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@go
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. Just
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 the
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);
setContentView(
nd the framework in general) is not thread safe.
>
> On Sat, Nov 6, 2010 at 10:21 AM, Bret Foreman wrote:
>
>
>
> > 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 M
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
Gr
d 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 wrote:
>
--
You received this message because you are subscri
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 the
I thought about 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 wrote:
> On Sat, Nov 6, 2010 at 2:51 PM, Bret Forem
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 wrote:
> On Sat, Nov 6, 2010 at 3:10 PM, Bret Foreman wrote:
> > I've used Traceview extensively on this code - it used to take 20
> > seconds and now
urphy wrote:
> On Sat, Nov 6, 2010 at 3:29 PM, Bret Foreman 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?
>
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 wrote:
> 1000's of views I guessThats too
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 the
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 runnab
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, th
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 po
False alarm. I reset my cable modem and the problem went away. Strange
that only some traffic was effected.
On Nov 7, 11:22 am, Bret Foreman wrote:
> My AVDs suddenly can't reach the internet. I'm testing using the
> browser of the AVD. I haven't changed anything that I thi
R if the CPU is busy with another
> task,
>
>
>
> On Sun, Nov 7, 2010 at 9:49 AM, Bret Foreman wrote:
> > 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.
By the way, Romain, you bring up a good point regarding ANRs. And it's
not going to help splitting my work up into small groups of operations
because a busy CPU might make one group of operations last long enough
to trigger an ANR. Instead, I need to break the work into time slices
so that the runn
I fill the Child View position with a vertical LinearLayout. The top
row of that layout is a horizontal LinearLayout with two Views, the
expand/collapse icon and the name of the child. The lower rows of the
vertical LinearLayout are the 3rd level items. You will find that text
selection is broken i
Be careful using this code. There is a bug in SQLite regarding this
exact operation: issue number 11743 on b.android.com. I filed the bug,
but many others had contacted me with various manifestations of the
problem.
--
You received this message because you are subscribed to the Google
Groups "And
bug report. The fact that SQLite is using a HashMap in code that is
supposed to be thread-safe seems like enough of a bug right there.
On Nov 9, 8:20 am, Bret Foreman wrote:
> This problem has raised its head again, even with the testing monkey
> throttled back. It just becomes more infrequent
This is now filed in b.android.com as issue 12456.
--
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+uns
This problem has raised its head again, even with the testing monkey
throttled back. It just becomes more infrequent at lower transaction
rates, which is what one would expect from a concurrency issue. I can
catch the exception, of course, but the real questions are 1) What DB
operation is causing
As long as you're starting from the ground up, you should include the
following features:
1) Support for a monthly subscription payment model. This would
substantially reduce the friction of trying new apps, since the user
only risks one month of subscription fees and could uninstall if they
don't
My test machine is on the slow side and so the AVD sometimes runs
considerably slower than a real phone. Slow enough, in fact, that some
UI operations throw an ANR when my app has a lot of background
activity going on (ANRs that I never see when testing on real
hardware). I'd like to adjust the ANR
Can you post your code where you create the DB?
--
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+unsubs
Well, I could live with the ANRs if it didn't stop the testing monkey.
I notice the monkey has an "ignore timeouts" flag. Is a timeout the
same as an ANR?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
I'm getting requests for a trial version of my app. Assume for the
moment that I'm not concerned with piracy (I have other mechanisms in
place to defeat that).
One approach that occurs to me is upon first launch of the app I write
the date into the shared preferences database. Let's call it the
"i
Note that if Google changed the refund period to be settable by the
developer then this problem would be solved. I would make the refund
period 7 days, which is long enough for any reasonable evaluation.
This would delay me getting paid by 7 days but I could live with that.
--
You received this m
Yeah, both Amazon and Google host web databases. It would be just a
simple table with user IDs and dates. But it's a lot of infrastructure
to lay in when Google could just make the return period settable.
--
You received this message because you are subscribed to the Google
Groups "Android Develo
I'm using the following code, which I expect would scale the
associated image to fit within the given dimensions of the button:
ImageButton.setMaxHeight(32);
ImageButton.setMaxWidth(32);
ImageButton.se
I wrote an app once that encoded messages into ASCII text that could
be sent via SMS messaging. We used it for displaying a real-time price
ticker for gold traders. This was before anything like that was
available on the internet. Your receiving end can subscribe to SMS
messages and look for a comb
Is this happening when you do adb install com.myApp ?
On Nov 12, 12:42 pm, GregM wrote:
> My app does not install because of this:
> "Unknown reason -102"
>
> How do I find out what this error means?
> Any guesses?
--
You received this message because you are subscribed to the Google
Groups "A
MOTODEV has fantastic developer support. Contact me directly if you
want specific names of people who have helped me.
On Nov 13, 4:42 am, Mark Murphy wrote:
> For Motorola, use MOTODEV.
>
> I cannot comment on HTC's plans in this area, though I remain hopeful.
>
> I have nary a clue what Samsung
This situation looks tailor made for an AsyncTask, which allows you to
manage background and foreground threads with a simple interface. And
the docs have a progress bar example that sounds like exactly what you
want.
--
You received this message because you are subscribed to the Google
Groups "A
Here's an example where they did something like what you suggest. They
have a whole framework that other apps can plug into for services.
It's not simple, but it's one of the most successful business cases on
Android so far so it's worth paying attention to.
http://www.twofortyfouram.com/
--
You
How many different integer values do you need? You could generate a
few hundred strings in advance and use a look-up table for speed.
Also, are you using SQLite or the Preferences editor? Those can slow
down as the amount of data they use gets larger.
On Nov 14, 10:54 am, kk wrote:
> Hi all,
>
>
I trying to create an ImageView with 3 states - default, pressed, and
checked. I've extended ImageView, implemented the Checkable interface,
and created a selector drawable file with entries for the three
states. But I'm confused about just how it all is supposed to work.
I've got the default and p
Hmm, the git example was remarkably unhelpful. A few comments in the
code would be nice.
Anyway, here's what I'm trying to do:
My selector XML looks like this:
http://schemas.android.com/apk/res/android";>
I set the onTouch listener of the ImageView like this:
I have a custom layout with a lot of Views. Currently, I build the
entire view hierarchy in the onCreate, though I stream the actual work
in small batches. This works OK up to about 1000 Views and then
performance degrades a little. Obviously, I'd like to use the
ListAdapter pattern and only genera
I've been looking at the AdapterView but it's not clear how you tell
it how many views wide for a 2-D arrays of Views. It's also not clear
how you tell it which views are "pinned" and should not be included in
either the vertical or horizontal scroll. Think of a spreadsheet where
every column is a
Leaving aside the lamentable wording of the documentation for this
method, it's not really acting as I hoped for an ImageView. I call
toggle() from the onClick method of the view but the view system does
not redraw my drawable with the checked state. However, if I
initialize CHECKED_STATE_SET with
>From a marketing perspective, the Android Market is really primitive.
Most of the required features are such no-brainers that I can only
conclude that there are some technical issues that make them hard to
implement. I'm guessing the people who architected the Market were not
marketeers and built
Tre,
The preferences transfer that you implemented is such an obvious need
that it should be part of the framework. Can you generate a feature
request along those lines?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group
Dianne,
Thanks for trying, but this did not clarify the issue for me. What
would really help would be some documentation about how drawable state
sets are supposed to work. Something beyond the 5 (poorly worded)
lines in the official Android docs. This is a case where a code
example just increases
This should help: http://en.wikipedia.org/wiki/Window_function
On Nov 17, 12:55 pm, Dave wrote:
> Bret, thanks for the advise. I do NOT have any experience with FFT.
> I take it it's an issue dealing with edge harmonics? In fact,
> pinpointing certain harmonics within the frequency is exactly w
101 - 200 of 515 matches
Mail list logo