Re: [android-developers] Re: Inyect Assistance data to the GPS

2011-01-24 Thread Frank Weiss
I think your answer lies in the Andorid source code
http://source.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

Re: [android-developers] POSTing to WebView

2011-01-24 Thread Frank Weiss
Admittedly, I haven't used WebView, but accorrding to the API docs, Content
loaded through this mechanism does not have the ability to load content from
the network. I suppose you should be using loadDataWithBaseURL instead.

http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String,%20java.lang.String,%20java.lang.String
)

-- 
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

Re: [android-developers] Re: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-19 Thread Frank Weiss
Ok its statically verifiable. I still suggest try catching the exception and
logging diagnostics.
On Jan 19, 2011 2:35 AM, RyanMcNally therealr...@gmail.com wrote:
 Does anyone have any suggestions on what diagnostics to add? The code
 is statically verifiable not to throw AIOOBEs, so I've got no idea
 what to check for at runtime.

 Given that there is no threading, the arrays are defined exactly once,
 and the same indices are successfully written to 8 lines earlier and
 read from 2 lines earlier, I don't know what to check for.

 On Jan 18, 10:07 pm, Frank Weiss fewe...@gmail.com wrote:
 I suggest catching the AIOBE and adding your own diagnostics, via a
toast,
 log, or analytics 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] Read Response from PHP server

2011-01-18 Thread Frank Weiss
You may have already figured this out.

String bytesSent;

is a valid field definition, but the following line:

httppost = new HttpPost(serverURL);

is a statement and belongs in a method or initialized block.

-- 
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

Re: [android-developers] Re: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-18 Thread Frank Weiss
I suggest catching the AIOBE and adding your own diagnostics, via a toast,
log, or analytics 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

Re: [android-developers] Re: XML layout vs. programmatic

2011-01-15 Thread Frank Weiss
Well, I would not have anything against programmatic layouts per se. Indeed,
I've written a couple of layout managers for custom layouts that the
standard layout managers were not designed for. However, one of them was
driven by an XML configuration file,

-- 
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

Re: [android-developers] Re: How best to query web repeatedly.

2011-01-15 Thread Frank Weiss
I would suggest being more flexible about *when* the queries are made. You
seem to have fixated on every 50 meters. Why not every two minutes? Or every
n minutes, depending upon the current network latency? Or even a heuristic
scheduler based on multiple factors? I would also suggest considering
decoupling the activity from the provider. Perhaps by using a separate
service that pushes new queries to the activity. Avoid creating your own
threading framework.

-- 
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

Re: [android-developers] Re: exit strategy

2011-01-15 Thread Frank Weiss
Another problem with bluntly killing the app's process is that Android keeps
information about the app's state elsewhere.

-- 
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

Re: [android-developers] Re: searching in HUGE SQLite database

2011-01-14 Thread Frank Weiss
As I recall, there were no indexes on the table. Without indexes I would
expect most every query on a very table to be very slow.

-- 
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

Re: [android-developers] XML document parsing using the DOM API

2011-01-07 Thread Frank Weiss
This is a familiar question on the Android SDK forum, yet has little to do
with the SDK. Better to search the web where the subject of parsing XML with
Java is covered more broadly.

I would suggest using the SAX push or the SAX pull parsers instead of the
document builder (DOM) parser. All are available in the Andorid SDK, but the
latter scales poorly and uses more memory.

-- 
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

Re: [android-developers] How to gracefully terminate a remote service process?

2011-01-07 Thread Frank Weiss
This is a problem that the Google engineers have acknowledged. As you
probably know, the issue is that the Android OS does delayed garbage
collection of - and possibly reuses -  dead porcesses,  however the
process name remains that of the last app it hosted, as reported via DDMS or
via phone's running processes.

Forcefully killing the process may seem to placate your users, but as you
know is frowned upon by the Android engineers. Could you instead explain
that what they see is not a running process, but a process ready to run in
case they need the service soon. It's really a lot like a hybrid car at a
stop sign. The ignition is on, but the engine isn't running, but can start
up instantly if you press on the gas.

-- 
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

Re: [android-developers] How to gracefully terminate a remote service process?

2011-01-07 Thread Frank Weiss
I want to say thank you to Dianne Hackborn for correcting my mistaken
assumption that an Android process could serially host different apps. I'll
have to take some time to study how the Android OS manages processes and the
DVK someday.

-- 
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

Re: [android-developers] Downloading file and asynctask opinion needed

2011-01-06 Thread Frank Weiss
I suggest using AsyncTask for that, but keep it in the activity instead of a
service.

-- 
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

Re: [android-developers] eula with asynctask ?

2010-12-30 Thread Frank Weiss
I suppose the main problem is you are expecting the Eula.show() method to
block.

Looking at the referenced code, it is evident that the object you pass to
the show() method should implement the Eula.OnEulaAgreedTo interface (line
69). That interface declares the callback for the acceptance of the EULA,
and I suppose it's in that callback method where you should start the
AsyncTask.

-- 
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

Re: [android-developers] Re: Converting Touch Inputs to Vectors

2010-12-30 Thread Frank Weiss
I suppose this is primarily an issue of a smoothing algorithm. That is,
transforming a dense list of 2D vectors into a shorter list of lines and/or
arcs that approximate the input to a desired level of accuracy/quality. This
would probably be a bulk algorithm (at least in concept) but perhaps there
are some streaming/incremental solutions.

Googling for that might help.

-- 
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

Re: [android-developers] Re: CPU cost of a semi-infinite loop

2010-12-29 Thread Frank Weiss
I'd look into Kostya's suggestion. Ideally, you only need the click sample
and you can program the audio player to play the sample at precise
intervals.

Trying to do precise timing with SDK programming is just frought with
pitfalls, AFAIK.

-- 
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

Re: [android-developers] How implement LBS in Android

2010-12-29 Thread Frank Weiss
Agreed, creating and keeping a POI database up to date is difficult. AFAIK
Google Places is one attempt at a universal solution and there are others
being considered.

Tell us, what particular POIs are you interested in and for what kind of use
cases? What are the limitations of Google Places API (I haven't studied it)?
Is it just that it's not supported on Android? Could you access it from your
web server?

-- 
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

Re: [android-developers] example on asynctask class..

2010-12-29 Thread Frank Weiss
I'm assuming you've studied this article very carefully:
http://developer.android.com/resources/articles/painless-threading.html

Please ask a question about a specific problem you're having.

-- 
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

Re: [android-developers] AsyncTask why not must be created in UI thread?

2010-12-28 Thread Frank Weiss
It's difficult to understand what you are asking. What problem are you
having with AsyncTask.

-- 
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

Re: [android-developers] New Application - advice on how to get started?

2010-12-28 Thread Frank Weiss
Ouch: no Java experience.

I'd suggest you start with the Hello Mapview app. You're also going to need
some expertise setting up your db-backed web server. And then sending a
retrieving data from it via Java networking code.

As your team developed anything similar, mobile or not?

-- 
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

Re: [android-developers] How implement LBS in Android

2010-12-28 Thread Frank Weiss
There are of course many Android LBS apps to date. Most of them use their
own proprietory databases.

-- 
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

Re: [android-developers] yahoo local search xml reply in android

2010-12-28 Thread Frank Weiss
You may want to check the Yahoo forums.

Parsing XML is a far more general subject than questions about the Android
SDK. So google is you friend, my friend.

The Android SDK provides three packages for parsing XML:

java.xml.parsers (DOM)
org.xml.sax (SAX push)
org.xml.saxpull.v1 (SAX pull)

-- 
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

Re: [android-developers] Re: store string array in database

2010-12-27 Thread Frank Weiss
True, you can store a set of weekdays in a single column, but the real
question should be what kind of queries would you make regarding that
column. Consider if that column may be used in join, where, order by, etc.
On Dec 27, 2010 3:49 AM, pramod.deore deore.pramo...@gmail.com wrote:
 Thank you Sir.

 On Dec 27, 4:41 pm, Mark Murphy mmur...@commonsware.com wrote:
 Option #1: Use an INTEGER column and bit positions for the different days

 Option #2: Serialize the strings into a comma-separated list or
 similar structure and store the result in a TEXT column

 On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore deore.pramo...@gmail.com
wrote:
  Hi, I have a String array (which contains some day  from Monday -
  Sunday). But which days are stored is decided at runtime means
  sometime it want to store all day or sometime 1 or none. Now I want to
  store this array in database. How to save array of string in database?
  Or should I create 7 columns in that table?

 --
 Mark Murphy (a Commons Guy)http://commonsware.com|
http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] Cursor.getString() truncating Strings issue

2010-12-27 Thread Frank Weiss
logcat may be truncating, have you also tried

 Log.i(TAG,contents from cursor =
+cursor.getString(Additives.DESCRIPTION_COLUMN).length());

-- 
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

Re: [android-developers] Re: How to store date and time in database

2010-12-27 Thread Frank Weiss
milliseconds from midnight jan 1 1970 UTC to midnight dec 27 2010 UTC plus
miliseconds from midnight dec 27 2010 UTC to 15:57 27 dec 2010 UTC

-- 
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

Re: [android-developers] how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
OK, so how hard was it to google android polygon?

The tougher question may be do you already have the polygon as a vertex list
or do you just have an image that has a polygon?

-- 
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

Re: [android-developers] Re: how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
I suppose it seemed simple for me since I'm done it with AWT before.
Basically, you build up a Polygon object with vertices. You pass it to the
Graphics.draw method to display it (or not if you want an invisible hit test
layer over the image). You intercept click or touch events and use the
Polygon's inside() or contains() method to do the hit test.

Depending on the complexity and display size of the image, you may run into
some hit test accuracy issues due to the touch UI.

If you have the original artwork in Adobe Illustrator, you ought to be able
to get a vertex list therefrom. If not, google for a raster-to-vector tool
of your choice, for example:
http://freegeographytools.com/2007/converting-raster-area-images-into-polygon-shapefiles

-- 
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

Re: [android-developers] Re: how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
Vectoring parts of a photographic image is going to be more difficult than
the example I lnked.

I think you'l have to zoom the vertices in the polygon yourself, but you
might try using some drawing transformation methods - you may have to dig
deeper into OpenGL.

Now that you've given more problem details, maybe polygons isn't the only
approach. Are you trying to map the touch coordinates to a certain shade in
the man's arm, or to a particlar part of the arm? In the latter case, it
might work out to just use points for the center of each part (bicep,
tricep, elbow, etc.) and use an algorithm based on the distances of the
centers to the touch point. This may involve additional geometry skills,
such as dividing an area into regions based on such centroids. However,
sometimes looking at a problem from a different perwspective leads to a
better solution.

-- 
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

Re: [android-developers] Re: How do you manipulate content in an Activity from an external class or another Activity?

2010-12-26 Thread Frank Weiss
Or you could use the View-Adapter pattern. The adapter is responsible for
the data model changes and informs the view to redraw via notifications.

-- 
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

Re: [android-developers] Beginner type question on scope

2010-12-24 Thread Frank Weiss
What error does the compiler give?

The code you posted appears to be missing a ; between score++ and
break

-- 
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

Re: [android-developers] XmlSerializer issue

2010-12-24 Thread Frank Weiss
Eclipse has a Java debugger. Have you used it?

In my experience, breakpointing and stepping through code is the best way to
find out why code isn't working the way you expect it to.

-- 
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

Re: [android-developers] How to detect click on complex images/polygons

2010-12-24 Thread Frank Weiss
The first thing that comes to mind is java.awt.Polygon.contains(). I've used
it, but obviously with AWT and also with polygon data from
http://www.census.gov/geo/www/cob/

One approach then would be to find a similar Android polygon class that can
be used to draw and hit test your map and a way to convert the map's bitmap
image into a vector image, or at least a vector overlay for the bounds hit
test.

There are some ways you can get vector from a bitmap. I've used Visio by
putting the image on one layer and tracing out the vector shapes in another
layer, then writing some VB to export the shape vector data to XML. Do you
have Adobe CS? That might have some tools for converting bitmap shapes to
vectors. Or perhaps the image was originally authored with vectors?

There may also be some clever ways to do hit tests on the color values in
the bitmap.

-- 
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

Re: [android-developers] Suggestions on sharing code between standard Java Android

2010-12-24 Thread Frank Weiss
I don't have actual experience doing this in Android, but I can offer some
suggestions from general experience with Java and software archtecture.

How much can you exploit MVC? What part of the code is the View? How much of
the code is the Model?

If a large part of the code is the Model, that is the business rules, logic,
data conversion, etc., then there's a good chance that with some
refactoring, you can get that part of the code to run on Android after some
refactoring.

Unless the code was actually architected to run on different platforms -
which it probably wasn't, blinded by the sirens of WORA - chances are
there'll be some painful refactoring. BTW, is the existing code base covered
with unit tests? That would help.

My rule of portable code is: Code isn't portable until it's been ported.

-- 
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

Re: [android-developers] Re: My App should get information of every Http Get.

2010-12-24 Thread Frank Weiss
It's not possible from the SDK. You'll need to root the phone or run it on a
Wifi network with a packet sniffer or proxy.

-- 
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

Re: [android-developers] Listening to Home key Intent

2010-12-16 Thread Frank Weiss
An SDK application cannot have complete control over an Android device. You
need either build it into the firmware of devices you sell or let the user
update the device with your firmware.

-- 
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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Are you debugging Android OS or Android SDK 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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Well, our perception of Eclipse is 180 degrees from mine. I'm curious, what
did you meant by beast?

In the OP you asked about setting breakpoints right in the code. In Eclipse
debugger (and just about every GUI debugger, including Firebug) you just
double click in the left margin of the source code line to set a breakpoint,
which is indicated by a small dot in the left margin. When the breakpoint
fires, Eclipse highlights that line. From there you can inspect variables,
the stack, etc. and step through the code. I've debugged with the command
line before, but once I started debugging with Eclipse, Visual Studio, and
Firebug, I would think that having to use a command line debugger is
painful.

-- 
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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Thanks for the reply. I can understand your perspective about working from
the command line. Tools are just tools, it's how well we use them and how
productive we are with them that counts.

I'm sorry I can't help much with your question. If you're patient maybe
another person will help you with 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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-14 Thread Frank Weiss
I'm surprised no one has answered.

Learn how to us the Eclipse debugger.

Fall in love with the Eclipse debugger.

-- 
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

Re: [android-developers] Querying battery status synchronously

2010-12-13 Thread Frank Weiss
Since the API apparently doesn't support a synchronous status, here's
another, somewhat more complicated option. Add a service to your app that
receives the status updates and stores them in the app's preferences, or
somesuch. Then your app can get the most recent value synchronously. Note
that the service would only run when an update is broadcast, but even if
your app's activities are not in the foreground. The complicated part is
handling all the corner cases - reboot, app update, etc.

-- 
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

Re: [android-developers] Re: layout editor in 2.3 SDK sucks! Sorry but it does.

2010-12-12 Thread Frank Weiss
Just a thought...

I wonder if any of the developers who are passionate about using the
notoriously buggy ADT layout editor might consider being passionate about
contributing to its development. Correct me if I'm wrong, but the ADT is an
open source project, right?

-- 
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

Re: [android-developers] What to use instead of a very long ListPreference?

2010-12-11 Thread Frank Weiss
If there are 1,000 entries, perhaps you should consider a different UI
approach such as: map, autocomplete search, drill-down taxonomy, recents,
favorites, most popular, etc.

-- 
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

Re: [android-developers] Android WebView

2010-12-11 Thread Frank Weiss
I bit more info please. How many KB does high resolution mean? If you want
to store the images locally, why do you want the HTML to come from the
server? What does performance specifically mean, with respect to the user
experience?

-- 
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

Re: [android-developers] Re: Adapter fetches and parses RSS feed to get its data - best practice?

2010-12-11 Thread Frank Weiss
Interesting OOD question posed by the OP. If I understand the question
correctly, I would say it depends

In Android, the Adapter interface is a contract with a class that extends
AdapterView. This is noticably different that the Adapter Pattern, which
generally mediates between two incompatible interfaces. However, It's not
too unusual to have a class that is otherwise unrelated to a AdapterView go
ahead and implement Adapter or ListAdapter instead of having to add an
additional adapter class to mediate. A possible objection may be that if
other clients wish to access the model-ness of the class in question, they
would have to access it via the Adapter interface. This is, however, not
necessarily a problem as the class can easily expose other model-ness
interfaces or be itself a model.

As to single responsibility, I think a more important aspect of OOD with
respect to the design of a class is cohesiveness. It's a question of degree.
A class that does two things that are unrelated or unconnected would be
highly suspect.

-- 
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

Re: [android-developers] Adapter fetches parses RSS feed to get data - Best Practice?

2010-12-11 Thread Frank Weiss
Please see my answer in the repost of this thread.

-- 
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

Re: [android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-08 Thread Frank Weiss
I tend to agree with DanH as well as with Treking. Here's how I can agree
with both:

Best practices, object oriented design, design patterns,
performance, all tend to become *anti-patterns* when used to extreme. For
example, using a Singleton Pattern is considered a best practice by some
developers, but they sometimes fail to understand when and where to apply
it, creating unnecessary code. I think this is called the Golden Hammer
Anti-pattern, to wit: thinking that a particular pattern or technique is
universally applicable.

my $0.02

-- 
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

Re: [android-developers] Re: JPEG Image has a map

2010-12-07 Thread Frank Weiss
It just doesn't seem like a good idea to use Android Google map to display a
plan view of an apartment and call out POIs within it. On my Droid, at full
zoom-in, my apartment takes up about 1/12 of the screen. Also, if you placed
markers for POIs within your apartment, when you zoom out, they just overlap
and become useless. Is there really a compelling reason to mashup your
floorplan with all the features and layers of Google maps? Is is just a
specifc feature of GM you are interested in? What is that feature?

I suggest you use a different approach, like simply displaying the floorplan
as an image view, displaying markers on that, and providing whatever
detailed callouts you want. Chances are people are working on mobile CAD
apps like 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

Re: [android-developers] Re: How to differentiate a tap event generated by system or by user

2010-12-06 Thread Frank Weiss
Sounds a bit like an MVC problem. If the checkbox view is bound to a model
(adapter), only the user should be creating tap events. To programmatically
change the checkbox, change its state in the 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

Re: [android-developers] How to which function is calling a function at runtime?

2010-12-06 Thread Frank Weiss
As I recall, in Java there's a way to do this by throwing an exception and
catching it. The Exception object is supposed to allow you to access the
stack trace. See java.lang.Throwable.

-- 
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

Re: [android-developers] JPEG Image has a map

2010-12-05 Thread Frank Weiss
I'm assuming that by a JPEG or PDF sketch of your apartment you mean an
image of either the architectural plan or elevation, or else some kind of 3D
sketch of the exterior or interior of the apartment.

I'm assuming that you know the location of your apartment and can thus
obtain its geocode manually, perhaps by using http://mapper.acme.com.

It's not clear what you want to obtain by reverse geocoding. You should
already know the address of your apartment, so what kind of nearby addresses
are you interested in?

-- 
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

Re: [android-developers] Re: Proposal to Market Place

2010-12-02 Thread Frank Weiss
Good ideas, but as has been said, good luck with that.

Some observations, if I may:

1) A developer shouldn't rely so much on ratings for feedback. Built-in bug
reporting, email, a user network, a marketing site with user comments all
provide a better dialog than the market's half-ass rating system.

2) How much do ratings really influence users? Users are either looking for
ratings that support their prejudice (these are not your best users) or they
are looking for a consistent pattern. Your best users understand how ratings
can be gamed and can usually see through the nonsense. Also note that your
pitch in the Android Market is likely going to influence users as much as
the ratings. Do you have computer progammers write that, or do you hire
(read: invest in) an experienced copywriter?

3) Ratings are just a half-assed way of letting potential users sort out
apps on the market. Few, if any are actually objective. Imagine if the auto
industry relied on a rating system like that.

4) I might also note that eBay uses ratings entirely differently. They don't
rate the product. Perhaps that would be a better direction for the Android
Market.

-- 
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

Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Frank Weiss
Admittedly, I haven't read this thread in detail. It seems to me, that using
an MVC approach is called for. The controller (the click handler) shouldn't
be calling the view directly. The controller should call the model. The
model will update the view accordingly.

-- 
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

Re: [android-developers] Missing instance state when restoring dialogs

2010-12-02 Thread Frank Weiss
Use the onRestoreInstanceState() callback, not just onCreate().

-- 
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

Re: [android-developers] Re: Displaying unicode in a TextView?

2010-12-01 Thread Frank Weiss
It would help if you were more specific about the problem.

1) What Unicode character code are you setting in the TextView that displays
as garbage?
2) What exactly does garbage mean, rectangles, or unexpected characters like
upside down question marks, etc?
3) Please post the code you are using to get the contents over the network.
I suspect the issue is converting a stream of bytes to characters.

-- 
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

Re: [android-developers] What is the Android Sequence of Startup

2010-12-01 Thread Frank Weiss
There are a number of scenarios. The basic one is from the home page, but an
app can also run when the device boots, wakes up, an alarm fires, or when
another application sends an intent. The crux is the manifest which tells
the Android OS what interactions the app is expecting and able to respond
to.

Note that an app doesn't really run. Its code gets loaded into a Dalvic VM
and then the Andorid OS calls various lifecycle methods in the app's code. A
lot of newbie developers stumble over this, thinking that an Android app
runs just like a desktop application (even they are really subject to an
event loop as well). If you can think of IOC (inversion of control) you'll
have a better grip on how this 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

Re: [android-developers] convert JPEG sketch of my apartment to google map

2010-12-01 Thread Frank Weiss
What would an image of your apartment look like and what specific locations
do you want to mark?

-- 
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

Re: [android-developers] Dumping the results of DefaultHttpClient.execute()

2010-12-01 Thread Frank Weiss
Seriously, can't you just dump the server's response with curl or wget on
your desktop or else use the debugger to see how the parser is misbehaving?

-- 
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

Re: [android-developers] Making an Flash Application or Browser Based Application non exitable on Android Tablet PC

2010-11-30 Thread Frank Weiss

 I want my application to not having the option of exiting or switching
 to other application Is it possible in web application. If yes
 how??

The Android SDK is speciifaclly designed to NOT allow such behavior. I think
the only way to do that is by changing the device's firmware.

-- 
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

Re: [android-developers] Displaying unicode in a TextView?

2010-11-29 Thread Frank Weiss
I seriously doubt this is a TextView problem, unless perhaps the characters
you are trying to display are not in the font. What type of data is the
content variable? Most likely there is an incorrect content encoding
somewhere in your data chain.

-- 
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

Re: [android-developers] SQLite Performance

2010-11-28 Thread Frank Weiss
I assume you appreciate the fact that just knowing SQL is not knowing how to
optimize queries.

I'm also going to assume that the read queries are the issue. Insert and
delete queries are a whole different issue with respect to indexing.

Indexes are indeed the primary means of optimizing SQL queries. I'm
wondering if the create index command you ran on the PC is actually in
effect on the Android device. If I'm not mistaken, you should be able to
verify that the DB on the device actually has indexing enabled. Have you
verified the speedup that indexing provided on the PC?

If adding column indexing by itself is not effective, you'll need to look
into the queries and the actual data patterns. Some queries are structured
so that the DB cannot use indexes. See if sqlite has an analyze command
for debugging queries. It will show the steps it would use to execute the
query. If there's no step that uses the index (even if there is a column
index) or if the index lookup is at the end of the steps, then the query is
not making maximal use of the index. It's a bit of an art to coerce the
query compiler to do it right and sometimes there are pitfalls in SQL that
need to be understood.

How many queries does you app use? Which one is the bottleneck? Can you post
the query?

-- 
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

Re: [android-developers] Unit Testing - Activity shutdown

2010-11-28 Thread Frank Weiss
Chances are what you mean by activity exits is not in line with the
Android activity lifecycle. Why do you think that the onPause() callback is
not sufficient in this case?

-- 
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

Re: [android-developers] Re: SAX- \n \r not recognized

2010-11-26 Thread Frank Weiss

 i have a node called emial under that
 content is the attribute, in that content I'll get some text that
 text is have \n and \r.

It's not clear what you're saying. I suppose it would be an issue trying to
put control characters into an XML attribute.

It would help if you posted a snippet of the XML in question and possibly a
snippet of the handler where you think the issue occurs.

-- 
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

Re: [android-developers] Re: Kill an app / package in API 8 (Froyo)

2010-11-26 Thread Frank Weiss
I hope not. Task killers are more trouble than they're worth, IMO.

Android OS already provides a way to Force stop an application. And right
next to the Force stop button is the Uninstall button,

-- 
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

Re: [android-developers] How to read non-english fonts and display in app ?

2010-11-25 Thread Frank Weiss
If I'm not mistaken, the Dalvik VM uses UCS-16 internally, just like the
Java VM.

The question is probably what encoding does the file use, UTF-8? Is the
InputStreamReader using the correct encoding?

-- 
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

Re: [android-developers] SAX- \n \r not recognized

2010-11-22 Thread Frank Weiss
Please provide more details.

1. Since you mention symbols, are you using a push or pull SAX parser?
2. Newlines between *opening* XML elements are typically ignored, not by the
parser itself, but by the handler.
3. Newlines in a text node (characters) are significant. Is this the case
you are talking about?
4. Newlines in CDATA nodes should also be signifacnt. Is this the case you
are talking about?
5. Newlines and carriage returns, 0x0A, 0x0D, are identical whether encode
in Latin-1 or UTF-8. I doubt this is the issue.

Can you give a concrete example, please.

-- 
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

Re: [android-developers] Re: Passing values from an Activity to a class that extends View Class

2010-11-21 Thread Frank Weiss
My understanding of MVC and the Android SDK is informed by the
ListView/ListAdapter relationship.

I'm wondering why anyone would suggest and why the OP would suppose that the
Activity should be supplying the model data to the View.

-- 
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

Re: [android-developers] Google Android Map Overlay

2010-11-20 Thread Frank Weiss
The Android SDK doesn't provide this functionality ready-to-go, but it can
be easily implemented with a custom view class that extends FrameLayout, a
controller class, a nine-patch image, and a layout resource (XML). You ought
to be able to google for several solutions. Try the keyords mapview and
balloon.

IMO implementing it yourself is a valuable exercise that adds to your
understanding of the Android SDK.

-- 
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

Re: [android-developers] Re: What Intent for Browser without URL

2010-11-19 Thread Frank Weiss
On my phone, the browser shortcut on the home screen opens the browser with
the last page that was visited. Perhaps the behavior you're looking for is
like when, from the browser,  you choose Menu + Windows + New window.

I don't know the specifics of your use case (opening a blank browser seems a
bit odd). Have you considered creating your own activity having a WebView?
That would afford you greater control of the UX.

-- 
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

Re: [android-developers] Making a transparent line appear over an image

2010-11-19 Thread Frank Weiss
You might try rephrasing your question. Drawing a transparent line over an
image or a map seems pointless.

-- 
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

Re: [android-developers] Re: Best Design for Android App

2010-11-19 Thread Frank Weiss
Have you considered using a Beagle board and coding directly in C? It's
really not clear why you want to put the Android OS and SDK in the midst of
this project.

-- 
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

Re: [android-developers] Problem in providing a string to the JavaScript

2010-11-19 Thread Frank Weiss
This sounds a bit like the problem of trying to match | in a regular
expression (regex). But I can't really tell that the split method is
thinking that its parameter is a regex instead of simple a string. Try \\|
and see if that fixes 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

Re: [android-developers] Re: guitar tuner

2010-11-19 Thread Frank Weiss
I may be wrong, but I'm wondering if taking the approach of FFT is going to
be practical without dedicated hardware. The brute force approach amounts to
doing a convolution computation for each sample, which could be millions of
multiplies per second, depending on the bandwidth and Q factor required. But
I'm pretty sure that with some clever math, that can be pared down
considerably for a specific application.

I have applied a digital filter approach for a prototype shake detector,
realized as a band pass filter. This takes only one multiply for each pole
and zero. Two or three concurrent band pass filters can probably do a pretty
good job of implementing a single pitch tuner. A critical factor in this
case is a precise sampling interval.

I strongly suspect that a really good digital filter cannot be done solely
with the SDK.

-- 
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

Re: [android-developers] Zooming on a custom overlay

2010-11-17 Thread Frank Weiss
Chances are, they've created tiles for each zoom level. Have you checked how
they do it, like by using Firebug net panel?

OK, I just checked it's a single image 1480x450. Next thing would be to look
at their Javascript.

-- 
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

Re: [android-developers] not well-formed invalid token parser.pm

2010-11-14 Thread Frank Weiss
Without more detailed debugging info, I would guess that there is a
character coding issue.

If the input stream reader is expecting UTF-8, the copyright symbol,
U+00AA, would be three bytes: 0xE2, 0x84, 0xA2. In Latin-1/ISO-8859-1, it
would be 0xAA. However, 0xAA is an invalid UTF-8 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

Re: [android-developers] Re: TCP problem - hangs when reading server's response

2010-11-14 Thread Frank Weiss
I suppose I'm a bit rusty on socket networking, since I've been using mostly
HTTP, but let's give it a try.

It would be very helpful to determine if the server is actually sending a
response. But some possible problems:

After the output.println, perhaps it's necessary to flush the output buffer.

-- 
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

Re: [android-developers] Read Barcode

2010-11-14 Thread Frank Weiss
Zxing open source. Perhaps the barcode scanner app also public intent.
On Nov 14, 2010 10:56 PM, David Toledo dtole...@gmail.com wrote:
 Hi All

 Exist some way from read the barcode using the android sdk ?

 Thanks
 David

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] Problem passing Unicode string through JSON request

2010-11-12 Thread Frank Weiss

 \u3403 is not a unicode string, but a string that has hex code of an
 unicode character in it. It can be unicode encoded or its encoding can
 be anything else really.
 Since \ is a special character and has extra meaning in Java String
 class, it gets escaped by escape character, which is \. Now you
 know, what is the extra meaning of \  ;-)

 This is not correct in Java. Strings are stored internally as UCS-16.
Therefore, \u3403.length() == 1. However, \\u3403.length() == 6. This
can be verified with a simple Java program.

-- 
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

Re: [android-developers] Problem passing Unicode string through JSON request

2010-11-12 Thread Frank Weiss
It looks like the code you are using is adding the extra \ here:

strJson = start + \\u file://u/ +
strHex.substring(strHex.length()-4)+ end;

I don't understand the need for the EncodeJson function. As I pointed out
earlier, Java stores char and String data internally as sequences of 16-bit
character codes (UCS-16).

What JSON library are you using to encode the data object you are sewnding
to the server?

-- 
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

Re: [android-developers] LocationListener and getLastKnownLocation

2010-11-12 Thread Frank Weiss
How is the position being passed from the onCreate method to your
application? I suspect when you restart you app, onCreate is not being
called. You may need to save it in the savedInstanceState.

-- 
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

Re: [android-developers] Problem passing Unicode string through JSON request

2010-11-12 Thread Frank Weiss
Yes it won't compile, but I think you are supposing that (\\u file://u/
+ 3403) is the same as \u3403. At any rate, I still thing the EncodeJson
function is bogus.

AFAIK, the JSON encoder should take care of the UTF-8 encoding. It could
also use JSON encoding.

-- 
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

Re: [android-developers] scanning with the camera

2010-11-12 Thread Frank Weiss
AFAIK Zxing's barcode scanner is open source.

-- 
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

Re: [android-developers] Save and continue game

2010-11-12 Thread Frank Weiss
I think it depends on the amount of state, the complexity of the app, and
how persistent the state is supposed to be. Saved instance state is a good
place to start. In the Android activity model, you don't really exit an
app. So unless the user does a force stop, the activity will be able to
restore the state via saved instance state. The advantage is it's easy to
implement, no need for files or DB. Shortcomings are data is lost on force
stop, and I suppose update. So the question becomes what persistence does
the game state need for various lifecycle events, such as:

rotate screen, onPause/onResume, force close, update, uninstall, etc.

You also may need to address how and when the game state IS reset.

hth

-- 
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

Re: [android-developers] Save and continue game

2010-11-12 Thread Frank Weiss


 There's no instance state if the user backs out of the application
 completely.



That's correct. My bad.

-- 
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

Re: [android-developers] Equivalent to dialog display iniitiated from a service

2010-11-11 Thread Frank Weiss
I suppose you believe that notifications in this case wont do because the
user interaction your service demands cannot be deferred by the user?

The problem with that, IMO, is if a user has more than one service like that
running, how does the user control which one preempts another when they
simultaneously demand user interaction. Plus there's the current active
activity, which may actually be more important to the user than any of such
demandful services.

I like Android's multitasking the way it is. It lets me see what's queued
for my attention in the notification bar and gives me the power to switch to
whichever task I think is most importnat at that particular time. Thank you,
Android!

-- 
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

Re: [android-developers] Is it a UNIT Test or an Integration test?

2010-11-09 Thread Frank Weiss
You've raised a good question. It's correct to to say that a unit test does
not involve all the classes of an application. Unit tests are also supposed
to run very quickly. We also usually don't include the GUI in unit tests.
Neither external web services.

In Android, though, we have a bit of a problem. To really run even by the
book unit tests, we'd have to either run them on the JVM or the DVM. In the
first case, we would be using .class files, in the latter case, .dex files.
But I don't know if we have DVM for anything but the emulator or the device.
And the emulator's DVM tends to run slow. Hmmm.

I would tend to agree that what is called unit testing in the Android SDK is
a bit different than the norm. I'd like to hear what others have to say.

-- 
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

Re: [android-developers] HTTPPOST (PHP,MYSQL)

2010-11-09 Thread Frank Weiss
You know, this is a pretty basic client-server question. You'll get much
better help on this kind of problem elsewhere on the web. If you have
a SPECIFIC Android SDK question in this regard, you're more to get help
here.

-- 
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

Re: [android-developers] Android device Deleting the application database while rebooting.

2010-11-09 Thread Frank Weiss
Perhaps the app didn't commit the db transaction?
On Nov 9, 2010 12:50 PM, josh j.jo...@gmail.com wrote:
 Hi,
 I am having a own device which is running on android 2.1.I have
 installed one application in that .That application will create a new
 DB if there is no DB for the application.It is creating correctly .I
 have accessed the device memory as well.I have seen the database in
 the device memory.But when I reboot the device the Database got
 erased .The app is not persisting the database after rebooting the
 device.Wat will the prob.?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] French character encoding issues

2010-11-08 Thread Frank Weiss
Is your assumption that logcat obeys UTF-8 correct or not?

-- 
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

Re: [android-developers] Ajax cross domain requests

2010-11-08 Thread Frank Weiss
Not sure if you're just complainig about the error handling. I suppose you
know that JSONP does cross-domain and is supported by jQuery.ajax.

-- 
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

Re: [android-developers] Re: write to xml file

2010-11-07 Thread Frank Weiss
Just for a clarification. The string.xml file is a source file, it's not
part of the apk, hence it is not available at runtime. Instead, the bulid
process translates it into the R class file, which allows the application to
quickly access the strings directly via Java instead of parsing it 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

Re: [android-developers] Re: Where is the UI state information (used in super.onCreate(Bundle savedInstanceState)) stored ?

2010-11-07 Thread Frank Weiss
On a rooted phone, you ought to be able to kill the Linux process. Just
finish or force close may not be secure since the Android OS lazily reclaims
processes that are no longer in use. Although on a non-rooted phone this is
not an issue, since the Android OS relies on Linux process security.

-- 
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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-05 Thread Frank Weiss
Thanks for clearing up some of those questions.

I have some hypothesis at this point. First, is your activity calling finish
somewhere? That would explain why it's not there when the user presses back
in the dialer. Have you tried a breakpoint in the activity's onResume
method? Perhaps it is being called after the back button, but is doing
something weird. The other is perhaps there's a launch flag in your activity
that causes it to be removed from the activity stack once the dialer
activity is started.

hth

-- 
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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-05 Thread Frank Weiss
Woo hoo! After a week of struggles at my day job, it's gratifying to hear a
success story.

-- 
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

Re: [android-developers] When is the appropriate time to use separate processes?

2010-11-04 Thread Frank Weiss
I think the easily killable angle is rather odd. What kind of an app do you
have in mind?

I've used the Android Intent architecture to hand off tasks to activities in
other apps/processes. For example, to take a picture, open a web page, or
dial a number, my apps don't have to implement that code, they just send an
Intent and let the Android OS find an activity to do 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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-04 Thread Frank Weiss
The behavior of the code you posted should be to return to your activity
when the user finished the dialer activity by pressing back. What behavior
did you observe?

-- 
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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-04 Thread Frank Weiss
I'll have to check the code I use. But perhaps the problem is you're not
giving a number or try using Intent.ACTION_VIEW instead of
Intent.ACTION_DIAL.

-- 
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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-04 Thread Frank Weiss
This works for me on the Droid:


String phoneUri = tel: + phone.getText();

Intent i = *new* Intent(Intent.*ACTION_VIEW*, Uri.*parse*(phoneUri));

startActivity(i);

What phone did you use? Have you tried adding a phone number?

-- 
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

Re: [android-developers] Re: Return to my application when back key is pressed from native dialer

2010-11-04 Thread Frank Weiss
I'm not following you very well. I assume you mean that if you add the phone
number, then the back button does take the user back to your activity, but
without the phone number, the back button takes the user to the home screen.
I also assume that what you mean by native homescreen is the same as when
the user presses the home bvutton on the phone.

If that's the case, I think you should expalan your use case better. If the
dialer behavior for the back button is different when a phone number is
provided or not, that might by an Android OS issue, or an issue in your use
case.

I also don't understand you're introducing a possible issue with using a
dialog. AFAIK, you would have to call startActivity(Intent) in the activity,
after the dialog has been closed.

You also have not indicated what phone and API level you are having this
issue on. But perhaps if my assumption is correct, you can get the back
button to work correctly if you supply the dialer with a phone number?

-- 
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

Re: [android-developers] Re: Obtaining Name of Object Reference

2010-11-03 Thread Frank Weiss
In general, this is not possible. Consider for example:

Object obj1 = new Object();
Object obj2 = obj1;

Both obj1 and obj2 are references to the same object. In this case, what
object name would you want?

Perhaps if you explain what you are trying to do we can help.

-- 
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

Re: [android-developers] Re: Service onCreate is asynchronous

2010-11-03 Thread Frank Weiss
I can't help but think this is just a misunderstanding or failure to RTFM.
The method ref says This defines a dependency between your application and
the service. Perhaps this is also a confusion about what an Android service
really is.

-- 
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   7   >