[android-developers] Running out of memory with Scanner

2009-01-23 Thread Alvin Yates
So I'm trying to read some fairly large files on the phone in order to create pretty path overlays on a map and I'm running into an odd issue that probably has a simple solution. The file I'm trying to parse through is 1.4M of straight text, and I get an OOMException when it's around 80% through

[android-developers] Re: Strange Toast error

2008-12-30 Thread Alvin Yates
what could be the cause. I decided to remove the Toast messages and did some reworking to eliminate the need for them in the first place, so now it's just a curiosity of understanding why it happened. On Dec 29, 1:55 pm, Mark Murphy mmur...@commonsware.com wrote: Alvin Yates wrote: I'm using

[android-developers] Strange Toast error

2008-12-29 Thread Alvin Yates
I'm using a bunch of Toast messages in my application in order for certain services to communicate to the user. The problem seems to be, however, that if I navigate certain parts of the app too quickly, one of the toast messages never actually disappears, which I think may have to do with the

[android-developers] Re: Location-based Service APIs

2008-11-20 Thread Alvin Yates
It's the same as if you were doing it with real GPS. You're simulating GPS communication. It isn't a separate interface/method/ setup at all. On Nov 20, 6:27 am, salman.geek [EMAIL PROTECTED] wrote: Well thanks for your reply but ma dear friends i have mentioned that i m getting data through

[android-developers] Re: Toying with MapView

2008-11-20 Thread Alvin Yates
another small item of code I am missing to put this thing to bed. On Nov 19, 11:45 am, Mark Murphy [EMAIL PROTECTED] wrote: Alvin Yates wrote: So as far as Zoom is concerned, I have displayZoomControls() set to true in my MapActivity.  Is there something else I need to do to get that to appear

[android-developers] Re: SoundRecordingDemo in v1.0

2008-11-19 Thread Alvin Yates
It is a 3gp file. If you want the AMR data, you'll have to use ffmpeg to rip it directly (As far as I'm aware). That will require some knowhow and the ability to compile the source from CVS, since ffmpeg isn't a typical open source project in the sense it has release builds of any kind.

[android-developers] Toying with MapView

2008-11-19 Thread Alvin Yates
Decided to toy with the Map API while I clean up my current app. So I made a simple MapView and was kinda intrigued to notice a couple things, so I'm making sure this is default behavior and not me breaking something: 1) Is there no default set of buttons for pan/zoom? I had to manually add

[android-developers] Re: Camera preview after long delay, progress window

2008-11-19 Thread Alvin Yates
If you make the Camera its own Activity and set it to call after the progress window terminates, then you shouldn't have a problem. If you're trying to do it all in one Activity, you might have an issue. The Camera API is very loose when it comes to timing constraints as it appears (without

[android-developers] Re: What is Activity and View in MVC design paradigm

2008-11-19 Thread Alvin Yates
What you said isn't quite true. It semi-follows the paradigm, but not in the way you would normally think. There isn't a strict divorce of backend-frontend because of how Activities function, but your heavy lifting is certainly not being done by Views. All Views are truly UI components, but

[android-developers] Re: Toying with MapView

2008-11-19 Thread Alvin Yates
, Mark Murphy [EMAIL PROTECTED] wrote: Alvin Yates wrote: 1) Is there no default set of buttons for pan/zoom?  I had to manually add zoom myself, but pan will be annoying. There are no buttons for pan. Make sure you have android:clickable=true on the com.google.android.maps.MapView in your

[android-developers] Common code with Eclipse

2008-11-19 Thread Alvin Yates
I'm making a new project where I'm attempting to share only common Java code (i.e. no Android classes used) that handle boring stuff like data structures, data formatting, and XML parsing from my previous Android app. You know, stuff that I would eventually like to go back and refactor to be

[android-developers] Activity stack behavior

2008-11-19 Thread Alvin Yates
Quick question: Is there a way to start a new activity and close the current one? Basically keep the Activity stack from growing, but my main concern is preventing multiple instances of the same Activity from spawning. I'm trying to create an app that will allow for changing views from a

[android-developers] Re: Activity stack behavior

2008-11-19 Thread Alvin Yates
. If not, the app is going to appear slow, without a low delay, and I'd be forced to play roulette with which view I was in prior to getting the view the user wants. On Nov 19, 4:30 pm, Mark Murphy [EMAIL PROTECTED] wrote: Alvin Yates wrote: Quick question: Is there a way to start a new activity and close

[android-developers] Re: Compressed Camera Images

2008-11-14 Thread Alvin Yates
preview code working properly on the G1. Regards On Nov 6, 4:55 pm, Alvin Yates [EMAIL PROTECTED] wrote: I'm taking pictures with the Camera using takePicture(null, null, myCallback), but taking pictures on the G1 gives me full 3.1M images every single time.  I set the appropriate camera

[android-developers] Re: Android market and ADCII

2008-11-14 Thread Alvin Yates
Only news on the market status/changes that I'm aware of have been posted to the blog for some time now: http://android-developers.blogspot.com/search/label/Android%20Market On Nov 13, 11:39 am, Juan David Trujillo C. [EMAIL PROTECTED] wrote: Hi guys! I have a question: Is it possible to

[android-developers] Re: Question about ServerSocket

2008-11-14 Thread Alvin Yates
If it's on the page, more than likely. However, if you haven't set your manifest file to add the NETWORK permission, that would do it easily. On Nov 13, 10:40 pm, riverwide [EMAIL PROTECTED] wrote: Hi, I want to new a ServerSocket instance.(java.net.ServerSocket) But I can't. A

[android-developers] Re: How to Redir UDP Packets at init

2008-11-14 Thread Alvin Yates
You could leave it open. Alternatively, you could just write your own shell script/batch file. Might be a way to sneak it in to Eclipse, but I couldn't give you an answer to that right this moment. On Nov 14, 10:14 am, Breno [EMAIL PROTECTED] wrote:      Hello,         i'm trying to receive

[android-developers] Re: How to debug the real phone G1?

2008-11-12 Thread Alvin Yates
On Windows, you need to install the G1 debugger drivers. If you are using Eclipse, adb should pick it up when it detects the phone. On Nov 12, 6:32 am, jeka [EMAIL PROTECTED] wrote: I've enabled USB debugging, plugged the phone in, but still don't see it as one of the devices. Am I missing a

[android-developers] Service to Activity communication

2008-11-12 Thread Alvin Yates
Simple question: Is there a means of communicating a complete message from a Service to an Activity without using AIDL? Ideally I'd like to trigger something like onActivityResult, but if I have to change my app behavior, it isn't too much of a big deal.

[android-developers] Re: Service to Activity communication

2008-11-12 Thread Alvin Yates
1 and 3 I had seen, but I only needed a one-way Service is done starting. But this one is interesting: 2. You can create a PendingIntent to deliver a result to an activity. That PendingIntent can be given to the service either as one of the extras in the Intent given to startService(). Not

[android-developers] Question on Service Choice

2008-11-11 Thread Alvin Yates
Main question: Is there a special reason why ServiceStartArguments uses a PendingIntent based on AlarmService.class instead of ServiceStartArgumentsController? For my own education: I'm trying to decide which example of the services I should be modeling my networking code after in order to

[android-developers] Re: LocationListener onLocationChanged

2008-11-10 Thread Alvin Yates
If you have a location listener enabled, then it does. I don't think the GPS will update until something registers with the LocationManager service, but I can't think of a way to test that hypothesis without creating a location listener first. An internals guru would be more helpful there. The

[android-developers] Generating tables like lists

2008-11-10 Thread Alvin Yates
Is there a way to generate a table with possible images dynamically (from inside the app)? Wondering if I can eventually go for a shiny presentation that doesn't require extensive amounts of time in hand- building the layout, or if I'm going to be stuck using list views

[android-developers] Odd XML Upload question

2008-11-09 Thread Alvin Yates
Figured out my problem with HTTP MIME and got it running. New issue has naturally arisen. I'm trying to get a multipart form using MultipartEntity, which is working fine for the signing up process we do in our app. However, uploading XML files is proving problematic as the content headers just

[android-developers] Re: ImageView automatic sizing

2008-11-09 Thread Alvin Yates
My suggestion is draw to size, manually, outside of the app. Basically, the XML will only rarely do what you want, and it will require some arcane parameter twiddling to even get close to what you want. The stretching/shrinking done by the OS is sketchy at best in my experience. I have

[android-developers] Re: Odd XML Upload question

2008-11-09 Thread Alvin Yates
As it turns out, I was using the wrong names for my values. Go me. Same for MultipartEntity, you have to override the generateContentType method and provide your own contentType. The problem here is that you can't seem to override the setter so you have to hard code the content type in the

[android-developers] Compressed Camera Images

2008-11-06 Thread Alvin Yates
I'm taking pictures with the Camera using takePicture(null, null, myCallback), but taking pictures on the G1 gives me full 3.1M images every single time. I set the appropriate camera parameters in my onSurfaceChanged() method that is in the Activity, which I know is calling it as expected, but

[android-developers] Re: Problem with onActivityResult

2008-11-06 Thread Alvin Yates
Actually it's because of this line, which took me two days to figure out when I was doing it: In class A: ... btOk.setOnClickListener(new OnClickListener() { public void onClick(View v) { bus = new Intent(AndTeste.this, Buscador.class);

[android-developers] G1 treated as disk... All the time

2008-11-03 Thread Alvin Yates
I downloaded the driver for the G1 and attached it to my PC so I could resume development after my MacBook decided off was better than on. Was test driving the phone via USB and attached it as a storage device. The problem now is, Windows won't stop treating the phone as a USB drive, even when

[android-developers] Re: Verify Error with HTTPMIME / MIME4J

2008-11-01 Thread Alvin Yates
or multipart HTTP POSTs to work in Eclipse would please let me know what on earth I could possibly be doing wrong at this point. I'm really at a loss as to why this error is continuing to happen if I'm going about this the correct way. On Oct 31, 12:33 pm, Alvin Yates [EMAIL PROTECTED] wrote: Went

[android-developers] Re: why would android call oncreate when flipping the keyboard

2008-10-31 Thread Alvin Yates
Think of it this way. If the orientation is flipped, the layout has to be rebuilt to match the new screen dimensions. The only way you might be able to disable it is if you were to fix the orientation for the screen in the Manifest file. As most people on here are going to tell you: You need

[android-developers] Re: Taking Camera Pictures in app

2008-10-31 Thread Alvin Yates
@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alvin Yates Sent: Tuesday, October 28, 2008 10:02 AM To: Android Developers Subject: [android-developers] Taking Camera Pictures in app Still trying to figure this out, but not getting anywhere on it. Does taking a picture using the camera only

[android-developers] Re: Verify Error with HTTPMIME / MIME4J

2008-10-31 Thread Alvin Yates
) Still getting that verify error on MultipartEntity though. I'd be less confused if Eclipse wasn't building successfully... On Oct 30, 6:46 pm, Alvin Yates [EMAIL PROTECTED] wrote: My issue is that the class that is conflicting is a part of HTTP MIME though.  I'm using Eclipse so I'd assume

[android-developers] Re: No audio picker activity?

2008-10-31 Thread Alvin Yates
Video isn't supposed to happen, and given mobile tech at the moment I don't know of a phone that does support it. The BW requirements are probably too high to manage anything at a decent framerate. Picture capturing is available if you use the Camera API. Search for Megha's CameraApiTest.zip

[android-developers] Verify Error with HTTPMIME / MIME4J

2008-10-30 Thread Alvin Yates
So, in following this post http://groups.google.com/group/android-developers/browse_thread/thread/e4230ed22c196772?tvc=2 ...I started implementing a test multipart message in a short-lived Activity using only StringBody classes, and ran into the Dalvik VM Verify error against my class. It

[android-developers] Re: : How to stops the activity from getting restarted when mode changes from LandScape to Portrait or vice-versa

2008-10-30 Thread Alvin Yates
Given that the screen probably has to rerender the layout as a result of the change in orientation, I really doubt that's the case. I'm also not sure why it would be a pressing issue, since the functions it uses to do so are things you have to write anyway for normal app operation. If you want

[android-developers] Re: How to design a layout

2008-10-30 Thread Alvin Yates
If you only use one layout, you're telling Android to render 4 objects in a single row. For your design (Using LinearLayout at least) you either need: LinearLayout ...horizontal LinearLayout ...vertical / LinearLayout ...vertical / / ... or... LinearLayout ...vertical LinearLayout

[android-developers] Re: How to add a ImageButton from layout(xml)

2008-10-30 Thread Alvin Yates
If what you're describing went from white rectangle around the image with an orange border to the button is solid white even while clicking on it than what you need to do is edit the image file itself to remove the background color. If you have Photoshop/GIMP, you should be able to do it,

[android-developers] Re: Verify Error with HTTPMIME / MIME4J

2008-10-30 Thread Alvin Yates
My issue is that the class that is conflicting is a part of HTTP MIME though. I'm using Eclipse so I'd assume the issue you're talking about wouldn't actually apply to me. On Oct 30, 4:44 pm, fadden [EMAIL PROTECTED] wrote: On Oct 30, 2:05 pm, Alvin Yates [EMAIL PROTECTED] wrote: ...I

[android-developers] Re: Taking Camera Pictures in app

2008-10-29 Thread Alvin Yates
the first approach, and once the picture is taken, i launch a new activity. the current activity (that your camera preview is running) will go into onPause() onDestroy() phase depends on what you do, u can stop the camera preview there. On Tue, Oct 28, 2008 at 1:02 PM, Alvin Yates [EMAIL

[android-developers] Taking Camera Pictures in app

2008-10-28 Thread Alvin Yates
Still trying to figure this out, but not getting anywhere on it. Does taking a picture using the camera only require creating the Camera.PictureCallback for onPictureTaken() and passing it into Camera.takePicture() as an input? Or do you have to stop the preview, lock the canvas, and

[android-developers] Re: onActivityResult failing to fire

2008-10-23 Thread Alvin Yates
: You'll receive the result immediately prior to onResume(). On Oct 22, 7:41 pm, Alvin Yates [EMAIL PROTECTED] wrote: Under what conditions is onActivityResult() supposed to be called? I'm trying to debug this issue I am having with my app which is a normal press button to save and return thing

[android-developers] Re: onActivityResult failing to fire

2008-10-23 Thread Alvin Yates
In my case, there isn't actually a data exchange at all. This is actually setting my app's Preferences. This is the relevant code: Activity A // Button Listeners accountButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) {

[android-developers] Re: onActivityResult failing to fire

2008-10-23 Thread Alvin Yates
In my case, there isn't actually a data exchange at all. This is actually setting my app's Preferences. This is the relevant code: Activity A // Button Listeners accountButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) {

[android-developers] Re: My application doesn't work...

2008-10-23 Thread Alvin Yates
He's compiling on OS X. That's a Java library that he has zero control over. I get the same error all the time. As far at the spontaneous death, the only thing I can point you to is: emulator: ### WARNING: /etc/localtime does not point to zoneinfo- compatible timezone name Also, did you

[android-developers] onActivityResult failing to fire

2008-10-22 Thread Alvin Yates
Under what conditions is onActivityResult() supposed to be called? I'm trying to debug this issue I am having with my app which is a normal press button to save and return thing and it seems like that never happens. For example: Activity sequence: A - B - C. Each app goes to the new one by

[android-developers] ImageButton layout issues

2008-10-19 Thread Alvin Yates
I am having a problem with how my images display. For some reason, my layout weights are being ignored and my set of ImageButtons in the center of the screen are extending to the bottom of the screen, completely removing the button beneath. Basically, android:scaleType is making the images fit

[android-developers] ImageView not displaying at all

2008-10-17 Thread Alvin Yates
I'm not entirely sure what my issue is here. Basically, I have a set of PNGs I'm simply trying to display on a page as follows, to see how they would fit on the page: Image - Image Image Image Image Image All of the images are in the res/drawable with similar android:src tags. What's