[android-developers] Android Market Licensing Service

2010-09-17 Thread Bret Foreman
Is anyone on this list using AMLS yet? Any comments, things to avoid,
best practices? It sounds great in concept but I'd like to hear how
it's working in practice.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Microphone for demoing speech recognition?

2010-09-17 Thread Bret Foreman
Neumann makes the best microphones in the world. They're not cheap
but, depending on how important your demo is, you can rent them in
most big cities. Maybe $50/day to rent a mid-range model.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Converting Bitmap to ASCII

2010-09-18 Thread Bret Foreman

http://en.wikipedia.org/wiki/MIME

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Getting the height of a TextView

2010-09-18 Thread Bret Foreman
I have a TextView where I have called setText() and setWidth(). This
causes the text to wrap and the view to grow longer with more text,
which is what I want. But I have some other graphics that I want to
position relative to the resulting height of the TextView. I tried
calling getHeight() (after setting text and width) and that method
returned 0. So how can I find the height of the TextView?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Getting the height of a TextView

2010-09-19 Thread Bret Foreman
What if I was to override TextView.onSizeChanged() and get the h value
passed to that method? Will onSizeChanged get called at least once
before the TextView is drawn?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using Eclipse - can it get faster?

2010-09-19 Thread Bret Foreman
Being memory-bound and being disk-I/O-bound are nearly the same thing,
since Windows can use extra memory for I/O caching. Being short of
both memory and I/O speed is a fatal combination.

On Sep 19, 9:18 am, Neilz  wrote:
> Ah, well I guess it's just my PC build then.
>
> It's about 3 years old, and until the other day I had 3Gb Ram, but one
> of those fried and now I have just 1Gb. But to be honest the extra 2Gb
> barely made any difference, so I guess the overall motherboard/
> processor spec just isn't good enough.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Application checksum at runtime

2010-09-19 Thread Bret Foreman
As an additional anti-pirating strategy, I'd like to compute a
checksum on my application at runtime. Since my app communicates with
a back-end server, I can send the checksum with each message and the
server can deny service to altered apps. Not a complete solution to
piracy by any means, but a fairly easy way to raise the bar.

Anyone know how an app can get access to it's load image at runtime?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Application checksum at runtime

2010-09-19 Thread Bret Foreman
Sure, if they could reverse engineer the program logic then they could
generate the correct checksum...but that's not so easy. Since the
checking logic is on the server side, they won't even know what part
of the code is causing the non-response. Anything that raises the
reverse-engineering bar is going to motivate a potential cracker to
try to break some other app instead of mine.

On Sep 19, 3:40 pm, William Ferguson 
wrote:
> I would love your solution to work, but surely any pirate will be able
> to calculate exactly the same checksum.
> If they have access to your apk, they have access to the key or
> algorithm you are using.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Application checksum at runtime

2010-09-19 Thread Bret Foreman
Not a bad idea, but a hacker could see the server's response come over
the network and would probably detect me resending part of that
response to my server. But an encrypted version of the license server
response would work.

> use market licensing and have the app forward the
> license server's response to your server when it requests something
> from you.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to install the files in the file system on android phone (samsung galaxy 5)

2010-09-20 Thread Bret Foreman
You can store files in /res/raw. Just create the folder, import the
files, and they'll get installed with your package. They will be read-
only, though, so you'll need to move them at runtime if you plan to
change them. I do this with certain geographical information for
location based services and it works great.

On Sep 20, 7:08 am, sameer kamble  wrote:
> Dear Sir,
>
> 1) I am using Eclipse IDE and Android SDK 2.1 for my application. My
> application reads some data files from the File System, so using DDMS
> i push all the files in "/data/data/com.mypackage/" folder and run my
> application on emulator. I am able to see my desired output properly
> on the emulator.
>
> 2) Now i have Android device and i don't know how to push the files in
> the Internal memory of the phone. I have installed driver CD. But it
> only shows me the SD card directory.
>
> 3) Actually what i want is that the moment my application is installed
> and run it should read the data files from the file system. So there
> should be no added efforts to push the files in the file system.
>
> 4)Means can i pack my data files with my .apk file and when the apk is
> getting installed can the data files be placed directly in the
> internal memory(file system) i.e. "/data/data/com.mypackage/" folder.
> Is this possible ??
> if yes can you please tell me how to do it.
>
>  5) Can you please help me on this issue.
>
> regards,
> Sameer Kamble

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Timing an ASyncTask

2010-09-20 Thread Bret Foreman
Look at the java docs for Timer and TimerTask. The TimerTask can
cancel the AsyncTask or else the AsyncTask can cancel the timer,
whichever finishes first. Either way, you never run longer than the
Timer time.

On Sep 20, 6:21 am, Neilz  wrote:
> Hi all.
>
> I'm running a network service within an ASyncTask. I want to be able
> to time the task, and after a certain period of time interrupt it.
>
> Is there a simple way to do this? Basically, when the doInBackground()
> methods starts, I want to say "If it hasn't completed in 30 seconds,
> do something else".
>
> Thanks.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Nokia inviting Developers to become an Ovi store publisher.

2010-09-20 Thread Bret Foreman
This looks like spam to me.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Application checksum at runtime

2010-09-20 Thread Bret Foreman
This is why I want to do the checksum at runtime. If the pirate
patches the code, the checksum won't match any more. I'm trying to
detect an altered apk.

On Sep 20, 8:51 am, DanH  wrote:
> The pirate would have to crack a more complex algorithm, but
> again, once he figured out where to patch he could just patch the
> public key into the pirated code.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] projecting the Android screen

2010-09-20 Thread Bret Foreman
I have a Motorola Droid phone and I want to demo an app on it. The
demo will be to a largish group so I'd like to connect the phone to an
inFocus or similar SVGA projector. Does anyone know of a USB dongle to
do this?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: projecting the Android screen

2010-09-20 Thread Bret Foreman
Exactly. A dongle that I plug into the microusb and plugs into the
SVGA input of the inFocus. Of course it would need a driver on the
phone to push the screen to the USB port.

On Sep 20, 9:26 am, "John T. Haggerty"  wrote:
> That would be cool to know too. So we're taking about something to tether to
> the microusb?
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Matching TextView heights

2010-09-20 Thread Bret Foreman
I have two vertical TableLayouts containing rows of TextViews
separated by some graphics. Something like this:

R-L GraphicsR-R
R-L  R-R
R-L  R-R
R-L  R-R
R-L  R-R

The R-R TextViews have a fixed width, which means they grow vertically
when the text is longer than will fit in the width. The text is set at
runtime so this height is not known in advance. I want the height of
the R-L rows to exactly match the height of the R-R rows with the R-R
rows being the reference source for the height.

Once I do a TextView.setText and a TextView.setWidth on the R-R
TextViews, the height of those TextViews should be determined. Then I
can do a TextView.setMinHeight on the R-L TextViews. But I'm having
trouble getting the height value from the R-R TextViews. The
TextView.getHeight method returns zero.

Any ideas?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Getting the right highlighting behavior in a ListView

2010-09-20 Thread Bret Foreman
I have a ListView set up in single-choice mode like this:

 

When I press my finger on a choice, the selection changes from white
text on light gray to black text on orange. But as soon as I lift my
finger, the selection reverts to the original state. I'd like that
chosen row to remain in the black-text-on-orange mode when I lift my
finger so that the user knows what was selected in the list (my
onClickListener has captured the selected row, of course). Is there a
way I can tell the ListView that I want this behavior or something
similar so the user knows what item has been selected?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Getting the right highlighting behavior in a ListView

2010-09-20 Thread Bret Foreman
I'd like the user to know which choice they selected without exiting
the ListView. As you can see from the OP, I'm in singleChoice mode,
just expecting one choice.

On Sep 20, 10:49 am, Mike dg  wrote:
> I dont think cacheColorHint is what you are looking for. What you are
> asking for seems to go against established UI principles on Android.
> Are you trying to do multi-selection? What is the use case for this
> functionality?
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Matching TextView heights

2010-09-20 Thread Bret Foreman
Yes, I'm using TableLayouts, two of them in fact. The two columnar
TableLayouts cannot be merged into one because of the graphics in
between.

On Sep 20, 10:52 am, Mike dg  wrote:
> Have you looked into table layout? How do you want the R-L text to
> flow if it's not the same height as R-R. Maybe an image would better
> explain what you need.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Getting the right highlighting behavior in a ListView

2010-09-20 Thread Bret Foreman
This could just as well be a big list of radio buttons, but there's a
lot of choices so I think a ListView makes more sense.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Screen rotation and ProgressDialog

2010-09-20 Thread Bret Foreman
How should I handle an active ProgressDialog when the screen is
rotated? Perhaps I should cancel the dialog in onDestroy and restart
it in response to a SavedInstanceState flag?

I'm getting an exception and the following message in logcat:

E/WindowManager( 4240): Activity com.quickdroid.MainActivity has
leaked window c
om.android.internal.policy.impl.phonewindow$decorv...@44789150 that
was original
ly added here
E/WindowManager( 4240): android.view.WindowLeaked: Activity
com.quickdroid.MainA
ctivity has leaked window com.android.internal.policy.impl.PhoneWindow
$DecorView
@44789150 that was originally added here
E/WindowManager( 4240): at
android.view.ViewRoot.(ViewRoot.java:24
7)
E/WindowManager( 4240): at
android.view.WindowManagerImpl.addView(Window
ManagerImpl.java:148)
E/WindowManager( 4240): at
android.view.WindowManagerImpl.addView(Window
ManagerImpl.java:91)
E/WindowManager( 4240): at android.view.Window
$LocalWindowManager.addVie
w(Window.java:424)
E/WindowManager( 4240): at android.app.Dialog.show(Dialog.java:
241)
E/WindowManager( 4240): at
android.app.ProgressDialog.show(ProgressDialo
g.java:107)
E/WindowManager( 4240): at
android.app.ProgressDialog.show(ProgressDialo
g.java:90)
E/WindowManager( 4240): at
android.app.ProgressDialog.show(ProgressDialo
g.java:85)
...

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Screen rotation and ProgressDialog

2010-09-20 Thread Bret Foreman
But showDialog takes a resource ID and I'm creating my progress dialog
on the fly. Perhaps it's a better idea to create it statically?

On Sep 20, 12:07 pm, TreKing  wrote:
> On Mon, Sep 20, 2010 at 2:01 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingwrote:
>
> > How should I handle an active ProgressDialog when the screen is rotated?
>
> If you use showDialog(), it gets managed for you.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Screen rotation and ProgressDialog

2010-09-20 Thread Bret Foreman
But a ProgressDialog object does not have a setId method. So how would
I identify the dialog?

On Sep 20, 12:27 pm, TreKing  wrote:
> On Mon, Sep 20, 2010 at 2:18 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingwrote:
>
> > But showDialog takes a resource ID
>
> It's not a resource ID. That id is to ID the dialog itself. It can be
> whatever you need it to be to ID that particular dialog.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Matching TextView heights

2010-09-20 Thread Bret Foreman
I wish it was that simple but I need to scroll the R-L and R-R columns
independently. Back to the original question, how can I discover the
final height of R-R?

On Sep 20, 11:39 am, Kostya Vasilyev  wrote:
> You can put your graphics into the table instead - instead of a table row.
>
> --

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Screen rotation and ProgressDialog

2010-09-20 Thread Bret Foreman
Yeah, I read this first but was pretty confused. Now I've read it
again after the discussion here and it makes more sense. I've got it
working now.

On Sep 20, 1:05 pm, TreKing  wrote:
> On Mon, Sep 20, 2010 at 2:37 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingwrote:
>
> > But a ProgressDialog object does not have a setId method. So how would I
> > identify the dialog?
>
> I think you should review 
> this:http://developer.android.com/guide/topics/ui/dialogs.html
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] A ListView that acts like RadioButtons

2010-09-20 Thread Bret Foreman
I get a list of choices from an external server. Sometimes this list
is long so using actual radio buttons is ugly. The user can only pick
one item from the list. I'd like the ListView to act just like
RadioButtons - one item in the list is highlighted and if a different
item is picked then that item is highlighted and the previous choice
is unhighlighted. Can this be done?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: A ListView that acts like RadioButtons

2010-09-20 Thread Bret Foreman
Perhaps, but if I'm going to do that, I'd just as well have a
SrollView with a LinearLayout with a RadioGroup with RadioButtons
added on the fly. The behavior would then be almost identical, except
I would lose the convenience of using an adapter for the data.

On Sep 20, 2:23 pm, Kostya Vasilyev  wrote:
> Perhaps it would make sense then to put radio buttons into your ListView?
>
> You'd have to manage their state changes yourself, but then the UI would be
> instantly familiar to your users...
>
> --
groups.google.com/group/android-developers?hl=en

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Getting a View to redraw when parameters change

2010-09-20 Thread Bret Foreman
I want to get a set of Views to redraw after I change some drawing
parameters. I'm calling invalidate() and forceLayout() on the parent
of the Views but nothing happens. If I rotate the screen then the
Views redraw correctly using the new parameters, as you would expect.
What else do I need to do to get the Views to redraw?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: A ListView that acts like RadioButtons

2010-09-20 Thread Bret Foreman
I tired setting the single-choice mode in my XML description of the
ListView and it didn't change the behavior at all.

On Sep 20, 8:10 pm, Zarah Dominguez  wrote:
> What about using the choiceMode attribute for a ListView?
>
> http://developer.android.com/reference/android/widget/ListView.html#s...)
>
> I have tried using CHOICE_MODE_MULTIPLE and it works.  I am guessing
> CHOICE_MODE_SINGLE would act like an ACTION_PICK.
>
> -Zarah.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Anyone else ever submitted to Motorola Shop4Apps? I did and so far it seems dismal - share your experience?

2010-09-20 Thread Bret Foreman
The real point of Shop4Apps is to sell localization services and then
sell the localized apps in regions that are not covered by the
Marketplace. It only makes sense if you are looking for someone to
localize your app (for a fee) in one of their big markets, China or
Brazil, and then sell it there.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Getting a View to redraw when parameters change

2010-09-20 Thread Bret Foreman
Specifically, these are TableRows and I've changed setMinimumHeight. I
want the rows to redraw with new heights.

On Sep 20, 9:28 pm, TreKing  wrote:
> On Mon, Sep 20, 2010 at 10:27 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlightingwrote:
>
> > I want to get a set of Views to redraw after I change some drawing
> > parameters.
>
> What are "drawing parameters"?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Anyone else ever submitted to Motorola Shop4Apps? I did and so far it seems dismal - share your experience?

2010-09-21 Thread Bret Foreman
I didn't say it was an advantage, only that it was the point of
Shop4Apps. I suppose there may be some apps that will sell better when
localized. If you don't think your app is in that category, then the
only other advantage of Shop4Apps is marketing/sales in some countries
where the Marketplace doesn't cover.

On Sep 21, 7:27 am, niko20  wrote:
> But I don't see any "advantage" to localization in China. Over there
> even schoolchildren are taught how to read and speak English.
>
> -niko
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: overriding Home button

2010-09-21 Thread Bret Foreman
This group is for application development and I think you want the
platform development group.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: horizontal scrolling in GridView control

2010-09-21 Thread Bret Foreman
It seems like a TableLayout inside of a ScrollView would do this. Or
am I missing something?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: how to start a "stop" activity

2010-09-21 Thread Bret Foreman
I was in a relationship like this once...

"You want to make it such that when a user explicitly navigates away
from your app, it pops right back up 3 seconds later?"

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: To apply a background to a Button

2010-09-21 Thread Bret Foreman
I think a PictureButton might be useful for this.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Is it worth writing a ContentProvider and using CursorAdapter for this case?

2010-09-21 Thread Bret Foreman
And you can extend Cursor to add your own special sauce. I have one
that works on top of a REST-ful database rather than SQLite.

>
> Also not that as far as I know CursorAdapter doesn't have a dependency on
> there being a content provider.  It just wants a Cursor, which you can get
> from any SQLite database.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: A Problem about developing with GPS module

2010-09-21 Thread Bret Foreman
A trick that I've found works on some phones is to register the
listener and de-register it once a minute. Android seems to kick off a
GPS measurement right after the listener is registered.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: New to Developing, Need Insight

2010-09-21 Thread Bret Foreman
One of the most original musical minds of the 20th century was Don Van
Vliet aka Captain Beefheart. His music was so unusual that experienced
musicians had trouble approaching it. He preferred to find non-
musicians and train them from zero. Android is like that - it's almost
better to come at it without the expectations that an experienced
programmer would have.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: LVL returns LICENSED with anonymous accounts...

2010-09-22 Thread Bret Foreman
I would love to see this information set out in tabular form. I'm
always suspicious of a missing case until I see a truth table of the
logic.

On Aug 6, 4:26 pm, Trevor Johns  wrote:
> If an app is not published AND not draft, then you'll get
> ERROR_NOT_MARKET_MANAGED.
>
> If an app is in draft (never published), then we send LICENSED for all
> requests for that app.
>
> If an app is published (or has been published then unpublished), then
> the response
> is driven by the dev console settings for the developer/testers, and purely
> by purchase history for everyone else.
>
> --
> Trevor Johns
> Google Developer Programs, Androidhttp://developer.android.com
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: gps and wifi

2010-09-22 Thread Bret Foreman
Tre,

I think he's talking about finding location from the GPS (by
satellite) or from the network (by base station and sector). He's
trying to manage which mode to use in which situation and how/when to
switch.

On Sep 22, 7:44 am, TreKing  wrote:
> On Wed, Sep 22, 2010 at 6:30 AM, student  wrote:
> > my problem is if user came back to room it should be indicated the network
> > by comparing the frequency or  speed with gps?
>
> I'm sorry ... what?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: best place to host apps that target indian market.

2010-09-22 Thread Bret Foreman
I believe Motodev/Shop4Apps covers India for paid apps.

On Sep 22, 8:23 am, Vijay Vikrant  wrote:
> Hello,
>
>         Since the market is not open to India for paid apps - What will be a
> good server/store to host paid apps that target indian audiences?
>
> Many Thanks,
> Vikrant

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: horizontal scrolling in GridView control

2010-09-22 Thread Bret Foreman
I think this will be much easier in Java. Then you can set the
onClickListener as you create the widgets.

ScrollView contains TableLayout contains Table Rows contain TextViews
and ImageViews (each with the onClickListener set for the right
action)


On Sep 22, 11:32 am, nextgen  wrote:
> I'm not 100% sure, but I think it would do only most of it.  I need
> each row to contain 17 individual "cells", each with multiple widgets
> (like an imageview and a textview).  Then I need each one of those 17
> "cells", in each of 32 rows, to be clickable, so that I can record
> some data and change the background of the "cell" when clicked.
>
> So would something like this work?:
>
>          xmlns:android="http://schemas.android.com/apk/res/android";
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:stretchColumns="1">
>         
>                                          android:layout_height="20px"
>                         android:background="#FF">
>                                                          android:text=id="@+id/week1"
>                                 ... />
>                                                          android:id="@+id/icon1"
>                                 .../>
>                 
>
>                 ... (repeat for views 2-17)
>
>         
>
>         ... (repeat for rows 2-32)
>
> 
>
> Couple concerns/questions about this:
>
> - Isn't this a lot of static XML for something that seems to be
> calling out for a more data-driven grid-like view?
> - If this is the answer, how can I trap a click for each of the Views
> (not just widget within a view), and know exactly what row and
> "column" of this thing has been clicked?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Programatically determine the value of the call timer?

2010-09-23 Thread Bret Foreman
Why not just instantiate a Java Timer when the call starts and time
the call yourself? Just call setToNow() when you want a timestamp.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: New to Developing, Need Insight

2010-09-23 Thread Bret Foreman
I'll stand by Tre on this. He's given me a lot of good advice in this
forum.

On Sep 23, 7:29 am, TreKing  wrote:
> On Thu, Sep 23, 2010 at 1:12 AM, Miguel Morales 
> wrote:

> More often than not, though, I'm actually trying to help the poster, either
> by directing them to where they can find an answer, asking them to clarify
> their question so they can get a good answer, or providing an answer
> directly.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to bring stop activity to foreground (restart) by itself ??

2010-09-23 Thread Bret Foreman
Why not just pop up some toast? That's what it's for.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: AutoCompleteTextView performance

2010-09-23 Thread Bret Foreman
I'm not sure if you have control over the db schema but creating an
index on the station column in the table is surely what you want to do
if you can. I can paste the SQL to do it if you like.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] GeoCoding fails after SDK upgrade to 8

2010-09-24 Thread Bret Foreman
I recently upgraded my SDK from 7 to 8. One of my applications uses
Google GeoCoding, specifically the Geocoder object. After the upgrade,
when I call the getFromLocation method, it doesn't return any
addresses and I see a message in the logcat to the effect that GLS
failed with status 20. My Google Maps API key is working fine because
I'm seeing the map tiles, but GeoCoding is broken. It works fine if I
run a previous (SDK 7) build of my app. Any ideas about what might be
wrong?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: GeoCoding fails after SDK upgrade to 8

2010-09-24 Thread Bret Foreman
I don't recall if Google's API code generator asks for the SDK
version. Could that be the 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 email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: GeoCoding fails after SDK upgrade to 8

2010-09-24 Thread Bret Foreman
It's the same on the emulator and on a real device.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: GeoCoding fails after SDK upgrade to 8

2010-09-24 Thread Bret Foreman
Oh, and both the phone and emulator are Android 2.2.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to prevent phone from sleeping

2010-09-27 Thread Bret Foreman
Be careful with wake-locks. As you would expect, they chew up battery
power fast. If your app doesn't provide some obvious benefit in return
for the reduced battery life you will garner fiercely bad reviews in
the Marketplace.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to prevent phone from sleeping

2010-09-27 Thread Bret Foreman
If you just need to count you could set up a periodic Timer.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: "Proguard, Android, and the Licensing Server", or...

2010-09-27 Thread Bret Foreman
It's not what developers are too lazy to do. It's what customers are
willing to pay for.

On Sep 27, 9:18 am, Xavier Ducrohet  wrote:

> Honestly, if a developer is too lazy to learn how to use proguard then
> he/she shouldn't use it. There are very few things in development when
> you can press a button and have it do the right thing without having
> to configure anything.
>

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Passing arguments to JSON c# .net web service

2010-09-27 Thread Bret Foreman
You shouldn't need to mess with the XML directly. Just use the Android
JSON libs: http://developer.android.com/reference/org/json/JSONObject.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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Debugger suddenly can't see my device

2010-09-27 Thread Bret Foreman
I was debugging away and moved my phone a bit and the debugger lost
contact. I figured it was just a loose USB so I reseated the cable and
attempted to restart the debugger. Now the debugger can't find my
phone. I can manage the phone from DDMS without any problem so it's
not a phone, cable, or driver issue. Something went wacko in the
debugger setup. When I go to Run Configurations in Eclipse, the phone
is simply not in the list of choices. Any ideas where I can look for
what's wrong?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Debugger suddenly can't see my device

2010-09-27 Thread Bret Foreman
Stopped and restarted the adb server and that didn't make a
difference. The debugger still can't see the device, although it's
perfectly manageable from DDMS. Any other ideas?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Is SQLite built for concurrency on Android?

2010-09-27 Thread Bret Foreman
I would expect locks to be expensive only in the case where there was
actually a lot of lock contention. But excessive lock contention is
usually the sign of a poorly thought-out schema.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Debugger suddenly can't see my device

2010-09-27 Thread Bret Foreman
I've tried that several times. I think something in my adb setup
became corrupted when I the connection to the phone was interrupted.
Is there a config file for adb somewhere?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Debugger suddenly can't see my device

2010-09-27 Thread Bret Foreman
Restarting my computer fixed the problem. Must have been a broken lock
file or some such.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to draw a curve connecting three points?

2010-09-28 Thread Bret Foreman
Three points can define any conic section - parabola, ellipse, or
circle.

On Sep 28, 7:47 am, Kostya Vasilyev  wrote:
>   Beziers are defined by four points, and OP has three.
>
> A circle, on the other hand, is completely defined by three points
> (except in degenerate cases: points on top of one another, or on a
> straight line).
>
> So if it's a circle segment (== arc) you want, derive its center and
> radius (and arc angles) from your points.
>
> -- Kostya
>
> 28.09.2010 15:23, David Erosa García пишет:
>
>
>
> > On Tue, Sep 28, 2010 at 12:53 PM, Navaneeth  wrote:
> >> Hi folks,
>
> >> I would like to draw a curve(an arc) connecting three points in my
> >> screen
> >> PointA = (480,46) PointB = (160,137) PointC = (0,228)
>
> >> How to draw the curve using Android APIs ?
> >> Please Help..
> > You may want to check Path.cubicTo to generate a Bezier curve:
>
> >http://developer.android.com/reference/android/graphics/Path.html#cub...,
> > float, float, float, float, float)
>
> >> Thanks,
> >> Sen
>
> >> --
> >> 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...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --http://kmansoft.wordpress.com

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] SDK 8 - Can't run adb logcat and Eclipse debugger at the same time

2010-09-28 Thread Bret Foreman
I upgraded to SDK version 8 and now I'm unable to run adb logcat and
the Eclipse debugger at the same time. The console message in Eclipse
(just after I run adb logcat) is:

[2010-09-28 12:29:26 - DeviceMonitor]Adb connection Error:An existing
connection was forcibly closed by the remote host
[2010-09-28 12:29:27 - DeviceMonitor]Connection attempts: 1

Adb logcat is reporting that the adb server is out of date and being
restarted.

Any idea why this might be happening?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: LVL licensing and versioning question

2010-09-28 Thread Bret Foreman
My understanding is that you test for a valid server response in your
code. So if you're not testing in the old code, it will run fine.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Display Latitude On button Click;

2010-09-28 Thread Bret Foreman
Read about the LocationManager:  
http://developer.android.com/reference/android/location/LocationManager.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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] The deadly SQLite error 19

2010-09-28 Thread Bret Foreman
I knew it was bound to happen eventually. I'm getting the deadly
SQLite error 19 "constraint failure" when trying to do an
insertOrThrow. Here's the string that creates the table:

protected static final String dbColUid = "UID";
protected static final String dbColParentName = "parentName";
protected static final String dbColParentId = "parentId";
protected static final String dbColObjectName = "objectName";
protected static final String dbColObjectId = "objectId";
protected static final String dbColChosen = "chosen";
protected static final String dbColSyncStatus = "syncStatus";

private static final String databaseCreate =
"create table if not exists " + tableName + " ( " +
dbColUid + " TEXT PRIMARY KEY, " +
dbColParentName + " TEXT, " +
dbColParentId + " TEXT," +
dbColObjectName + " TEXT, " +
dbColObjectId + " TEXT," +
dbColChosen + " INTEGER," +
dbColSyncStatus + " INTEGER" +
" );";

Here's the insert code:

ContentValues insertContent = new ContentValues();
insertContent.put(dbColUid, uid );
insertContent.put(dbColParentName, parentName );
insertContent.put(dbColParentId, parentId );
insertContent.put(dbColObjectName, objectName );
insertContent.put(dbColObjectId, objectId );
insertContent.put(dbColChosen, chosen );
insertContent.put(dbColSyncStatus, syncStatus );
return myDatabase.insertOrThrow(tableName, NONE ,
insertContent );

uid, parentName, parentId, objectName, and objectId are all strings.
chosen and syncStatus are ints.

Any ideas?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: The deadly SQLite error 19

2010-09-28 Thread Bret Foreman
That's it! Eagle-eye Murphy strikes again!

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: what function should i use to control memory in java

2010-09-28 Thread Bret Foreman
First, you don't normally have to manipulate raw memory addresses in
Java. There are classes like String, byte[], char[], and so forth.
There are also List classes for managing arrays of things. All these
classes have many methods that make manipulation of particular pieces
of memory simple. Second, there is no explicit memory allocation or de-
allocation outside the "new" operator. The virtual machine takes care
of de-allocating memory when an object goes out of scope. It's still
possible to "leak" memory, but the exact circumstances where that
happens are not a beginner Java topic.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Avoiding compression on large files

2010-09-29 Thread Bret Foreman
In many cases, I/O speeds are slower than decompression speeds. In
these cases, it's actually faster to load/decompress a compressed file
that just loading an uncompressed file. If you really want best
performance, you should profile your flash read speed versus your
decompression speed.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Launching application in Market

2010-09-30 Thread Bret Foreman
I create a (free) website for each app and put up a capture of every
screen. Then, as questions come in about a particular screen or
function, I add commends below the relevant screen shot on the
website. After a while, most questions have been answered on the
website and I can just email a link when a repeat question comes in.
Quite useful for reducing support load over time.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: PDF Libraries for android

2010-09-30 Thread Bret Foreman
http://www.icepdf.org/

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: PDF Libraries for android

2010-09-30 Thread Bret Foreman
But it does support Linux so an Android port seems at least feasible.

On Sep 30, 9:07 am, Mark Murphy  wrote:
> On Thu, Sep 30, 2010 at 12:03 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlighting
>  wrote:
> >http://www.icepdf.org/
>
> Note that this doesn't support Android, at least based on their list
> of supported platforms:
>
> http://www.icepdf.org/product/supported-platforms.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to Create ListView within ListView

2010-10-01 Thread Bret Foreman
It's not clear from the OP how many levels of data he has but XML
files are often more than two levels. From the ExpandableListView
docs:

"ExpandableListActivity hosts a ExpandableListView object that can be
bound to different data sources that provide a two-levels of data"



-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Running multiple activities in for loop one after the other - android

2010-10-01 Thread Bret Foreman
Use startActivityForResult and then chain them together so that each
result kicks off the next Activity.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: android design considerations: AsynchTask vs Service (IntentService?)

2010-10-01 Thread Bret Foreman
I use IntentService all the time and I think it's the simplest and
most robust way to do background work. At the end of the background
work, your IntentService broadcasts a custom Intent and you catch it
in whatever Activity needs to know the service finished (or none at
all).

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Bret Foreman
The best IntentService pattern I use is handling online web services,
which can take several seconds to respond. I launch IntentServices to
get data from various web services, and the data is placed in an
SQLite db. The IntentService broadcasts a message back to the UI
activity when it's done and the UI picks up the data from SQLite. In
this way, the UI can populate various Views with data as it comes in
from various web services (and show a default message/image in the
view while it waits). The whole process is fairly simple, very robust,
and looks good to the user.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Getting my Views to re-draw

2010-10-03 Thread Bret Foreman
I have a set of views that are populated with data from an online
database. The context menu has a "refresh" choice that re-reads the
online database and updates some attributes of the views, like setText
and setChecked for some buttons. After the various setTexts and such,
I invalidate the Views. However, they are not immediately redrawn. In
fact, they don't get redrawn at all unless something like a rotation
happens to cause a redraw of the screen. How can I initiate an
immediate redraw after the refresh is complete?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: The Market App has a CACHE !

2010-10-03 Thread Bret Foreman
Given the global scale of the Marketplace, some update latency is to
be expected. There is, no doubt, a central master database of
applications but you can bet that the database is replicated out to
dozens of local copies around the globe. This replication process is
usually completely decoupled from any application updates you might
make, which means your app gets pushed out in a few minutes or a few
hours, depending on where you happen to be in the schedule.

So it's not caching in the sense of getting a web page to load faster.
It's management of Wide Area Network links to optimize their use. The
goal is to use the lowest speed links you can get away with, keep them
"full" of data 24/7, and still have pretty fast download speeds from
the local copies of the data.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Getting my Views to re-draw

2010-10-03 Thread Bret Foreman
I'm pretty sure the update code is getting called. But possibility
number two seems likely. I'll look into that.

By the way, Mark, I'm in San Francisco. Are you here in town for the
CTIA show this week?

On Oct 3, 10:38 am, Mark Murphy  wrote:
> It should happen automatically. You should not even need the
> invalidate() call. A couple of possibilities:
>
> -- Your update code is not being called
>
> -- Your update code is updating the wrong widgets (e.g., for a
> previous instance of the activity that was destroyed and recreated for
> a configuration change, like a rotation)
>
> On Sun, Oct 3, 2010 at 1:32 PM, Bret 
> Foremanbegin_of_the_skype_highlighting end_of_the_skype_highlighting
>  wrote:
> > I have a set of views that are populated with data from an online
> > database. The context menu has a "refresh" choice that re-reads the
> > online database and updates some attributes of the views, like setText
> > and setChecked for some buttons. After the various setTexts and such,
> > I invalidate the Views. However, they are not immediately redrawn. In
> > fact, they don't get redrawn at all unless something like a rotation
> > happens to cause a redraw of the screen. How can I initiate an
> > immediate redraw after the refresh is complete?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] DDMS and Eclipse debugger in SDK 8

2010-10-04 Thread Bret Foreman
Since upgrading to SDK 8 I cannot use the Eclipse debugger and DDMS at
the same time. The error I get in the Eclipse console when I start
DDMS is:

[2010-10-04 08:00:12 - DeviceMonitor]Adb connection Error:An existing
connection was forcibly closed by the remote host
[2010-10-04 08:00:13 - DeviceMonitor]Connection attempts: 1

After this error, the Eclipse debugger cannot attach. The only way to
fix it is to shut down DDMS and Eclipse and restart Eclipse. This is
quite inconvenient. Anyone know a way to fix this or at least a better
way to manage it so I don't have to restart Eclipse?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: thousands of strings

2010-10-04 Thread Bret Foreman
I've tried it both ways that Mark describes and I highly recommend you
package it in your /res folder if you can stand the increased
application memory footprint. You can't be sure that your user has
network connectivity all the time and handling the various cases of no/
intermittent/slow network connectivity creates a lot of complexity.

On Oct 4, 7:17 am, Mark Murphy  wrote:
> 2010/10/4 Éva Lovrencsics :
>
> > Ok, but how can I fill the database with my thousands of strings?
>
> Option #1: Download the database
>
> Option #2: Package the database in assets/ or res/raw/ and copy it to
> the local file system
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Optimizing TextView creation

2010-10-04 Thread Bret Foreman
My app creates a lot of TextView objects and this turns out to be
really slow. A look at the traceview output reveals that the bulk of
the time is spent in the TextView methods that grab all the default
parameters from /res and /util. The thing is, all my TextViews share
99% of these parameters. Is it possible to clone a TextView rather
than create one from scratch? If not, what about if I created a pool
of TextView objects and reused them?

Just to give some context, I'm generating a spreadsheet to show some
data provided from an online source and the spreadsheet can be as big
as 20 columns by 50 rows = 1000 cells, each with a TextView. It takes
about 25 seconds just to create 1000 TextViews on my Moto Droid.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: thousands of strings

2010-10-04 Thread Bret Foreman
Mark,

You're googling under the wrong search terms. Dope vectors were
developed by the Three Stooges. You need to search for Larry, Curly,
and Moe.


On Oct 4, 9:51 am, Mark Murphy  wrote:
> On Mon, Oct 4, 2010 at 12:38 PM, DanH  wrote:
> > Background in algorithms???  It's a Programming 101 problem -- anyone
> > with a modicum of programming skill should be able to do it.
>
> You make a few assumptions, in terms of background and experiences,
> that may or may not be accurate.
>
> > It's no
> > harder than writing the program to read lines from a file and write
> > them to a database -- the only real difficulty is navigating through
> > the maze of Java classes you need to do file access.
>
> The lines of code count is probably somewhat longer. More importantly,
> though, the database solution is well-trod ground, with quite a few
> samples. "Dope vector" has remarkably few hits on search engines, let
> alone any code that can be readily applied in this case. Now,
> admittedly, not every occurrence of this pattern may use that term --
> when I used a variant on this approach on the Apple IIe in the late
> 1980's, I had not heard of the term.
>
> Perhaps you would like to contribute, by either augmenting the dope
> vector Wikipedia page, or by creating a couple of Java classes for
> creating and reading dope vector files, to help make it easier for
> people to take advantage of your expertise in this area.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: DDMS and Eclipse debugger in SDK 8

2010-10-04 Thread Bret Foreman
Bump. This has been a problem for several weeks now, I've posted a
help request here several times, and nobody seems to know what these
error messages mean. Is there a way I can send a support request
directly to Google?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] The ultimate, killer Android Marketplace replacement

2010-10-04 Thread Bret Foreman
It's not a technical issue. It's a business one. The first company
that works out agreements with most of the world's mobile carriers to
allow integrated billing for apps will quickly become the dominant
application channel. As soon as users can click on a "buy" button and
have the app charged to their phone bill as a monthly fee, all other
channels will wither away. 99 cent apps will become 10 cents per
month. Users will be able to turn off billing by uninstalling the app,
which will make them more willing to try out new ones. Apps that are
useful will generate recurring revenue for the developers for years.

The short message is that Android apps should be billed the same way
99% of the world pays for phone services - monthly and on a single
bill.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: DDMS and Eclipse debugger in SDK 8

2010-10-04 Thread Bret Foreman
Maybe this is another clue. In the middle of testing my app on my Moto
Droid (running Android 2.2), the device went offline and DDMS dumped
out this to the console. Maybe we're really looking at a device issue
instead of a tools issue. Hmmm.

42:02 E/DDMS: device (040369861601C00A) request rejected: device
offline
java.io.IOException: device (040369861601C00A) request rejected:
device offline
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:726)
at
com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:363)

at com.android.ddmlib.Device.executeShellCommand(Device.java:
275)
at
com.android.ddmuilib.SysinfoPanel.loadFromDevice(SysinfoPanel.java:15
6)
at
com.android.ddmuilib.SysinfoPanel.deviceSelected(SysinfoPanel.java:12
3)
at
com.android.ddmuilib.SelectionDependentPanel.deviceSelected(Selection
DependentPanel.java:52)
at com.android.ddms.UIThread.selectionChanged(UIThread.java:
1662)
at
com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:753
)
at
com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:741
)
at com.android.ddmuilib.DevicePanel.access
$1100(DevicePanel.java:56)
at com.android.ddmuilib.DevicePanel
$1.widgetSelected(DevicePanel.java:36
0)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown
Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown
Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown
Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown
Source)
at com.android.ddms.UIThread.runUI(UIThread.java:484)
at com.android.ddms.Main.main(Main.java:105)

C:\Program Files\Motorola\MOTODEV Studio for Android 1.2\android-sdk-
windows\too
ls>ddms
42:27 E/DDMS: device (040369861601C00A) request rejected: device
offline
java.io.IOException: device (040369861601C00A) request rejected:
device offline
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:726)
at
com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:363)

at com.android.ddmlib.Device.executeShellCommand(Device.java:
275)
at
com.android.ddmuilib.SysinfoPanel.loadFromDevice(SysinfoPanel.java:15
6)
at
com.android.ddmuilib.SysinfoPanel.deviceSelected(SysinfoPanel.java:12
3)
at
com.android.ddmuilib.SelectionDependentPanel.deviceSelected(Selection
DependentPanel.java:52)
at com.android.ddms.UIThread.selectionChanged(UIThread.java:
1662)
at
com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:753
)
at
com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:741
)
at com.android.ddmuilib.DevicePanel.access
$1100(DevicePanel.java:56)
at com.android.ddmuilib.DevicePanel
$1.widgetSelected(DevicePanel.java:36
0)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown
Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown
Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown
Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown
Source)
at com.android.ddms.UIThread.runUI(UIThread.java:484)
at com.android.ddms.Main.main(Main.java:105)

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: thousands of strings

2010-10-04 Thread Bret Foreman
I do this in one of my apps and it runs fine in an AsyncTask without
the user ever being aware. But it's a navigation overlay database so
it's loaded in place by the time the user actually wants to do
anything.

On Oct 4, 2:11 pm, DanH  wrote:
> Only don't load it from an array and create the DB on first use --
> it'll take 5 minutes, which doesn't create a very good first
> impression.
>
> On Oct 4, 3:46 pm, Robert  wrote:
>
> > This is a perfect case for using androi's built in sqlite database!

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using Allocation Tracker in DDMS

2010-10-04 Thread Bret Foreman
I have an Activity that is running out of memory in CreateSurface. The
logcat looks like this:

10-04 17:55:52.574: ERROR/SurfaceFlinger(1086): createSurface()
failed, generateId = -12
10-04 17:55:52.574: WARN/WindowManager(1086): OutOfResourcesException
creating surface
10-04 17:55:52.574: INFO/WindowManager(1086): Out of memory for
surface!  Looking for leaks...
10-04 17:55:52.574: WARN/WindowManager(1086): No leaked surfaces;
killing applicatons!
10-04 17:55:52.574: WARN/ActivityManager(1086): Killing processes Free
memory at adjustment 0

I'm trying to use DDMS to figure out what's going on but when the
application gets killed DDMS aborts the Allocation Tracker.

Is there a way to cause the application to do a core dump and is there
a tool for analyzing dumps?

I have SDK version 8, which does not allow simultaneous use of DDMS
and the Eclipse debugger so I need to get creative.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: DDMS and Eclipse debugger in SDK 8

2010-10-04 Thread Bret Foreman
It's not a device problem. It fails with the emulator too. I
uninstalled my SDK and re-installed and it didn't fix the problem. Not
sure what to try next.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using Allocation Tracker in DDMS

2010-10-04 Thread Bret Foreman
I figured out a workaround to get the Allocation tracker to capture
the memory stats. The bad news is that it doesn't appear that I'm
allocating anything very big. I'll start a new thread to see if anyone
can suggest how to debug it.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Out of memory in CreateSurface - maybe a bug?

2010-10-04 Thread Bret Foreman
I have an Activity that is running out of memory in CreateSurface. The
logcat looks like this:

10-04 18:33:06.185: ERROR/SurfaceFlinger(1086): createSurface()
failed, generateId = -12
10-04 18:33:06.185: WARN/WindowManager(1086): OutOfResourcesException
creating surface
10-04 18:33:06.185: INFO/WindowManager(1086): Out of memory for
surface!  Looking for leaks...
10-04 18:33:06.185: WARN/WindowManager(1086): No leaked surfaces;
killing applicatons!
10-04 18:33:06.185: WARN/ActivityManager(1086): Killing processes Free
memory at adjustment 0
10-04 18:33:06.185: WARN/ActivityManager(1086): Killing
ProcessRecord{449ccbf8 12903:com.quickdroid/10064} (adj 0): Free
memory
10-04 18:33:06.185: WARN/WindowManager(1086): Looks like we have
reclaimed some memory, clearing surface for retry.
10-04 18:33:06.185: WARN/WindowManager(1086): Due to memory failure,
waiting a bit for next layout
10-04 18:33:06.443: INFO/WindowManager(1086): WIN DEATH:
Window{44a5fa98 Internal Logic Error paused=false}
10-04 18:33:06.706: INFO/WindowManager(1086): WIN DEATH:
Window{44a45658 Internal Logic Error paused=false}
10-04 18:33:06.708: INFO/WindowManager(1086): WIN DEATH:
Window{44933ac0 Internal Logic Error paused=false}
10-04 18:33:06.708: INFO/WindowManager(1086): WIN DEATH:
Window{4492c128 Internal Logic Error paused=false}

The Allocation Tracker doesn't show any unusual memory usage right up
to the end of my onCreate method where I placed a breakpoint. Allowing
the framework to proceed with drawing generates an exception as seen
above and the application is killed.

The phrase "Internal Logic Error" makes me wonder if I've hit a 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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Can't Find R.java

2010-10-05 Thread Bret Foreman
R.java is a generated file, not one you create. It should be refreshed
whenever you do a build.

On Oct 5, 7:51 am, adel zalok  wrote:
> Hello,
>
> I wanted to use the ApiDemos in the SDK samples but I have a problem
> in finding the R.java file, I don't know why is it missing ??
>
> Thanks in advance.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] createSurface fails with out-of-memory exception

2010-10-05 Thread Bret Foreman
I'm creating a screen with about 120 TextViews in a grid pattern -
about 3 screens worth. The TextViews are arranged in TableRows inside
a TableLayout inside a ScrollView. I'm not using a GridView because it
doesn't scroll correctly for my application.

In the Allocation Tracker I can see that my onCreate takes about 46K
of memory, which seems modest. However, I'm getting an out-of-memory
exception from inside the Android framework in the createSurface
method.

I'm trying to figure out how to diagnose the memory usage of
createSurface to see which of my Views is chewing up all the memory.
Maybe it's a programming error on my part or maybe it's a bug in the
Android framework. I just can't tell.

The exception causes the application to be killed, which aborts the
Allocation Tracker so I can't really see what's going on inside
createSurface.

I'm thinking maybe I should override createSurface and surround the
call to the super with a catch block. Then I can stop it in the
debugger before the process is killed. Can anyone think of a more
clever approach? Has anyone else diagnosed createSurface memory
problems? Is there a reference document that describes how it works?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: createSurface fails with out-of-memory exception

2010-10-05 Thread Bret Foreman
Here's what the logcat looks like:

10-05 10:18:50.357: ERROR/SurfaceFlinger(1086): createSurface()
failed, generateId = -12
10-05 10:18:50.357: WARN/WindowManager(1086): OutOfResourcesException
creating surface
10-05 10:18:50.357: INFO/WindowManager(1086): Out of memory for
surface!  Looking for leaks...
10-05 10:18:50.357: WARN/WindowManager(1086): No leaked surfaces;
killing applicatons!
10-05 10:18:50.357: WARN/ActivityManager(1086): Killing processes Free
memory at adjustment 0
10-05 10:18:50.365: WARN/ActivityManager(1086): Killing
ProcessRecord{44949158 16303:com.quickdroid/10064} (adj 0): Free
memory
10-05 10:18:50.365: WARN/WindowManager(1086): Looks like we have
reclaimed some memory, clearing surface for retry.
10-05 10:18:50.365: WARN/WindowManager(1086): Due to memory failure,
waiting a bit for next layout

Note that the PID is 1086 so it's happening in some background thread.
The thing is, I don't know what class calls the createSurface method
so I'm having trouble catching the exception before it can kill the
process. Any ideas?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using Allocation Tracker in DDMS

2010-10-05 Thread Bret Foreman
Yes, it fails quite reliably. I'll package it up for you.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using Allocation Tracker in DDMS

2010-10-05 Thread Bret Foreman
Done. Bug 11709.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: createSurface fails with out-of-memory exception

2010-10-05 Thread Bret Foreman
On fadden's recommendation this is logged in issue ID 11709 on
b.android.com.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Ready to release first app. What now?

2010-10-05 Thread Bret Foreman
You forgot to mention if your app is free, paid, or ad-supported. One
way to handle the Lite versus Full version issue is to include ad-
support in the Lite version and no adds in the paid version.

As for piracy, consider how much time you spent to develop the app. If
you think it's unique and it took a lot of your time, then protect it.
If not, spend your effort on the next app.

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] getting SQLITE_SCHEMA exception

2010-10-05 Thread Bret Foreman
The following code (used to verify that a table exists) generates an
SQLITE_SCHEMA exception occasionally. This means the schema has
changed since the SQL statement was compiled.

It's noted in the SQLite documents that this only happens when using
sqlite3_prepare() and one should use sqlite3_prepare_v2() instead to
avoid this problem. Those function names refer to the C interface, not
Android Java. Does anyone know if Android's SQLiteDatabase.query
method uses sqlite3_prepare_v2() underneath? It would seem not. If
not, what is the recommended way to reliably query the list of tables
in a database?

String[] col = {"name"};
cursor = myDatabase.query(
/* table name */ "sqlite_master",
/* columns */ col,
/* select */ "type == 'table' AND name == '" + 
tableName +
"'",
/* selection args */ null ,
/* no grouping */ null,
/* no grouping filter */ null,
/* ordering */ null
  );

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: market error flood not helpful

2010-10-05 Thread Bret Foreman
I got food poisoning from contaminated peanut butter a couple years
ago. Can you fix that for me too while you're at it?

-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Horizontal GridView scrolling

2010-10-05 Thread Bret Foreman
The following GridView only scrolls vertically. Am I doing something
wrong?


http://schemas.android.com/apk/res/android";
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="100dp"
android:verticalSpacing="1dp"
android:horizontalSpacing="1dp"
android:stretchMode="none"
android:gravity="center"
android:scrollbars="horizontal|vertical"
>


-- 
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...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


<    1   2   3   4   5   6   >