> 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
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
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
> 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
>
> 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
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
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
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
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
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
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.
>
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
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
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
> 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
>
> >
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
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
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
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
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
[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
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
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
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
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
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
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
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
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,
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
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
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?
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.
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
--~--~-~--~~
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
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
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
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
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
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
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
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
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
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
... 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
--~--~-~--~~---
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
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
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
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
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:
>
>
>
> >
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
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
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
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
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
--~--~--
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
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.
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
--~--~---
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
> > 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
_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,
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:
>
> > - 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
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
> 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"
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
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
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
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
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
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
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
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
> 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
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
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
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
77 matches
Mail list logo