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

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 emai

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

2011-01-19 Thread Frank Weiss
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

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

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

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

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 de

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

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

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 th

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 r

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 ava

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

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

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

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.

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 (

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

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

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 fro

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 receiv

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

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

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

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

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

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

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" wrote: > Thank you Sir. > > On Dec 27, 4:4

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-

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

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

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

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 t

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 un

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

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

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 c

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

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 u

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

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 be

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

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 in

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 th

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 g

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 d

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

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 pos

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 Develope

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 manual

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

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 bec

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 syste

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 andro

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 th

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 respon

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

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

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 sub

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 g

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 queri

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

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 snip

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

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

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 G

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

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 require

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 subscribe

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 em

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 unsubscri

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

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

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

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.

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

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

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 rest

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

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 " + "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 y

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

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 " + 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 charact

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

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 sim

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

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

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 pr

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

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

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

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 runti

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 gro

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

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

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 Goo

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 and

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

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,

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

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 messag

  1   2   3   4   5   6   7   >