[android-developers] Re: AsyncTask and ProgressDialog

2009-11-07 Thread Streets Of Boston
Lance is absolutely right. I ran into this problem a few months ago. Possible solution: Hold a static handle to your currently active instance of your activity (works only if you have at most one active instance of your activity at any given time in your process). public class MyActivity extends

[android-developers] Re: AsyncTask and ProgressDialog

2009-11-07 Thread Streets Of Boston
t still doesn't seem to work.. > > > The Toast popup appears twice, then the ProgressDialog just continues > > to run regardless > > > On Nov 7, 5:14 pm, Streets Of Boston wrote: > > > > Lance is absolutely right. I ran into this problem a few months ago. &g

[android-developers] Re: AsyncTask and ProgressDialog

2009-11-08 Thread Streets Of Boston
essing that's why dismissDialog() > doesn't work (on in fact the code in onPostExecute() doesn't get > executed because the phone has change orientation and it's trying to > dismiss a dialog which doesn't exist. > > On 8 Nov, 03:52, Streets Of Boston wrote: &g

[android-developers] Re: AsyncTask and ProgressDialog

2009-11-10 Thread Streets Of Boston
{ >                         this.activity = activity; >                         if ( completed ) { >                                 notifyActivityTaskCompleted(); >                         } >                 } > >         } > > } > > On Nov 10, 5:41 pm, Lee Jarvis

[android-developers] Re: New Developer Distribution Agreement

2009-11-11 Thread Streets Of Boston
Chill out! :=) To me it looks like a more tight-knit version of their earlier agreement. About the 48hour: That was already happening, kind-of. I had some refunds that were about 36 hours after the sale. Am i happy with this long period, no... but it's nothing new, i think. The main changes seem

[android-developers] Re: How native Gallery is reading bigger images!

2009-11-11 Thread Streets Of Boston
I think the Gallery just uses BitmapFactory to read the images. But, the biggest images i've had on my phone are 2048x1539pixels (6MByte uncompressed, when using RGB_565). I've not tried to load a truly huge image. On Nov 11, 12:54 pm, "gaetan.eleo...@gmail.com" wrote: > Hi, i'm wondering too ho

[android-developers] Re: Android 2.0 camera.setParameters(p) - Picture size must be 213x350?

2009-11-16 Thread Streets Of Boston
That's just in the emulator. The emulated camera only 'takes' 213x350 pixel pictures. And you need to deal with it anyway in your code, just in case you set some picture width/height that is not supported by some real Android phone. On Oct 29, 10:03 am, chrispix wrote: > I am having an issue w/ 2

[android-developers] Re: Securing a paid app

2009-11-17 Thread Streets Of Boston
What would happen if someone gets a new android phone? The app's authentication will fail. You should hash/key on the user's google-account, the same key that is used by Android Market (you can download paid apps as often as you want - once you paid for them - based on your google-account) On Nov

[android-developers] Re: fwd: get the file path from a URI instance

2009-11-17 Thread Streets Of Boston
When using openInputStream on the content-resolver, the returned input- stream is not as 'flexible' as a FileInputStream. For example, FileInputStreams can be retried if something goes wrong. The one returned by openInputStream can not. To get the fully qualified path-name to the image-file (jpg/p

[android-developers] Re: Is there any way to display 8000 * 8000 jpeg file without OutOfMemoryException

2009-11-21 Thread Streets Of Boston
Like some others suggested pre-process the large file, break it up in smaller chunks, each chunk being a proper JPEG Then put all the chunks in a RandomAccessFile or a database. Be sure to be able to find the chunks by a row and column index. Then put this RandomAccessFile or database on your phon

[android-developers] Re: OpenGL gluUnProject

2009-11-23 Thread Streets Of Boston
http://groups.google.com/group/android-developers/browse_frm/thread/9d2bf53e3a798cb6/07cfa3ee11507fc1?lnk=gst&q=gluUnproject#07cfa3ee11507fc1 On Nov 22, 3:35 am, Anfernee wrote: > i want to get the 3D coordinate from the android screen x,y > coordinate > i choose to use the gluUnProject > but th

[android-developers] Re: Picture location on HTC sense phones

2009-11-23 Thread Streets Of Boston
If you do a ContentResolver.insert, instead of a MediaStore.Images.Media.insertImage, you have to provide the fully qualified path to the image-file in the ContentValues as well: // fullyQualifiedPathName is the absolute/canonical path-name to the JPEG file. values.put(MediaStore.Images.Medi

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
i've seen this too. I got around it by overriding the problematic View's onRestoreInstanceState method: public void onRestoreInstanceState(Bundle savedState) { ... ... super.onRestoreInstanceState(BaseSavedState.EMPTY_STATE); } I took a look at the android.view.View's implementation of this on

[android-developers] Re: jpg images noisy on sdcard but fine in gallery, only on Android 1.6 (1.5 is fine)

2009-11-24 Thread Streets Of Boston
In your 'public void onPictureTaken(byte[] data, Camera camera)' method You have to create a BMP out of the 'data'. The 'data' is not JPEG. It is RGB data (if i'm not mistaken). Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length); Then you compress the bitmap into jpeg. bmp.com

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
advise you to not hack around the default > implementation of onRestoreInstanceState()  but make sure that your UI > is setup correctly. > > On Tue, Nov 24, 2009 at 7:28 AM, Streets Of Boston > > > > > > wrote: > > i've seen this too. &

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
s here when using 'parcelable'. } } On Nov 24, 5:57 pm, Romain Guy wrote: > That would be worrisome because we do not save/restore the state of > views without ids. > > On Tue, Nov 24, 2009 at 2:39 PM, Streets Of Boston > > > > > > wrote: > >

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
anceState().)... > > read more » > > On Tue, Nov 24, 2009 at 4:41 PM, Streets Of Boston > wrote: > > > > > Thanks Romain, > > > Did not work... still the exception... > > > It occurs on a View with an ID set to 'container'. > > And i went

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
returning?  (You could print the state bundle in > onSaveInstanceState().)... > > read more » > > On Tue, Nov 24, 2009 at 4:41 PM, Streets Of Boston > wrote: > > > > > Thanks Romain, > > > Did not work... still the exception... > > > It occurs on a View with an I

[android-developers] Re: Activity [sometimes] throws Wrong state class exception when being resumed after kill

2009-11-24 Thread Streets Of Boston
happen, despite me coding the ViewBundle incorrectly? On Nov 24, 9:43 pm, Streets Of Boston wrote: > Thank you, Dianne. > This is in my log: > > From onSaveInstanceState, this one is being saved: > 11-24 21:38:52.786: VERBOSE/smugdroid(12475): >   Saved

[android-developers] Re: java.lang.OutOfMemoryError: bitmap size exceeds VM budget

2009-11-25 Thread Streets Of Boston
As in the comment in your bug-report by Romain, you're using too much memory. Note that you only have 16MByte total available RAM for your process, including your bitmaps. - Only load the bitmaps that are absolutely necessary (especially when they become quite large). - Load the bitmaps scaled to

[android-developers] Re: High performance access on static data: What is your approach?

2009-11-25 Thread Streets Of Boston
I use a RandomAccessFile for a thumbnail database. Works pretty fast (i haven't done any exact benchmarking). On Nov 24, 3:09 am, Marc Reichelt wrote: > Hi! > > I am writing a program where I have to access some static data, and > now I am looking for the best method of how to include them into

[android-developers] Re: fwd: get the file path from a URI instance

2009-11-25 Thread Streets Of Boston
Thanks! I never thought about going through the file-descriptor. But why is using the DATA column discouraged? It works fine and it's a public column (not part of a private API or such). On Nov 17, 12:42 pm, Dianne Hackborn wrote: > On Tue, Nov 17, 2009 at 7:06 AM, Streets Of Boston

[android-developers] Re: Is there any way to display 8000 * 8000 jpeg file without OutOfMemoryException

2009-11-25 Thread Streets Of Boston
ey can do such thing. We just got curious about its implement. > > @Robert, ko5tik, Streets Of Boston > Pre-processor is a good suggestion. But the side effect of it is too > many chunk files on SD Card or in flash. Maybe sharp has a smarter way > to achieve it and we just do not kno

[android-developers] Re: fwd: get the file path from a URI instance

2009-11-25 Thread Streets Of Boston
at is > world-readable, which is basically only the media provider.  It really > shouldn't be specified as a generic column, but something very specific to > the media provider.  I would strongly recommend not using it. > > On Wed, Nov 25, 2009 at 11:29 AM, Streets Of Boston

[android-developers] Re: Garbage collector is not recycling Activity

2009-12-01 Thread Streets Of Boston
Could be anything... Do you hold any static references? If so, are these static references to your Activity(s) or to objects that may contain themselves references to your activity? On Dec 1, 5:32 am, Jyothi Prasad wrote: > Hi, > > I have an activity in my app. > When I clicked back key the acti

[android-developers] Re: Pick photo from Gallery

2009-12-01 Thread Streets Of Boston
Take a look the the Intent framework. Start an activity given an intent (PICK_IMAGE) and this should start any app that responds to it (Gallery or some other 3rd party program). For examples, just take a look at the Contacts application in Android's framework's source-code. On Dec 1, 4:28 am, Tom

[android-developers] Re: animation between two activities

2009-12-02 Thread Streets Of Boston
You can attach listeners to your animation: Attach an animation-listener to your rotate-animation. In the 'on- animation-ended' callback of the listener, do the startActivity(...). When the animation ends, this callback is automatically called and will then start the activity. On Dec 2, 3:19 a

[android-developers] Re: ProgressDialog from within ContentProvider class!

2009-12-05 Thread Streets Of Boston
If you need to inform user of progress of your ContentProvider's actions, you shouldn't do it directly in your ContentProvicer, as the other posters in this thread have said as well. Instead, you could have your ContentProvider-process implement a Service as well that will call back into any Activ

[android-developers] Re: Apps silently close due to low memory (in remote Content Providers)

2009-12-06 Thread Streets Of Boston
It would still be nice to see some kind of callback/warning that such a thing is about to happen. I'm writing an app that uses a cursor to iterate over images from the system's media-content-provider. Sometimes this content-provider is being shut-down (low memory) and it takes my application down

[android-developers] Re: Inconsistent results from date additions loop

2009-12-07 Thread Streets Of Boston
You don't know how many milliseconds there are in a day, or even how many hours there are. Most days have 24 hours, one may have 23 and an other may have 25 hours ( DST ). And this depends whether your timezone has DST or not. The Calendar class should be able to figure all this out. However, if

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-07 Thread Streets Of Boston
How fast is 'decodeYUV' method? You call this method while your canvas is locked. If 'decodeYUV' is slow, it not only makes your background thread sluggish, but your main GUI-thread as well, because the canvas is locked for too long. Also, you don't synchronize on '_data'... Your implementation of

[android-developers] Re: Problem Troubleshooting Vista ADB USB Connection.

2009-03-12 Thread Streets Of Boston
If you have Vista 32 bit installed, it should work and i can't help you to fix your problem. However, if you have a 64bit system, check this thread: http://forum.xda-developers.com/showthread.php?t=446274&highlight=64bit+usb It may fix your issues :) On Mar 11, 4:12 pm, JLMG wrote: > This one

[android-developers] Re: Menu option starts Thread - menu hangs.

2009-03-12 Thread Streets Of Boston
Could you provide a code-snippet showing how you coded the menu- handling and the starting of your thread? On Mar 12, 10:00 am, Ikon wrote: > Hi, > > I am developing a game based on the SurfaceView/LunarLander example in > the sample code. > I have one activity, with one menu option that is "ne

[android-developers] Re: how to transfer an action(ex:key press) from an Activity to other Activities

2009-03-12 Thread Streets Of Boston
First you should figure out what you really try to accomplish. I don't know the details of your app, but i guess that your goal is not to push a button. The goal is the action that occurs when the button is pushed. I would just call the action (method/java-code/etc) directly that would have been

[android-developers] Re: Does Camera API really works ?

2009-03-12 Thread Streets Of Boston
wn issue? Any suggestions? > > On Mar 10, 6:50 pm, Streets Of Boston wrote: > > > > > Maybe this piece of code won't work, but i'm writing an app that > > successfully uses thecamera. > > No crashes :)  ...   ... so far ... :=) > > > On Feb 17,

[android-developers] Re: How to implement android's Gallery fling action in my own widget

2009-03-12 Thread Streets Of Boston
Take a look at the GestureDetector class. - Create an instance of GestureDetector. - Handle the onTouch event of your activity. In your onTouch event handler, forward the MotionEvent to this GestureDetector instance. - Assign a listener to this GestureDetector (one that implements onFling, amon

[android-developers] Re: How to port AbsoluteLayout to FrameLayout?

2009-03-12 Thread Streets Of Boston
Where did you read it became obsolete. I just checked the reference docs and it's not been obsoleted/ deprecated. On Mar 12, 7:34 pm, Meryl Silverburgh wrote: > Hi, > > AbsoluteLayout has become obsolete, I need to convert it to FrameLayout. > > My problem is in AbsoluteLayout.LayoutParams, I ca

[android-developers] RemoteCallbackList.getBroadcastItem(int) sometimes returns null

2009-03-12 Thread Streets Of Boston
Hi, I found out that RemoteCallbackList.getBroadcastItem(int) sometimes returns null. I have this code in my Service and it raises a null- pointer exception: ... // instance variable of my Service final RemoteCallbackList mCallbacks = new RemoteCallbackList(); ... ... publ

[android-developers] Re: Menu option starts Thread - menu hangs.

2009-03-12 Thread Streets Of Boston
            shape[0].visible = true; >                 score = 0; > >             mLastTime = System.currentTimeMillis() + 100; >             setState(STATE_RUNNING); >         } >     } > > Thanks, > Ayan > > On Mar 12, 10:28 am, Streets Of Boston > wrote: > &g

[android-developers] Re: how to transfer an action(ex:key press) from an Activity to other Activities

2009-03-12 Thread Streets Of Boston
ss > Green Key, i want my application to exit and transfer this EVENT to original > dialer. Do you have any idea to solve my problem? > > On Fri, Mar 13, 2009 at 2:12 AM, Streets Of Boston > wrote: > > > > > > > First you should figure out what you really try to accomplis

[android-developers] Re: RemoteCallbackList.getBroadcastItem(int) sometimes returns null

2009-03-12 Thread Streets Of Boston
null (actually that field is final), so I don't really see how that can > > happen.  Are you sure you aren't potentially doing this loop from different > > threads without doing your own synchronization? > > > On Thu, Mar 12, 2009 at 6:07 PM, Streets Of Boston < >

[android-developers] Re: RemoteCallbackList.getBroadcastItem(int) sometimes returns null

2009-03-13 Thread Streets Of Boston
Ah, thanks. Either way, it means that the number of items in the list accessed by getBroadcastItem is always equal to N. The problem remains: How can getBroadcastItem(int) return null? On Mar 13, 4:53 am, Dianne Hackborn wrote: > On Thu, Mar 12, 2009 at 8:08 PM, Streets Of Boston >

[android-developers] Re: How to port AbsoluteLayout to FrameLayout?

2009-03-13 Thread Streets Of Boston
I'm using the AbsoluteLayout in one of my apps and it can be useful. However, i think it'll be deprecated because the AbsoluteLayout is device(/screen) dependent. E.g., if a new phone comes out with a square screen instead of 320x480, your app starts to look funny. You can mitigate this somewhat b

[android-developers] Re: service start and ui hanging

2009-03-13 Thread Streets Of Boston
Hi Bob, Your code snippet is not enough to give you some more info. E.g. how does backgroundRefresh2 looks like (it public void run() implementation). Based on its name 'backgroundRefresh2': does it access View-s and modify these view (e.g. update text-view, images, etc.)? If so, that may explai

[android-developers] Re: RemoteCallbackList.getBroadcastItem(int) sometimes returns null

2009-03-13 Thread Streets Of Boston
ekend! On Mar 13, 12:58 pm, Dianne Hackborn wrote: > On Fri, Mar 13, 2009 at 7:27 AM, Streets Of Boston > wrote: > > > Either way, it means that the number of items in the list accessed by > > getBroadcastItem is always equal to N. > > The problem remains: How can getBr

[android-developers] Re: RemoteCallbackList.getBroadcastItem(int) sometimes returns null

2009-03-13 Thread Streets Of Boston
ed by the handler. > > On Fri, Mar 13, 2009 at 10:55 AM, Streets Of Boston > > > > > > wrote: > > > Ah, now i get it! :-) > > > Indeed, sendProgressCallback can be called from multiple threads. And > > with your earlier explanation that the beginBroadca

[android-developers] Re: Development Platform Compatibility

2009-03-16 Thread Streets Of Boston
I'm developing on my Vista 64 with Eclipse and all works very well. (I have the unsigned 64 bit USB driver, with Vista 64 running in 'test' mode) On Mar 16, 4:02 am, Al Sutton wrote: > I'd go for XP64 personally. > > No matter what I do I can't get the G1 recognised by adb on 32 bit > Vista, but

[android-developers] Re: Paid applications and market feedback/rating

2009-03-16 Thread Streets Of Boston
I'm not absolutely sure, but i'm pretty sure this is possible. It'll a different application with its own set of comments and ratings. In one way it makes sense. When people pay for an application, their ratings may be different than for a free version of it. When people pay, they may have a diff

[android-developers] Re: Paid applications and market feedback/rating

2009-03-16 Thread Streets Of Boston
I had a typo in my previous message: Change this "... but i'm pretty sure this is possible ... " to this "... but i'm pretty sure this is NOT possible ... " On Mar 16, 11:33 am, Streets Of Boston wrote: > I'm not absolutely sure, but i&#

[android-developers] Re: ContentProvider not backed by SQLLite?

2009-03-16 Thread Streets Of Boston
I wrote one that goes out to the internet and fetches data. In my code, I use the 'String[] projections' to create my own Cursor implementation. I make a subclass of 'Cursor', an instance of which will be returned by my ContentProvider's query method. The constructor of this Cursor-subclass takes

[android-developers] Re: GridView ImageView and performance

2009-03-17 Thread Streets Of Boston
I had similar issues. I managed to fix the performance of the list- view, but i ran into memory issues. My app downloads images from Smugmug, images that are 'front-page' images of galleries/albums. First, my app needed to get the information about the album, to get the image-id of the album's fr

[android-developers] Re: how to take small picture

2009-03-18 Thread Streets Of Boston
Take a look at the Bitmap and BitmapFactory classes in the Android SDK On Mar 18, 1:52 pm, cindy wrote: > Hi, > > Is there anyway to reduce the resolution of picture taken using > camera? It takes long time to upload the image to server. Does anyone > use any compression software for image ? > >

[android-developers] Re: How to detect Fling action in my widget

2009-03-18 Thread Streets Of Boston
Make sure you return the correct boolean-values in the other methods of your OnGestureDetector (onDown, onScroll, etc). On Mar 18, 2:51 pm, Meryl Silverburgh wrote: > Hi, > > Can you please tell me how can I detect Fling action in my own widget? > I have implemented my widget as OnGestureListene

[android-developers] Re: Scheduling a repeating task and being notified

2009-03-19 Thread Streets Of Boston
I did something similar, however, i did not use a BroadcastReceiver to get callbacks back from the service. Instead i used the RemoteCallbackList class: http://developer.android.com/reference/android/os/RemoteCallbackList.html No fiddling with intents and such. Just define a callback interface

[android-developers] Problem launching my own (camera) application on press of Camera-button

2009-03-19 Thread Streets Of Boston
When i press the phone's camera button, both my application and the system's camera application are launched: - I press camera button - After a few seconds, my camera app appears and all looks good. - However, when i go back (back-button), i'm not brought back to where i was before. Instead, i'm

[android-developers] Re: How do I draw on canvas instantly?

2009-03-19 Thread Streets Of Boston
Use a different Thread that draws on the SurfaceView directly. You can draw as fast and as immediate as your Thread allows. http://developer.android.com/reference/android/view/SurfaceView.html - Get the SurfaceHolder of the SurfaceView. - Every time you want to draw, begin by calling the Surface

[android-developers] Re: Problem launching my own (camera) application on press of Camera-button

2009-03-20 Thread Streets Of Boston
Thanks! I'll give that a try. On Mar 19, 7:12 pm, Marco Nelissen wrote: > Try calling abortBroadcast() in your receiver. > > On Thu, Mar 19, 2009 at 7:18 AM, Streets Of Boston > > > > wrote: > > > When i press the phone's camera button, both my

[android-developers] Re: Help with dialog builder and resource problem please

2009-03-20 Thread Streets Of Boston
If i understand various messages i've read on this board correctly, you can not bundle Android resources in a shared library. You can only bundle share classes (and regular java-resources, i hope) in JARs. I was trying to do the same, sharing layouts, bitmaps, etc among a suite of applications. I

[android-developers] Re: Retreivng data from internet source.

2009-03-21 Thread Streets Of Boston
Your use of HttpGet is good. However, you cast an InputStream to a char-sequence when calling tv.setText((CharSequence)input);. This will give you a class-cast exception. Read char-data from the InputStream instead. Also, try to find out if 'entity' has some methods to get a String back that has

[android-developers] Re: Where is the source code for "Pictures" app

2009-03-22 Thread Streets Of Boston
http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=tree;f=src/com/android/camera;h=b59e44fcf7eda59ed76597efe26ac8a25696c798;hb=8250896ab37545f4499da79f54c19af2e5018b80 On Mar 22, 8:24 pm, Yves Liu wrote: > Thanks. > > > > On Sun, Mar 22, 2009 at 4:38 PM, Andrew Stadler wrote:

[android-developers] Re: Displaying image from internet source

2009-03-23 Thread Streets Of Boston
We won't know what's going on unless you show us a strack-trace of the error. :=) Look at LogCat and copy/paste the strack-trace in this thread. All i can do now is guess: How big is your image? You create two arrays (int[] and byte[]) which are never used. This is memory waste. The inputstream '

[android-developers] Re: Problem in converting byte array in Bitmap.

2009-03-23 Thread Streets Of Boston
Is the byte-array you saved in the database *exactly* the same as the byte-array returnes by src.getBytes() in your getBitmapFromString (String) method? I'd be worried that c.getString() may change the underlying byte-array to adher to the default UTF-8 encoding. On Mar 23, 12:10 am, Komal wrot

[android-developers] Re: Displaying image from internet source

2009-03-23 Thread Streets Of Boston
yManager(51): Process > com.organiser.college (pid 767) has died. > 03-23 16:20:39.030: INFO/WindowManager(51): WIN DEATH: Window{4342f180 > com.organiser.college/com.organiser.college.CollegeOrganiser} > > I have pretty much no idea what any of that stuff means. > > On Mar

[android-developers] Re: " IWindowManager Not Available "

2009-03-23 Thread Streets Of Boston
And that's a BIIIGG 'if'. :-) Trust Dianne on this. Do not use any API that is private. If you do, at some point in time you will (and that's a 100% sure) break your application and you will get a lot of angry customers. On Mar 23, 3:16 pm, Rajendrakumar Chinnaiyan wrote: > If they won't c

[android-developers] Re: Get scroll position in a list activity

2009-03-24 Thread Streets Of Boston
I've done the same in my apps for ListView (whether they be in ListActivity or in a plain Activity) with good success. I use the java.util.concurrent's ExecutorService to obtain images: 1. Your getView(..) (or bindView/newView/etc) needs to assign an image/ thumbnail (bitmap) to an ImageView. Bu

[android-developers] Re: Get scroll position in a list activity

2009-03-24 Thread Streets Of Boston
sed and to be assigned to a different image. return convertView; } [/code] On Mar 24, 10:13 am, Streets Of Boston wrote: > I've done the same in my apps for ListView (whether they be in > ListActivity or in a plain Activity) with good success. > > I use the java.util.concurrent

[android-developers] Question about one application requiring another application or service

2009-03-24 Thread Streets Of Boston
Hi everyone, I'm writing an app that needs one or more applications/services that are distributed with their own seperate apk file. I'm writing a user-app that allows the user to upload pics using a service. The service can be used by multiple user-apps, not just mine. I'd like to have the servi

[android-developers] Re: Question about OpenGL literature

2009-03-25 Thread Streets Of Boston
Google this opengl es I found the links to the khronos web-pages most helpful. Other links found by google can be helpful as well :-) Another source is the OpenGL examples on the APIDemos bundled with the Android SDK. For books; i cannot help you there. On Mar 25, 7:43 am, EvgenyV wrote: >

[android-developers] Re: how to get the current matrix mode?

2009-03-25 Thread Streets Of Boston
Before you do all the work, take a look these classes bundled in the OpenGL session of the APIDemos of the samples in the Anroid SDK: MatrixTrackingGL.java. In your SDK or online: http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/OpenGLES/SpriteText/src/com/google/android/open

[android-developers] Re: photo picker Uri issue

2009-03-25 Thread Streets Of Boston
This Uri is the logical (not physical) path used by the image content provider. If you want to get the physical path to the actual file on the SD- card, query this Uri: Cursor cursor = query(photoUri, new String[] {MediaStore.Images.ImageColumns.DATA}, null, null, null); String absoluteFilePa

[android-developers] Re: File size column in image database is always 0 for the newest image

2009-03-26 Thread Streets Of Boston
I had the same problem and it was driving me nuts. I think it's a bug. Below is how i worked-around it. Do what you do now by calling insertImage(...). This will insert the image into the data-base; however, thumbnails are not correctly generated and the SIZE attribute is 0 (your problem that you

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Streets Of Boston
Add my vote for this option/feature: A permission for an app to become the only app running (except maybe the phone-app and incoming SMS, etc). On Mar 26, 7:26 am, Stoyan Damov wrote: > I've also proposed a solution to this - adding a permission for apps > to request that they run alone, uninter

[android-developers] Re: File size column in image database is always 0 for the newest image

2009-03-26 Thread Streets Of Boston
You still may need to do this, though. With my application; if i don't do the MediaScanner thing, the 'Pictures' application will crash! You may find the same problem. Try to insert an image (with the SIZE being 0), then close your app and start the stock 'Pictures' application. Check if it crash

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Streets Of Boston
I should have added that this would apply to the phone's *foreground* application only. Or at least something that allows the foreground app to get a very high priority and resource allowance from the operating system to minimize the influence of non-essential (background) applications. On Mar 2

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Streets Of Boston
eers: We heard from you what's *not* possible. But what could be possible? I'd be interested in hearing about this from you all, even if the ideas seam outlandish. :-) On Mar 26, 6:05 pm, Sundog wrote: > On Mar 26, 3:52 pm, Streets Of Boston wrote: > > > I should have added tha

[android-developers] Re: File size column in image database is always 0 for the newest image

2009-03-27 Thread Streets Of Boston
Read my post from yesterday at 10am again :-) Execute a query using your content-uri, and use the returned cursor to obtain the physical file-path (use the ImageColumns.DATA). On Mar 27, 9:27 am, matthias wrote: > okay, one solution is to do something like this: > >         String path = Enviro

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-27 Thread Streets Of Boston
"But discarding background apps is not the appropriate solution, it's just one easy solution" Easy solutions are usually pretty good! :-) But maybe not in this case. Romain, what would you deem to be appropriate solutions? Thanks Dianna, "We are looking at more strongly enforcing that background

[android-developers] Re: need some collection help

2009-03-27 Thread Streets Of Boston
You can not create a Collection. It is an interface, as other already pointed out. Judging from your other posts, i'd suggest your using an ArrayList. An ArrayList is basically some behavior around an array of objects (in your case Car[]). Internally, it's using an array and it handles all the in

[android-developers] Re: Question about one application requiring another application or service

2009-03-28 Thread Streets Of Boston
Bump :-) Has anyone dealt with a similar problem before? Thanks! On Mar 24, 3:32 pm, Streets Of Boston wrote: > Hi everyone, > > I'm writing an app that needs one or more applications/services that > are distributed with their own seperate apk file. > > I'm writin

[android-developers] Re: Question about one application requiring another application or service

2009-03-29 Thread Streets Of Boston
r app- permissions are confirmed by the user). On Mar 28, 8:46 pm, Mark Murphy wrote: > Streets Of Boston wrote: > > Bump :-) > > Has anyone dealt with a similar problem before? > > I will be dealing with a similar problem over the next month or so. Take > these thoughts with

[android-developers] Re: Paid upgrades discussion

2009-03-29 Thread Streets Of Boston
I'm not a hundred percent sure, but very close to 100% :-) Google's Android Market does not provide upgrade functionaliy, except free upgrades forever. Sorry... :( I'm sorry to say this, but you could have known this before you put all this work in, if you had read the terms and agreements of th

[android-developers] Re: IntBuffer Overflow - OpenGL ES

2009-03-30 Thread Streets Of Boston
Good to know. At least it's good to know that i was not going crazy :- D I used the for-loop solution to get around this issue. On Mar 30, 7:04 am, Daniel Johansson wrote: > I'm experiencing the same behavior, and I'm pretty sure it's a bug. > > I have been testing this thoroughly and it simply

[android-developers] Re: Photo Picker

2009-03-30 Thread Streets Of Boston
This works as designed. The getDataString() is the string of the content Uri that refers to the image. If you want the physical filename, do a 'Cursor cursor = getContentResolver().query(intent.getData(), null, null, null, null)' and query the column ImageColumns.DATA on the returned cursor. The

[android-developers] Re: Android Physics Engine

2009-03-30 Thread Streets Of Boston
I wonder how well this one works on Android: http://code.google.com/p/simpull/ -- Anton Spaans On Mar 30, 4:58 pm, Anton wrote: >     I have a simple 2D physics engine written and running.  It uses > the now famous Jacobson physics tricks (Verlet integration and hard > constraints).  I can m

[android-developers] Re: Android Physics Engine

2009-03-30 Thread Streets Of Boston
rough the code and found > that it does a lot of memory allocation in it's inner loops (Verlet > update step in particular), and that it uses floating point math, > though it looks like there is a branch that uses fixed point that > might be worth trying out. > >     -Anton &

[android-developers] Re: Photo Picker

2009-03-30 Thread Streets Of Boston
I doing > something wrong here, or am I that bad at coding Android? > > On Mar 30, 4:37 pm, Streets Of Boston wrote: > > > > > This works as designed. > > > The getDataString() is the string of the content Uri that refers to > > theimage. > > If you wan

[android-developers] Re: dispatchTouchEvent works differently when finger hold on touch screen in G1 & emulator

2009-03-30 Thread Streets Of Boston
Override you dispatchTouchEvent(...), as you do right now, and forward its MotionEvent to a GestureDetector you created. public class MyView { GestureDetector mGD = new GestureDetector(this); public MyView(...) { ... ... mGD.setIsLongPressEnabled(true); ...

[android-developers] Re: Save an mp3 from a remote site

2009-03-31 Thread Streets Of Boston
This is just copying the file. The question remains if you can play it or not... :=) I have not looked into this at all, but DRM could prevent the mp3 from playing. On Mar 31, 9:55 am, iDeveloper wrote: > Thanks a ton. Didn't know android allowed saving to mp3 directly   > unlike an iphone. > >

[android-developers] Re: fullscreen rendering and MEMORY_TYPE_GPU?

2009-03-31 Thread Streets Of Boston
This means that the RenderThread has been paused or not yet been started properly. Make sure you resume it when your activity's onResume is called. If you're using the code from example GLSurfaceView, removing the 'wait ()' will make your future customers quite angry: Their battery will be drained

[android-developers] Re: Photo Picker

2009-03-31 Thread Streets Of Boston
and > > > it just wants me to change it to "getLong" but if I do that, it just > > > tells me to change it back to "getString" again... Am I doing > > > something wrong here, or am I that bad at coding Android? > > > > On Mar 30, 4:37 pm, Street

[android-developers] Re: Photo Picker

2009-03-31 Thread Streets Of Boston
Displayed activity > com.android.camera/.ImageGallery2: 2455 ms > 03-31 11:34:39.525: VERBOSE/ImageGallery2(11143): / > ImageBlockManager.onPause > 03-31 11:34:49.519: WARN/ActivityManager(55): Launch timeout has > expired, giving up wake lock! > > On Mar 31, 10:24 am, Streets Of

[android-developers] Re: Troubles with SurfaceView's surfaceCreated/Destroyed

2009-03-31 Thread Streets Of Boston
I haven't read through all your code, but you should not call thread.start() in your surfaceCreated method. Instead, create and start your thread asap and have it paused when necessary. When 'onPause()' or when surfaceDestroyed is called, pause your thread (CupThread). When 'onResume()' or surfac

[android-developers] Re: How to make a ListView adapt to dynamic element sizes?

2009-04-01 Thread Streets Of Boston
If your list-view uses a (list-)adapter (or a subclass of this), did you try to call notifyDataSetInvalidated() on the adapter? This will cause your adapter's getView(int position, View convertView, ViewGroup parent) to be called again and you can handle your changed list-item in there. On Apr 1,

[android-developers] Re: photo picker Uri issue

2009-04-01 Thread Streets Of Boston
uteFilePath = cursor.getString(0); > > On Mar 26, 8:57 am, beachy wrote: > > > > > cheers, did not know that about Drawables will use Bitmaps then. > > > Thanks, > > Greg. > > > On Mar 25, 3:23 pm, Streets Of Boston wrote: > > > > This Uri i

[android-developers] Re: Android Physics Engine

2009-04-01 Thread Streets Of Boston
run continuously in loops, so I don't know how optimised > > > > > these physics engines are for this purpose. > > > > > > Would be interesting to find out though. > > > > > > On Mar 31, 12:52 pm, mscwd01 wrote: > > > > > > > Oh I f

[android-developers] Re: Troubles with SurfaceView's surfaceCreated/Destroyed

2009-04-01 Thread Streets Of Boston
Do *not* use volatile variables. They are not guaranteed to be atomic. It's just a compiler hint. Instead, use synchronized blocks: class MyThread extends Thread { boolean mPaused; boolean mStopped; public void run() { ... ... mStopped = false; mPaused = true or false, dep

[android-developers] Re: Scroll and drag a TileView widget around by finger / touch

2009-04-01 Thread Streets Of Boston
What about using a ScrollView as your container view?: LinearLayout |-->ScrollView |--> SkyView On Apr 1, 11:49 am, acrosser wrote: > Surely this hasn't stumped the group of brilliant Android > developers! :-) Is there any tutorial or reference page someone can > point me to? > > On Mar

[android-developers] Re: Static Variable Instantiation

2009-04-01 Thread Streets Of Boston
Short answer: Don't use static variables :-) Somewhat longer answer: If sub-activities need to access some data held by my main activity, i usually do create one static variable: public MyActivity extends Activity { >> public static final MyActivity ACTIVE_INSTANCE; << protected void onCrea

[android-developers] Re: Some of the strange JAVA syntax - android specifics?

2009-04-01 Thread Streets Of Boston
@Override is a so-called annotation. It does not generate any byte-code/runnable-code. It just tells the compiler that the method below it is an override of its super-class' method. If your super-class changes its signature of onDraw, your compiler will warn you about the fact that your method (in

[android-developers] Re: photo picker Uri issue

2009-04-01 Thread Streets Of Boston
result=-1, data=Intent { data=content://media/ > external/images/media/7 }} to activity {com.app.name/ > com.app.name.activity}: > android.database.CursorIndexOutOfBoundsException: Index -1 requested, > with a size of 1 > > What does that mean? > > On Apr 1, 9:44 am, Streets O

  1   2   3   4   5   6   7   8   9   10   >