[android-developers] Re: What's wrong with this location code?

2010-04-16 Thread Anna PS
> On Apr 16, 12:45 am, JP wrote: > On Apr 15, 8:35 am, Anna PS wrote: > > > Yet in my log files, I can > > still see the Android NetworkLocationProvider logging > > onCellLocationChanged events. Is this a bug in my code? > > Without diving into your code. Dou

[android-developers] What's wrong with this location code?

2010-04-15 Thread Anna PS
Woe - I'm still struggling to write some code that can reliably get me an accurate location fix. I have written some code that I thought would (i) register with any available location listener (ii) at onLocationChanged events, check the location fixes for age and accuracy (iii) once a suitable loc

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Anna PS
On Apr 8, 11:00 pm, Mark Murphy wrote: > Anna PS wrote: > > OK, I see. Although, I do get the OutofMemoryError on the > > byteBuffer.write(buffer, 0, len), well before I do anything with the > > FilePart. > > That doesn't make sense. What are you doing with the

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Anna PS
> I suspect your problem is not in reading the InputStream, but rather in > how FilePart does what it does. Since that isn't part of Android, it was > probably developed without tight memory constraints in mind. If you hand > it 1 KB chunks each time, it is probably going to allocate a 1 KB byte >

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Anna PS
> 1. Why are you using a ContentProvider? Because that seemed to be the best way to get from a content URI (returned from the Android video camera intent) to a byte stream. Happy to do it another way, though. > 2. What are you doing with the >2MB byte array when you get it on the > ContentResolve

[android-developers] OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Anna PS
Apologies for cross-posting with StackOverflow, but I'm getting a bit desperate. I'll cross-post any final answer too. Please could anyone suggest an approach for transferring a >2MB video from a ContentResolver into a Bytestream, without running out of memory? See question: http://stackoverflow

[android-developers] Re: Check if an IntentService is already running?

2010-04-06 Thread Anna PS
On Apr 6, 2:52 pm, "Mark Murphy" wrote: > > Sorry for the newbie question, but does anyone know how I can check > > whether an IntentService is already running? > > > I'm starting an IntentService from onCreate within a normal Activity, > > and that means that if the user minimises and maximises t

[android-developers] Re: Getting location from within an IntentService?

2010-04-06 Thread Anna PS
Thanks Mark... On Apr 2, 3:52 pm, Mark Murphy wrote: > Anna PS wrote: > > But - is it possible to get a location fix from within an > > IntentService? > > It would be difficult, because IntentServices want to shut down as soon > as onHandleIntent() completes (if there a

[android-developers] Check if an IntentService is already running?

2010-04-06 Thread Anna PS
Sorry for the newbie question, but does anyone know how I can check whether an IntentService is already running? I'm starting an IntentService from onCreate within a normal Activity, and that means that if the user minimises and maximises the application, it gets called twice. I'm wondering if I

[android-developers] Try/except handling for PostMethod?

2010-04-06 Thread Anna PS
Hi all I'm using a PostMethod, and wondering what try/except handling I should use. The exception handling here seems to work okay in most scenarios, but is there anything I might be missing? In particular, I'm wondering whether this handles the network connection going down midway through the up

[android-developers] Re: Get unique ID of phone - Settings.Secure.ANDROID_ID not working on N1?

2010-04-05 Thread Anna PS
I figured this out. Just generate a random string (using Java UUID) and save it in Settings. That's enough to distinguish each user :) On Mar 27, 5:49 pm, Anna PS wrote: > Yes, I really wanted to avoid TelephonyManager because it has > particularly scary-looking permissions. >

[android-developers] Getting location from within an IntentService?

2010-04-02 Thread Anna PS
Hi all I'd like to figure out the best way to get a recent location fix, with the minimum disruption to the user flow. Here's what I would like the user to see in my app: 1. [After e.g. taking a photo, and with no delay] Click a button saying 'Upload your file' 2. [With no delay] See a notificat

[android-developers] Re: Getting all of a long string in DDMS?

2010-03-29 Thread Anna PS
ailable in the > > responseStream because the stream may don't give complete data at one > > attempt. > > You need to call read method on responseStream  till it ends. ( i.e: > > read bytes size -1) > > i.e read the data till you got end of stream. > > then con

[android-developers] Getting all of a long string in DDMS?

2010-03-29 Thread Anna PS
Hi all, I'm getting a server response back in ddms, here's my code: InputStream responseStream = method.getResponseBodyAsStream(); responseString = convertStreamToString(responseStream); // standard function for InputStream > String

[android-developers] Re: Get unique ID of phone - Settings.Secure.ANDROID_ID not working on N1?

2010-03-28 Thread Anna PS
> On Fri, Mar 26, 2010 at 2:20 PM, Ken H wrote: > > Can't say anything about the ANDROID_ID thing. What's wrong with the > > TelephonyManager? You can get the device ID, subscriber ID, Sim serial > > number, etc. I think the only permission you need is > > >

[android-developers] Get unique ID of phone - Settings.Secure.ANDROID_ID not working on N1?

2010-03-26 Thread Anna PS
Odd - I posted this message yesterday and got sent a copy, but it doesn't seem to have shown up in the group... Here it is again. This seems to be a bit of a vexed issue: see http://groups.google.com/group/android-developers/browse_thread/thread/3f4ae5cdf792ce00 Like the person who sta

[android-developers] Unique ID of phone?

2010-03-26 Thread Anna PS
This seems to be a bit of a vexed issue: see http://groups.google.com/group/android-developers/browse_thread/thread/3f4ae5cdf792ce00 Like the person who started that thread, I need to get a unique ID for a device, without using scary permissions for TelephonyManager. I've tried id = android.p

[android-developers] Re: EXTRA_OUTPUT problem with video camera - breaks 'retake' and 'delete' buttons

2010-03-16 Thread Anna PS
Any ideas, anyone? wondering if this is an Android bug, or if I'm doing something wrong. Seems to work fine when taking photos, just not videos. On Mar 12, 7:27 pm, Anna PS wrote: > NB here's my traceback: > > 03-12 19:25:57.948: INFO/ActivityManager(936): Starting activ

[android-developers] Re: Getting from a Uri to a byte array...?

2010-03-13 Thread Anna PS
t crashing Android? On Mar 13, 11:23 am, Anna PS wrote: > Hi all > > I want to get from an Android Uri (of the kind returned by > onActivityResult) to a simple byte array, in order to upload a file as > part of a multipart message. Can anyone provide an example of how to > get

[android-developers] Getting from a Uri to a byte array...?

2010-03-13 Thread Anna PS
Hi all I want to get from an Android Uri (of the kind returned by onActivityResult) to a simple byte array, in order to upload a file as part of a multipart message. Can anyone provide an example of how to get from a Uri to a byte[] array? My current code (below) is almost there, but falls down b

[android-developers] Passing a Uri to the video camera - causes Retake and Play buttons to crash

2010-03-13 Thread Anna PS
[I thought I posted this yesterday, but it hasn't shown up in the group, so apologies if it posts twice.] I'm trying to pass a Uri to the video camera as EXTRA_OUTPUT. The file shoots and saves OK at the Uri I give it, but unfortunately pressing the 'Retake' or 'Play' buttons crashes the applicati

[android-developers] Re: EXTRA_OUTPUT problem with video camera - breaks 'retake' and 'delete' buttons

2010-03-12 Thread Anna PS
Caller.run(ZygoteInit.java:860) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-12 19:25:57.968: ERROR/videocamera(5482): at dalvik.system.NativeStart.main(Native Method) On Mar 12, 7:23 pm, Anna PS wrote: > Hi all, > > I

[android-developers] EXTRA_OUTPUT problem with video camera - breaks 'retake' and 'delete' buttons

2010-03-12 Thread Anna PS
Hi all, I have a problem with supplying a URI in the EXTRA_OUTPUT to the video camera. If I supply a URI, the file shoots and saves OK to that URI, but the 'retake' and 'delete' buttons on the camera both fail to work - 'retake' does nothing, and 'delete' does a force close. If I don't supply a U

[android-developers] Upload error icon in status bar?

2010-03-09 Thread Anna PS
Anyone know how I can get the 'upload error' icon for the status bar? I've got the 'uploading' and the 'upload done' icons, like this: notifyDetails = new Notification(android.R.drawable.stat_sys_upload_done,"Failed to upload!",System.currentTimeMillis()); But I want to add an 'upload error' ico

[android-developers] Re: Security question: can Android source be decompiled and read?

2010-03-03 Thread Anna PS
rces but it ensures that nobody who has your app > can get access to the details, and also allows you to update the login > details without the need to force an app update on all your users. > > Al. > > On Mar 2, 6:23 pm, Anna PS wrote: > > > > > Hi there > &g

[android-developers] Security question: can Android source be decompiled and read?

2010-03-02 Thread Anna PS
Hi there So I would like to store a username and password for HTTP login in the Android source (it's an account that is app-wide, rather than per- user, so I would like to supply it with the app). Is this a really bad idea? In other words, should I just assume that any text in Android source can

[android-developers] Re: File upload in background: thread/service/AIDL...?

2010-03-01 Thread Anna PS
Superb - thank you :) On Mar 1, 5:31 pm, Mark Murphy wrote: > Anna PS wrote: > > Nothing, really. I just want to upload a file in the background, with > > an icon in the status bar, and update the icon when the upload is > > complete. > > > I might possibly want to

[android-developers] Re: File upload in background: thread/service/AIDL...?

2010-03-01 Thread Anna PS
e the Service for anything else. Does that sound OK? So the most communication I would need is (i) pass a filename to the Service, and (ii) go back to the main application once the upload is complete. Anna On Mar 1, 5:07 pm, Mark Murphy wrote: > Anna PS wrote: > > Also, I need to pass in a f

[android-developers] Re: File upload in background: thread/service/AIDL...?

2010-03-01 Thread Anna PS
file uploading code - that wouldn't change anything, I assume it's possible to pass a filename to a Service class as an argument? Many thanks for your help. Anna On Mar 1, 4:03 pm, Mark Murphy wrote: > Anna PS wrote: > > should it be a LocalService or a > > RemoteService,

[android-developers] File upload in background: thread/service/AIDL...?

2010-03-01 Thread Anna PS
Hi all I'm writing an app that uploads files to a web service. My question is how to write a Service to handle this: I want to upload in a background thread (or process - not sure of the precise wording), so that the user can go to other applications without interrupting the upload, and show a not

[android-developers] Re: Authenticating with Youtube: ClientLogin?

2010-02-27 Thread Anna PS
an I do this securely? Would I need to hash it? Thanks! Anna On Feb 27, 3:07 pm, Anna PS wrote: > I'm writing an Android app that, among other things, uses the GData > libraries to upload videos shot with the camera to Youtube (code > below). However, I'm a bit confused about

[android-developers] Authenticating with Youtube: ClientLogin?

2010-02-27 Thread Anna PS
I'm writing an Android app that, among other things, uses the GData libraries to upload videos shot with the camera to Youtube (code below). However, I'm a bit confused about how to authenticate my users. Can I simply assume that they are already signed in to Youtube, since they're using Android?

[android-developers] Re: Checking the user's country

2009-09-12 Thread Anna PS
bile_country_codes. > > -- > Roman Baumgaertner > Sr. SW Engineer-OSDC > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc.

[android-developers] Checking the user's country

2009-09-11 Thread Anna PS
Hi Anyone know how to check the user's country? I'm looking for a way that's faster than using GPS and reverse geocoding. (I need the country where the phone is registered, not their current location, in any case.) Is there any constant in the settings? Thanks, Anna --~--~-~--~~

[android-developers] Re: App opens previous activity - but only intermittently

2009-07-24 Thread Anna PS
ou've not seen the activity lifecycle description, here it > is:http://developer.android.com/guide/topics/fundamentals.html#actlife > > Yusuf Saib > Android > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely

[android-developers] App opens previous activity - but only intermittently

2009-07-24 Thread Anna PS
Hi all, This is an intermittent bug in one of my apps. I don't expect anyone to solve it immediately, but I'd appreciate any thoughts on how to start debugging! So, my app lets users edit an item (in the EditPage activity). When they press the Back key, the desired behaviour is that it saves the

[android-developers] Re: Age of GPS data (continued)

2009-07-21 Thread Anna PS
Hi John Yes, that's exactly what I have done - I've saved the time of the first fix, and compare it to the time of the latest fix. If the two are the same when the time comes to check location, i.e. there is no time difference, I know that there hasn't been an update during the life of the appli

[android-developers] Re: Some G1 phones getting "device not found" with adb...

2009-07-21 Thread Anna PS
I had the same problem. Blowing in the connectors, then killing and restarting ADB worked for me :) On Jul 15, 7:00 pm, Richard Schilling wrote: > I did resolve the BATTERY_CHANGED events issue - it was in my > application design.  Search for BATTERY_CHANGED to see that thread. > > Haven't worn

[android-developers] Age of GPS data (continued)

2009-07-21 Thread Anna PS
Hi all Just updating this thread, which seems to be too old for me to post a follow-up: http://groups.google.com/group/android-developers/browse_thread/thread/df1e14fe4e9ad896/ I'm trying to check the age of a GPS fix, so that I can discard location fixes that are more than, say, a couple of mi

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-20 Thread Anna PS
shouldn't have been trying to do in the first place? :) best wishes, Anna On Jul 16, 10:51 pm, Mark Murphy wrote: > Anna PS wrote: > > Sorry, I guess I'm being dim. Should I add some code inside the > > onLocationChanged method itself to check the accuracy? And then j

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
uracy(); } On Jul 16, 10:27 pm, Anna PS wrote: > Thanks Mark. When you say "using the LocationListener", what exactly > do you mean? > > Is there a way that I can poll the listener directly - I know that > there is an onLocationChanged event, but does that help me

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
button, (i) gets the location, (ii) checks that the accuracy is okay, and (iii) if it isn't okay, shows the user a progress dialog until the accuracy improves enough to be acceptable. best wishes, Anna On Jul 16, 10:17 pm, Mark Murphy wrote: > Anna PS wrote: > > Basically my question

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
ad is running. On Jul 16, 10:09 pm, Anna PS wrote: > Hi there, > > I'm having a weird problem with GPS accuracy. > > Basically, I check the GPS accuracy in a background thread after the > user clicks a report button, and show the accuracy in a progress > dialog, changing second

[android-developers] Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
Hi there, I'm having a weird problem with GPS accuracy. Basically, I check the GPS accuracy in a background thread after the user clicks a report button, and show the accuracy in a progress dialog, changing second by second. (Code is below.) The following strange thing happens: 1. If the user c

[android-developers] Why does DDMS sometimes only show one line of logs?

2009-07-16 Thread Anna PS
... usually happens after a force close. Instead of showing the usual 30 lines or so of logs + scrollable history, it only shows a single line or a couple of lines. Very annoying! The only fix that I can find is to restart DDMS. Anyone have any ideas? Thanks Anna --~--~-~--~~---

[android-developers] Re: Update message - how to check whether app has run before?

2009-06-26 Thread Anna PS
duh - that should be boolean hasSeenUpdateVersion = settings.getBoolean( "hasSeenUpdateVersion" + vc, false); of course :) On Jun 26, 6:08 pm, Anna PS wrote: > Thank you - good thinking. > > For the benefit of others reading

[android-developers] Re: Update message - how to check whether app has run before?

2009-06-26 Thread Anna PS
sionCode to the setting name. > > On Jun 26, 12:40 pm, Anna PS wrote: > > > > > Actually, I have realised that won't work, because it will also show > > the first time the app is installed. It should only show uponupdate. > > > So, the question still stands. Ho

[android-developers] Re: Update message - how to check whether app has run before?

2009-06-26 Thread Anna PS
hanks, Anna On Jun 25, 5:17 pm, Anna PS wrote: > Hi all, > > I want to show anupdatemessagefor a new release - the first time > the user opens the updated version of my app, a pop-up dialog should > appear, saying what's new, with an OK button. After the user has read > it onc

[android-developers] Update message - how to check whether app has run before?

2009-06-25 Thread Anna PS
Hi all, I want to show an update message for a new release - the first time the user opens the updated version of my app, a pop-up dialog should appear, saying what's new, with an OK button. After the user has read it once, it shouldn't appear again. Is there any inbuilt Android variable I can c

[android-developers] Re: How can I give my paid app away for free to some users?

2009-06-18 Thread Anna PS
Ah - that's a shame. Discount coupons would definitely be a nice feature to have on the Market... On Jun 18, 12:06 am, Yuri Ammosov - Sadko Mobile wrote: > DO NOT REFUND. Refund UNINSTALLS the program. > > YA > > On Jun 17, 2:17 pm, Anna PS wrote: > > > > >

[android-developers] Re: How can I give my paid app away for free to some users?

2009-06-17 Thread Anna PS
gt; > > How does you approach work when the users are offline? > > > > > > On Jun 17, 1:27 pm, bain wrote: > > > > b > > > > > > i use google appengine to host my license server (small servlet) > > > > > > use deviceId and ch

[android-developers] How can I give my paid app away for free to some users?

2009-06-17 Thread Anna PS
Hi all So I'm about to put a paid app on the Market, but I'd like to give it free to a few users who helped to test it. Is there any way that I can give them a token or something else so that they can get it free? Or can I refund them once they've paid if I know their details? I guess the alter

[android-developers] Re: DDMS - lost the tag column?

2009-06-11 Thread Anna PS
arate all the cols to the > extreme and u might jus end up looking at ur tag col... if u do find a > concrete sol, please do reply. > > cheers. > > On Thu, Jun 11, 2009 at 4:18 PM, Anna PS > wrote: > > > > > > > This is an incredibly dumb question. So, apol

[android-developers] DDMS - lost the tag column?

2009-06-11 Thread Anna PS
This is an incredibly dumb question. So, apologies. But I can't find the answer anywhere and it's driving me nuts. In DDMS, I have lost the tag column, i.e. the first part of the message from Log.d(tag, message). I can see time, log type, process id, and message - but not tag! Anyone know how to

[android-developers] Justify a TextView?

2009-06-03 Thread Anna PS
Hi all, I can see this question has been asked a couple of times before, but with no answer. How do I set the text in a TextView to be justified? That is, I would like it to look like the left-hand example here: http://en.wikipedia.org/wiki/Justification_(typesetting) Thanks, Anna --~--~--

[android-developers] Re: Log in to an application?

2009-05-21 Thread Anna PS
Hi Mike, Thanks for the advice... here are my answers. > > 1. Are there e.g. onStartup() and onShutdown() per-application events, > > or similar, that I can hook into, to serve up a login dialog and set > > the login state in Preferences? If not, then how should I implement > > login? > > So, yo

[android-developers] Log in to an application?

2009-05-21 Thread Anna PS
Hi all Sorry if this has been asked before here, I can't find the answer if so. Problem: I would like my user to have to log in to my application each time they open it. It's all run locally on the Android device, it's not a web service. Question: how should I implement this? 1. Are there e.g.

[android-developers] Getting the user's own email address

2009-05-14 Thread Anna PS
Hi, I'd like to retrieve the user's own email address, as configured in their Gmail application (purpose: just so I can pre-fill a form field for 'Your email'). Is this possible in Android, maybe through one of the ContentProviders, or would it breach privacy in some way? thanks, Anna --~--~---

[android-developers] Uploading an image in a multipart message - sample code

2009-05-10 Thread Anna PS
I'm starting a new thread, in response to a request over here: http://bit.ly/E1Qqm This is some sample code for uploading an image to the web, as part of a multipart message. It assumes that the photo is stored on the SD card as "photo.jpg". You'll need to download and add a couple of jar files t

[android-developers] Re: Get image URI from camera?

2009-05-07 Thread Anna PS
> > 1. Thumbnail display. When I go back to the first screen of the > > application, I want to show an ImageView of the jpeg that the user has > > just taken. Current code, which doesn't work because it's not looking > > in the SD card: > > >    bmp = BitmapFactory.decodeStream(openFileInput("pho

[android-developers] Re: Get image URI from camera?

2009-05-07 Thread Anna PS
_TAG, "No bitmap"); } // Compress bmp to jpg, write to the byte output stream bitmap.compress(Bitmap.CompressFormat.JPEG, 80, imageByteStream); // Turn the byte stream into a byte array imageByteArray = imageByteStream.toByteArray(); Thanks again,

[android-developers] Re: Get image URI from camera?

2009-05-06 Thread Anna PS
Thanks Mark (sorry to have two separate threads going on here). I'll take a look at the code in your book. If I succeed, I'll post my code here for others to use. Links from other readers also much appreciated. Best wishes, Anna On May 7, 1:03 am, Mark Murphy wrote: >

[android-developers] Re: Get image URI from camera?

2009-05-06 Thread Anna PS
> > - From the home screen, have a big button saying "Click here to take a > > photo" > > You might be able to do that with an AppWidget in 1.5, but otherwise, > there is no means of doing a "big button" on the home screen. Sorry, my fault, I'm not being clear. What I mean is that I want to star

[android-developers] Re: Get image URI from camera?

2009-05-06 Thread Anna PS
ent i = new Intent(CameraActivity.this, Home.class); i.setData(uri); startActivity(i); return true; } return false; } On May 7, 12:38 am, Mark Murphy wrote: > Anna PS wrote: > > I need to start the Cam

[android-developers] Re: Get image URI from camera?

2009-05-06 Thread Anna PS
> I need to start the Camera activity from within my application, take a > picture, and return the photo URI to another activity. Ugh. The more I search for answers, the more baffled I get... Here's what I need to do: - From the home screen, have a big button saying "Click here to take a photo"

[android-developers] Get image URI from camera?

2009-05-06 Thread Anna PS
Hi, I need to start the Camera activity from within my application, take a picture, and return the photo URI to another activity. Surely this should be straightforward? But the Camera API sample code doesn't show how to get the URI. I can't find the answer on this forum, either. Can anyone help

[android-developers] Re: Layout question - how to replicate what the iPhone does...

2009-04-28 Thread Anna PS
Thank you Jon, this is exactly what I needed! best wishes, Anna On Apr 28, 5:43 am, Jon Colverson wrote: > On Apr 27, 10:01 pm, Anna PS wrote: > > > How would I even start to create a home screen that looks like this in > > Android? Essentially I need clickable areas w

[android-developers] Layout question - how to replicate what the iPhone does...

2009-04-27 Thread Anna PS
Hi there, I have an application that consists of a series of tasks, and I'm struggling to replicate a user experience that is simple to implement on the iPhone. In the abstract: on the home screen, I'd like there to be a list of four tasks, of various kinds. -- Two will invite the user to click

[android-developers] Re: Error installing ADT 0.9

2009-04-23 Thread Anna PS
I had the same problem and this worked for me. Use wget with the -c option to resume downloads. On Apr 22, 10:52 am, chris wrote: > It seems the download server is occupied/busy and resets the > connections quite often. > I recommend downloading the file using a program that can resume > downloa

[android-developers] Re: GPS accuracy problems

2009-02-12 Thread Anna PS
ions/apps/38257>That > does not itself improve accuracy, but at least you can get an idea why your > accuracy is shite.. > > Ludwig > > 2009/2/11 Anna PS > > > > > Hi, > > > I'm writing a mapping application. In simple terms, it sends some info

[android-developers] GPS accuracy problems

2009-02-11 Thread Anna PS
Hi, I'm writing a mapping application. In simple terms, it sends some info about the user's current location to a server when the user clicks on a button. I need the location to be absolutely correct, and when I first started to implement LocationListener, I found that it often wasn't. So I've u

[android-developers] Re: Age of GPS data

2009-02-09 Thread Anna PS
t; frequently as possible: that way you have the most up-to-date location your > device can give you. > > Ludwig > > 2009/2/4 Anna PS > > > > > Hi Ludwig, > > > Thanks for the suggestion. I do implement a listener, when the > > application opens. But I f

[android-developers] Re: Age of GPS data

2009-02-04 Thread Anna PS
ener, which is much more > light-weight than the busy polling you are implementing. You can cancel your > subscription to location updates once you have one that satisfies you.Ludwig > > 2009/2/1 Anna PS > > > > > Great - thank you. I'll remember to read the do

[android-developers] Re: Age of GPS data

2009-02-01 Thread Anna PS
> 10) || (accuracy > 20.0)) { return false; } On 27 Jan, 03:38, gjs wrote: > Hi, > > Subtract the Location.getTime() value from the current time to get the > age of the last fix. > > Seehttp://code.google.com/android/ref

[android-developers] Age of GPS data

2009-01-22 Thread Anna PS
Hi When you get GPS location using getLastKnownLocation, is there a way to check how old the data is, i.e. when the location was last updated? I'm noticing that sometimes my app is giving me an out-of-date location (usually because the sky is not visible when the app starts) - it'd be good to wa

[android-developers] Re: Errors when POSTing a jpeg

2008-12-17 Thread Anna PS
s > posthttp://www.anddev.org/setting_up_multipart_messages_using_the_default... > > Also check the length of the image part since for me it was always > zero. > > On Dec 14, 5:49 pm, Anna PS wrote: > > > > > Hi, > > > I'm trying to POST a jpeg image

[android-developers] Errors when POSTing a jpeg

2008-12-15 Thread Anna PS
Hi, I'm trying to POST a jpeg image as part of a multipart message, and keep getting errors saying the file is incorrect. The jpeg data is retrieved from the photo store using its URI. This bit seems to work fine. All the other parts of the multipart message also work fine, and I know that ther