Re: [android-developers] Re: Comments/Ratings not showing up on Market

2011-05-22 Thread Tom Gibara
Personally, it's exactly the sort of optimization I would anticipate in a server application that has been designed for scalability. The user making the comment will expect it to appear immediately and may become confused if it doesn't. On the other hand, users will not generally notice a delay in

[android-developers] Can we use AbstractCursor to support data changes?

2011-03-07 Thread Tom Gibara
I'm currently trying to create a Cursor implementation where the data set can change in response to information received over the network, but I can't see any way of actually doing this using AbstractCursor. AbstractCursor appears to implement the necessary observer registration methods for me, bu

Re: [android-developers] In-app billing - ITEM_ID limitations

2011-02-10 Thread Tom Gibara
Only just saw your reply, thanks Trevor. It looks like this will support just what I need. In my case, I'm going to have a small number of item classes, but each item the user buys will be unique. The uniquifying data will be small - just a couple of dozen bytes at most and acts as a natural key f

Re: [android-developers] Re: Determining in advance how much text will fit into a given TextView?

2010-12-17 Thread Tom Gibara
>From a Google UI engineer: http://www.pushing-pixels.org/2010/12/16/meet-the-green-goblin-part-4.html On 17 December 2010 23:33, HippoMan wrote: > Yes, but I can only apply this math if I know how the text will be > word-wrapped. This means that I have to word-wrap it myself and then > do the ca

Re: [android-developers] New ADT 8.0.1

2010-12-07 Thread Tom Gibara
.com/android/ADT-8.0.1.zip and install it from this > archive. > > On Tue, Dec 7, 2010 at 11:29 AM, Tom Gibara wrote: >> My eclipse isn't picking up any new packages when I try "Install New >> Software...". Is there another channel through which to pick up the &

Re: [android-developers] New ADT 8.0.1

2010-12-07 Thread Tom Gibara
My eclipse isn't picking up any new packages when I try "Install New Software...". Is there another channel through which to pick up the new version, or is there just some propagation delay? Tom. On 7 December 2010 19:08, Xavier Ducrohet wrote: > Hey all, > > If you installed ADT 8.0.0 and had i

Re: [android-developers] Specs say High Resolution Application Icon has alpha, it doesn't

2010-12-07 Thread Tom Gibara
Yes, a clarification would be nice, but I don't think it's essential at this point. If you upload a PNG with alpha, it's displayed with a black background and no transparency. From this I conclude that the "(no alpha)" label on the form component is accurate. At the same time, it's so alien to hav

Re: [android-developers] Re: Android 2.3: eclipse reporting "Unable to execute dex: null"

2010-12-07 Thread Tom Gibara
;> 242) >>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) >> >> This is the output i get when cleaning a previously working Android >> project that has dependencies to a normal Java project. Not all that >> helpful either, at least for me :/ &g

[android-developers] Android 2.3: eclipse reporting "Unable to execute dex: null"

2010-12-06 Thread Tom Gibara
I upgraded to the 2.3 SDK and have hit a problem I can't resolve. First I updated the android plugins for eclipse (3.5.2) to the new version (8.0.0.v201011171904-77661). Then I used the SDK manager within eclipse to install the Android SDK 2.3 API 9 package, its documentation, and the Android SDK

Re: [android-developers] One process, two live Application objects?

2010-10-31 Thread Tom Gibara
Given this strong recommendation against subclassing Application, I'll look to avoid doing so in future projects, but when you say [subclassing Application] gives you *nothing* you can't do in other, better > ways. the main benefit that comes to my mind is that you can expose static accessors fo

Re: [android-developers] Re: Always getting java.lang.VerifyError on 1.6 but fine on 2.1 and 2.2

2010-10-19 Thread Tom Gibara
Yes. Temporarily changing the "Project Build Target" in the project's android properties (assuming you're using eclipse) should highlight any unexpected Java source incompatibilities. Tom. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To

Re: [android-developers] Re: Always getting java.lang.VerifyError on 1.6 but fine on 2.1 and 2.2

2010-10-19 Thread Tom Gibara
Actually, you should build against a version of the platform that has all of the features that your application can use. This is often not the same as the earliest version on which it will run. Tom. -- You received this message because you are subscribed to the Google Groups "Android Developers"

Re: [android-developers] Re: Memory Leaks

2010-10-19 Thread Tom Gibara
> What if the system decides to send KILL to a process running > some background task (application) to regain memory. In that case, the object's memory has not been reclaimed from the heap, the heap has been destroyed. These are two different things: if the VM's process is terminated, it's no lon

Re: [android-developers] Re: Memory Leaks

2010-10-18 Thread Tom Gibara
> It is possible that the finalize() has been called at much later point. I should have probably said that lack of finalize() does not mean that the memory has not been regained. This isn't correct. If an object is an instance of a class with a non-trivial finalize method, then the object's mem

Re: [android-developers] Re: Should I use "synchronized" for a boolean variable

2010-10-18 Thread Tom Gibara
That article provides a neat introduction to using the volatile keyword, but nowhere does it mention IOException and the first pattern it lists (a very common one, directly relating to the OP's question) explicitly does not require synchronization. If Android didn't follow the memory model prescri

Re: [android-developers] Re: User Identity

2010-10-12 Thread Tom Gibara
> I was considering a solution similar to yours, but I wasn't going to force a password - I really hate being forced into creating a new account wherever I go. The sooner the world gives over to ubiquitous OpenId the better. I keep hovering around adopting OpenId, but I have usability concerns

Re: [android-developers] User Identity

2010-10-12 Thread Tom Gibara
I've been wrestling with the same problem. I've decided that my approach will be to register, unseen to the user, an anonymous account when they first need an identity on the server (eg. when posting their first high-score). Then, after they have continued to use the app for a time (eg. when they

Re: [android-developers] Re: Market misery !!

2010-10-09 Thread Tom Gibara
It's been a while since i read the Developer Distribution Agreement, but I'm pretty sure that is this explicitly forbidden in the Android Market. Of course, whether it's enforced (or even enforcible) is another matter. Tom. On 9 October 2010 22:32, Lance Nanek wrote: > Some of the companies I'v

Re: [android-developers] Re: Creating a vertical spacer

2010-10-08 Thread Tom Gibara
It's not really possible for the system to know this at build time. The presence of the layout_ attributes can be provided by styles that may be absent in some resource configurations. Because of this their omission is essentially a runtime condition. Tom. On 8 October 2010 22:33, Kostya Vasilyev

Re: [android-developers] Creating a vertical spacer

2010-10-08 Thread Tom Gibara
Difficult to say without the stack trace, but I notice that there's no layout_height attribute on the View. Tom. On 8 October 2010 22:05, DanH wrote: > Kind of an newbie question, I suppose -- I haven't done much playing > with layouts yet -- > > I want a spacer in a layout to space some text d

Re: [android-developers] Re: Retrieve android:versionName from Library Project

2010-10-06 Thread Tom Gibara
Actually, I don't think anything does get merged from the library manifest into the dependent project's manifest, though I don't have an opportunity to verify that at the moment; I'm pretty sure that I've seen a comment somewhere that suggested it is the intention, but for a future release. Tom.

Re: [android-developers] Re: thousands of strings

2010-10-04 Thread Tom Gibara
> > There's no index "lookup" -- it's a "look-at" operation -- no searching. I didn't mean to imply that there was searching. And you have to write the code to build the other ways too. One way or another there must be logic to read the (presumably plain-text) source file and insert it into:

Re: [android-developers] Re: thousands of strings

2010-10-04 Thread Tom Gibara
cord. But more importantly, SQLite has to > create substantial runtime structures to access the database > efficiently, chewing up precious RAM. And it's an order of magnitude > slower. > > But I suppose if you want to obfuscate an application, SQLite is the > way to do it. > &g

Re: [android-developers] Re: thousands of strings

2010-10-04 Thread Tom Gibara
This combination of a data file + supplementary file for faster access, is indeed very well established. Developers have spent considerable time providing robust and efficient implementations, where they are often referred to as tables and indexes, and exposed via a software component that's often

Re: [android-developers] Creating URI from resource Id

2010-10-03 Thread Tom Gibara
Here's a snippet of code I use for this task: Resources resources = context.getResources(); Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId) ); Tom. On 3

Re: [android-developers] Re: android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Tom Gibara
Based on my experience with similar implementations, I would recommend this approach. In my case, I used a ContentProvider to accumulate data from an IntentService. This allowed me to obtain data in the form of Cursors that would automatically trigger view updates in response to change notificatio

Re: [android-developers] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Tom Gibara
is currently displayed. Can you > make sure this works? Yes! Should this be documented? I would think it is > absolutely essential. > > > On Sat, Oct 2, 2010 at 6:25 PM, Tom Gibara wrote: > >> AsyncTask is excellently documented: >> >> http://developer.android.co

Re: [android-developers] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Tom Gibara
AsyncTask is excellently documented: http://developer.android.com/reference/android/os/AsyncTask.html AsyncTask has no interaction with the Activity lifecycle, except for that which you introduce with your own code. It's for preci

Re: [android-developers] What's the status of installing a non-market apps?

2010-09-27 Thread Tom Gibara
I wrote Betan to simplify distributing beta copies, for both me and my users. http://www.tomgibara.com/android/betan/ Though you've ruled out 'auxiliary applications', my experience since writing Betan is that users haven't been discouraged or confused by following the instructions. This is how I

Re: [android-developers] How to connect android to Google App Engine

2010-08-28 Thread Tom Gibara
I've just published an updated to my Betan application for sharing beta copies of Android apps. It now includes a server-side app that I implemented using GAE so that other developers can take advantage of it. Do I use REST or simple HTTP post/get? These aren't really in opposition. I would gene

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread Tom Gibara
I wasn't able to fully follow your description, but this bit caught me eye: "Userselection" is the value chosen by the user from a list pre-populated by > the Keys in the Manager class to begin with. So if the user was able to make > the selection, the key was there at the start of the Activity, a

Re: [android-developers] Re: Android bitmap allocation weirdness

2010-08-27 Thread Tom Gibara
Also did you ever find > a workaround, I read the part about not allocating large memory chunks > but sometimes that's necessary for some of the applications I'm > writing. > > BR Viktor > > On Aug 27, 4:19 pm, Tom Gibara wrote: > > Viktor, This question comes u

Re: [android-developers] Re: Android bitmap allocation weirdness

2010-08-27 Thread Tom Gibara
Viktor, This question comes up in various guises. I think your problem is explained by some old posts I made on this thread. http://groups.google.com/group/android-developers/browse_thread/thread/ee5e49740cd54eaa/ec3614a46c5eb79f

Re: [android-developers] with Android 2.2, SD card file directory list now in reverse alphabetical order?

2010-07-24 Thread Tom Gibara
>From the Sun/Oracle javadocs: There is no guarantee that the name strings in the resulting array will > appear in any specific order; they are not, in particular, guaranteed to > appear in alphabetical order. Tom. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara

Re: [android-developers] Re: How could I avoid others to get my used pictures in my application?

2010-07-23 Thread Tom Gibara
I don't think you are correct on 1. I believe all apps have access to the resources of any other app, though I'm not certain about this - I've certainly always assumed that the resources of my applications are public in this way. Tom. -- Tom Gibara email: m...@tomgibar

Re: [android-developers] Best practice to pass persistent objects from an activity to another activity

2010-07-05 Thread Tom Gibara
It depends very much on the object you want to pass and how its going to be used. I've used a number of different techniques in my applications, and each one is best suited to different situations. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog:

Re: [android-developers] Re: Resource Alias not resolving

2010-07-04 Thread Tom Gibara
, really interesting. I'm quite excited about what developers will be able to do with progressive enhancement in this area. The web design community has been applying the principles of graceful degradation for a long time, but adaption to varying screen sizes mostly ended with CSS powered fluid

Re: [android-developers] Re: Resource Alias not resolving

2010-07-04 Thread Tom Gibara
t; designers want to export graphical assets into UIs that, for their complexity, the developers don't want to touch - let alone render in code. Tom. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara -- You received this

Re: [android-developers] Re: Resource Alias not resolving

2010-07-04 Thread Tom Gibara
h might be unwieldy - I'm having difficulty visualizing how many variations developers could be required to accommodate so I'm not sure. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara On 4 July 2010 12:53, Mark

Re: [android-developers] Re: Resource Alias not resolving

2010-07-04 Thread Tom Gibara
ne. So how do we organize our resources such that both of these phones will choose the same image resource for the button, while at the same providing a smaller image for devices such as the G1 (ie. a device that has far fewer pixels, but the roughly same screen size as the Nexus One)? Tom. --

Re: [android-developers] Avoiding GPL

2010-06-22 Thread Tom Gibara
awyer first, contacting the author of the library and explaining the situation. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara On 22 June 2010 08:10, Naveen wrote: > Hi! > I need to use some open source code with G

Re: [android-developers] Re: Camera preview - works on all devices apart from the Droid

2010-06-22 Thread Tom Gibara
I *think* this is caused by the Droid/Milestone not liking the default previewFrameRate that Android sets. Try setting that to one of the values specified by getSupportedPreviewFrameRates(). -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com

Re: [android-developers] Re: glGenTextures going crazy on actual device

2010-06-04 Thread Tom Gibara
you might find useful here: http://blog.tomgibara.com/post/190539066/android-unscaled-bitmaps -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara On 4 June 2010 17:47, Samsyn wrote: > Lance, (and everyone) > > Than

Re: [android-developers] Re: Is your Android app on Archos Market ?

2009-11-07 Thread Tom Gibara
I'm reluctant to respond to this post since it's in the wrong group, but I think its necessary to expose this post's characterisation of Al's posts as a lie (or at the least delusional). In between build-cycles, I've taken the time to read every one of Al's posts. He comes across as a constructive

Re: [android-developers] ADC2 Results Post

2009-11-05 Thread Tom Gibara
I never received an email (spammy or otherwise) but it looks from the list that Google has published that my Daisy Garden entry has made it into the top 200. Thanks to everyone who rated it, congratulations to the other entrants who are still in the running and commiserations to those that aren't (

Re: [android-developers] Re: Urgent: unable to get rid of the memory issues for graphics apps

2009-11-05 Thread Tom Gibara
Just a couple of other pointers: 1) It's really easy to produce a native crash in Skia by unleashing two concurrent threads onto a single Bitmap. 2) There are some significant defects in the general bitmap functions associated with ALPHA_8 bitmaps Further to (2) see these for examples: http://cod

[android-developers] Re: updatePeriodMillis not working for widget on 1.6

2009-10-23 Thread Tom Gibara
But presumably the alarm for updatePeriodMillis will be owned by a system process and will therefore be immune to the task killers. Tom. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To p

[android-developers] Re: Layout with all cells the same size

2009-10-20 Thread Tom Gibara
It's interesting how intuitions vary :) It seems immediate to me, it's a consequence of the fact that views don't exceed their fixed dimensions and weightings mop-up free space. Tom. 2009/10/20 David Given > > -BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >

[android-developers] Re: Layout with all cells the same size

2009-10-20 Thread Tom Gibara
Try setting the width of every child in your LinearLayout to 0, and their weights to 1. Tom On 20 Oct 2009 12:50, "David Given" wrote: I'm trying to do something incredibly simple: I want a layout which evenly divides the space up among its children, so each child is the same size. I cannot fi

[android-developers] Re: Exception - can anyone make sense of this?

2009-10-15 Thread Tom Gibara
at error as far as > I can tell, so how can I tell if it is happening on the real thing? > > > -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara --~--~-~--~~~---~--~~ You received this mess

[android-developers] Re: OOM error caught bei DefaultException handler ... but there is plenty of memory

2009-10-07 Thread Tom Gibara
may be complicated to do and could cause OOMs when WebViews are instantiated - no way around that, your application is simply using too much memory at that point. Tom 2009/10/7 Mariano Kamp > Hi Tom, thanks for taking the time. > > On Wed, Oct 7, 2009 at 8:34 PM, Tom Gibara wrote: > &g

[android-developers] Re: OOM error caught bei DefaultException handler ... but there is plenty of memory

2009-10-07 Thread Tom Gibara
(Disclaimer: what follows is just my understanding of things and may be quite wrong) Bitmap memory management is complicated by the fact that the memory for bitmaps is allocated in a separate native heap. The amount of memory available in this native heap is the total memory allocation limit minus

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Tom Gibara
t matter the type or even > frequency of events being generated. > > On Oct 5, 2:01 pm, Tom Gibara wrote: > > I just read your post. Looks like I hit the same problem about 6 months > ago. > > I even managed to create a mostly-reproducible test case so that I could &

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Tom Gibara
I just read your post. Looks like I hit the same problem about 6 months ago. I even managed to create a mostly-reproducible test case so that I could file an issue: http://code.google.com/p/android/issues/detail?id=1956 (I can only think that it's some sort of fairness issue with monitors)

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-10-01 Thread Tom Gibara
Possibly not as happy as it made me :) It really must have saved so much effort on my part. 2009/10/1 Dianne Hackborn > On Thu, Oct 1, 2009 at 3:27 PM, Tom Gibara wrote: > >> So far I've adapted two applications with no code changes whatsoever >> (other than the af

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-10-01 Thread Tom Gibara
a really high dpi and > thus > >> scales it down.) It's just a case of not being able to use newer APIs > on an > >> older platform. > >> > >> On Thu, Sep 17, 2009 at 4:29 PM, Tom Gibara wrote: > >>> > >>> I just publis

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-10-01 Thread Tom Gibara
ere you will not get the right > result. (I > >> am pretty sure what happens is it sees this as a really high dpi and > thus > >> scales it down.) It's just a case of not being able to use newer APIs > on an > >> older platform. > >> > >>

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-10-01 Thread Tom Gibara
not get the right result. (I am > pretty sure what happens is it sees this as a really high dpi and thus > scales it down.) It's just a case of not being able to use newer APIs on an > older platform. > > > On Thu, Sep 17, 2009 at 4:29 PM, Tom Gibara wrote: > >> I j

[android-developers] Re: Camera and Surface problems with 1.6

2009-10-01 Thread Tom Gibara
r quite a bit for > 3rd party developers who might have ideas in this field. > > Thus, it would seem reasonable to provide an option to receive the > data in either YUV or RGB format. > > > Unfortunately, even if the API's are modified in a future release we > will be s

[android-developers] Re: Camera and Surface problems with 1.6

2009-10-01 Thread Tom Gibara
to a crawl as both the direct feed and manipulated > feed are active and drawing at the same time. > > I would be most grateful for any suggestions on how to resolve this > issue... > > best regards > Anders Johansson > > > > -- Tom Gibara email: m...@tomgibara.c

[android-developers] Notification of SMS messages: android.provider.Telephony.SMS_RECEIVED

2009-09-25 Thread Tom Gibara
I have an application that registers a BroadcastReceiver for Intents actioned "android.provider.Telephony.SMS_RECEIVED". I'm, aware that this was removed from the documentation between 0.9 and 1.0, though it has continued to function since. I've never been totally clear about the status of this Int

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-09-21 Thread Tom Gibara
which actually specifies this. What is the "correct" approach to follow for 1.6 while maintaining compatibility with 1.5? Tom 2009/9/18 Tom Gibara > I just published a simple class for dealing with this minor compatibility > issue; it seems to be working well for my applicati

[android-developers] Re: Cannot upload "Promotional Graphic" to Android Market

2009-09-21 Thread Tom Gibara
For what it's worth, I ran into the same problem yesterday with not being able to upload a promo image. Changing browsers made no difference. In the end I converted it into a high quality JPEG and that worked fine. Tom. 2009/9/8 Streets Of Boston > > I meant that the 'images not sticking' proble

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-09-17 Thread Tom Gibara
ost/190539066/android-unscaled-bitmaps> 2009/9/17 Tom Gibara > Hmm, interesting... > Just had a chance to try this out on 1.5. > > If I move my bitmaps into a drawable-nodpi directory then the application > compiles and executes, but I don't see the images. Inspection with th

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-09-17 Thread Tom Gibara
's > density. I don't know about nodpi specifically but it's worth the try. > > On Thu, Sep 17, 2009 at 11:46 AM, Tom Gibara wrote: > > Duh, I misread the docs for the inScaled flag. Thanks for pointing that > out. > > The drawable-nodpi/ sounds perfect, but

[android-developers] Re: Image scaling by BitmapFactory.decodeResource()

2009-09-17 Thread Tom Gibara
Duh, I misread the docs for the inScaled flag. Thanks for pointing that out. The drawable-nodpi/ sounds perfect, but I'm guessing I can't use that and remain compatible with API 3, since I don't see "nodpi" listed the documentation for resources in 1.5. Tom. 2009/9/17 Romain Guy > > > private B

[android-developers] Image scaling by BitmapFactory.decodeResource()

2009-09-17 Thread Tom Gibara
I can't wait to try out the new 1.6 goodies, but first I'm retargeting my existing applications, and I decided to start with Daisy Garden. Changing to android:targetSdkVersion="4" caused the application to segfault on startup, after a while I tracked it down to this known issue: http://code.google

[android-developers] Re: Lesson from ADC2 - Polish Your App!

2009-09-11 Thread Tom Gibara
I think lack of polish is a significant shortcoming in a large number of the applications that are now available in the Android Market. There are lots of great apps, and great apps that have very little polish (and perhaps don't need it), but in general I think it's a quality that's in deficit. Int

[android-developers] Re: Recommended uses of a class extending android.app.Application

2009-09-11 Thread Tom Gibara
I hesitate to raise a word against any of Dianne's advice (ever) - and it clearly depends on the nature of your application. But what I find with my code is that most of the global state I want to keep depends on a Context. For example, anything that loads resources, or anything that needs to gener

[android-developers] Re: Recommended uses of a class extending android.app.Application

2009-09-11 Thread Tom Gibara
I think it's more accurate to say *you may choose* to maintain global state by extending Application. It's my preferred approach, though it's important to to instantiate global state lazily wherever it's sensible to do so. I describe my default approach here: http://blog.tomgibara.com/post/126377

[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-04 Thread Tom Gibara
Technology User Group) at Google Sydney > HQ about 2 hours after ADC2 had closed. The presentation seemed to be > fairly well received. > > Regards Gary > > On Sep 3, 9:01 am, Tom Gibara wrote: > > I submitted Daisy Garden which I just published to the Android Market > >

[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-02 Thread Tom Gibara
I submitted Daisy Garden which I just published to the Android Market (Entertainment). http://www.tomgibara.com/android/daisy/garden/ and there's a bit more about it on my blog: http://blog.tomgibara.com/ It's 'little brother' to a game I'm developing called Daisy Chase and was mostly complete,

[android-developers] Re: OpenGL on top of camera preview - using two surface views

2009-07-19 Thread Tom Gibara
For what it's worth, I asked myself the same question and came to the conclusion based on Dianne's comments that one can't assume any arrangement of an OpenGL surface and Camera surface is certain to work reliably. I'm currently projecting camera previews onto a textured quad to get a similar resu

[android-developers] Re: What is the best way to implement dynamic textures in OpenGL ES?

2009-07-03 Thread Tom Gibara
Also you can use glTexSubImage2D() if only a portion of your bitmap is changing. For these sorts of operations android.opengl.GLUtils will be *much* more efficient (and simpler) than your current approach of populating a ByteBuffer since the native helper methods can access the Bitmap pixel data di

[android-developers] Re: Stateful compound drawables on TextViews (bug?)

2009-06-18 Thread Tom Gibara
le-workaround>Tom. 2009/6/18 Romain Guy > > This is fixed in Donut. > > On Thu, Jun 18, 2009 at 10:04 AM, Tom Gibara wrote: > > I'm trying to use a Button widget with a top compound drawable to > implement > > a classic labelled button design. When I assign a sta

[android-developers] Stateful compound drawables on TextViews (bug?)

2009-06-18 Thread Tom Gibara
I'm trying to use a Button widget with a top compound drawable to implement a classic labelled button design. When I assign a stateful drawable (a StateListDrawable), I find that the drawable doesn't change in response to changes in the button's pressed state. Looking at the source code for TextVie

[android-developers] Re: Changing the application icon at runtime?

2009-06-11 Thread Tom Gibara
ackball: > > > http://code.google.com/p/android-sky/source/browse/trunk/Sky/res/layout/widget_med.xml > > You may need to use tricks like "android:duplicateParentState" to > correctly show drawable states in children views. > > j > > > On Thu, Jun 11, 2009 at 4:24 AM,

[android-developers] Re: AVD Camera

2009-06-11 Thread Tom Gibara
The camera preview code was written to mimic the operation of the camera hardware in pre-1.0 versions of Android. It largely became obsolete with the release of 1.0 and the availability of real phones that one can use for running one's applications. I chose not to emulate the newer Camera functiona

[android-developers] Re: Changing the application icon at runtime?

2009-06-11 Thread Tom Gibara
I just want to add that one thing about this: a widget can't take focus or otherwise be operated via the trackball, that might prove an irritation for some users. Tom. 2009/6/11 Jeff Sharkey > > Changing icons dynamically still isn't possible. However, you can now > write an AppWidget the size

[android-developers] Re: Problem in identifying which widget click is launching the activity?

2009-06-08 Thread Tom Gibara
In addition to including the appWidgetId as an extra, put it as the PendingIntent requestCode too (assuming you aren't already using that property of the PendingIntent for some other purpose) that will enable the system to distinguish them. Tom. 2009/6/8 Akash Gupta > > I m doing the same thing

[android-developers] Re: BlurMaskFilter not blurring entire bitmap

2009-06-04 Thread Tom Gibara
Blur filters only operate on the alpha channel. If you wanted to apply them to anything else, you might consider using a ColorMatrix to juggle the channel you want to blur into the alpha channel and then paint it - that might work in some situations. In any case, a single blur operation is generall

[android-developers] Re: Call Activity from Widget, have only one instance. I am confused.

2009-05-30 Thread Tom Gibara
I'm having a similar issue, but related to PendingIntents via notifications. http://groups.google.com/group/android-developers/browse_thread/thread/56a0c58dc6e1b0a1# Like you, I feel I understand the task con

[android-developers] Re: How do I correctly manage the activity stack in this instance?

2009-05-28 Thread Tom Gibara
> > Are you sure having a notification re-order the backstack like that is a good idea? I'm not saying any of this is a good idea :-) But my explanation wasn't clear enough. There is one GardenActivity instance which might display any number of gardens. Navigating through gardens is done within

[android-developers] How do I correctly manage the activity stack in this instance?

2009-05-28 Thread Tom Gibara
I'm working to finish a small application, but I'm having problems seeing what combination of activity attributes and intent flags I need to achieve my intended application design. Trying my best not to describe the app in minute detail, here's the basic operation (I've supplied screenshots in the

[android-developers] Re: breakpoints and widgets

2009-05-28 Thread Tom Gibara
The inflation, rendering and user interaction of the Views in the RemoteView are performed by the widget host, but the onUpdate method will definitely be executed by the application process. Tom 2009/5/28 laloch > > The widget is running in the com.android.acore context, so that's the > process

[android-developers] Re: Problems with putExtra in notifications

2009-05-26 Thread Tom Gibara
Note that PendingIntents are persisted independently of your application process. This means that if you adopt this approach you will need to persist the last used identifier and use it to initialize the value of _intentID when your application restarts. Also, to handle synchronization properly, yo

[android-developers] Re: Android Camera Garbage Collection.

2009-05-26 Thread Tom Gibara
I'm pretty sure I have looked into this in the past and found that a different object reference is supplied on each call. Tom. 2009/5/26 Robert Green > > Are you talking about the method Camera.PreviewCallback.onPreviewFrame > (byte[] arg0, anrdoid.hardware.Camera arg1) ? > > Is it allocating a

[android-developers] Re: Widget bug, is there a work around?

2009-05-26 Thread Tom Gibara
something like 'loading...' the point is always drop the widget on the home screen regardless the config was successful. On May 26, 11:54 am, Tom Gibara wrote: > How does this address the OP's issue?... > 2009/5/26 AndroidApp > > > > > This is what I am doing

[android-developers] Re: Create Bitmap from BitmapDrawable?

2009-05-26 Thread Tom Gibara
You can't do this; ids aren't an intrinsic property of resources like drawables; they simply provide an efficient way to reference application content that is static within the context of a given configuration. As such they can't be applied to resources generated at runtime. Tom. 2009/5/26 guruk

[android-developers] Re: Create Bitmap from BitmapDrawable?

2009-05-26 Thread Tom Gibara
The first code snippet you included won't compile: BitmapDrawable bmd = new BitmapDrawable(canvas); BitmapDrawable can't take a canvas in its constructor. You don't need a drawable if this is all you want to do, instead use the canvas directly, something like: Bitmap ob = BitmapFactory.decodeR

[android-developers] Re: Create Bitmap from BitmapDrawable?

2009-05-26 Thread Tom Gibara
The ColorFilter you apply to a BitmapDrawable isn't applied directly to the Bitmap, it's applied to the Paint used to render the Bitmap. To get an equivalent Bitmap: * Create a new Bitmap of the same width, height and Config * Create a Canvas over the new Bitmap * Call BitmapDrawable.draw(Can

[android-developers] Re: Widget bug, is there a work around?

2009-05-26 Thread Tom Gibara
nitialized, if it > has not been initialized, start the configure activity on the service > > On May 26, 9:49 am, Tom Gibara wrote: > > I don't have a workaround, but I can confirm that the widget I'm > developing > > exhibits the same problem; it seems to get added to

[android-developers] Re: Create Bitmap from BitmapDrawable?

2009-05-26 Thread Tom Gibara
Doesn't BitmapDrawable.getBitmap() do what you need? Tom. 2009/5/26 guruk > > Hi, > > how can i convert a BitmapDrawable into a Bitmap (hopefully it keeps > the Alphachannel from the BitmapDrawable) > > > thanks > Chris > > > > --~--~-~--~~~---~--~~ You received

[android-developers] Re: Widget bug, is there a work around?

2009-05-26 Thread Tom Gibara
I don't have a workaround, but I can confirm that the widget I'm developing exhibits the same problem; it seems to get added to the AppWidgetHost, continues to receive updates, but is never displayed to the user. Tom. 2009/5/26 AndroidApp > > Bump, anyone? > > On May 22, 9:28 pm, zl25drexel wro

[android-developers] Re: Whole lotta garbage collecting going on.... How do I find out what is being collected?

2009-05-25 Thread Tom Gibara
I'm working on a small game; I decided that the best approach for my purposes was to use char[]s internally and I wrote my own simple int->char[] method. As an aside, I generate and cache a set of bitmaps for the digits 0-9 and render the score using these, rather than with the canvas drawText meth

[android-developers] Re: world readable files in subdirectories

2009-05-21 Thread Tom Gibara
Oh well, sometimes its easy to miss the obvious. Context.getDir(name, mode) was what I was looking for. Tom. 2009/5/21 Tom Gibara > This is a simple question but I can't find anything by searching this > group: is there any way of creating world readable files within > subdire

[android-developers] world readable files in subdirectories

2009-05-20 Thread Tom Gibara
This is a simple question but I can't find anything by searching this group: is there any way of creating world readable files within subdirectories? I'm producing an app widget that includes an ImageView. To supply the image data I'm serving pngs from a content provider. I do it this way to avoid

[android-developers] Re: BroadcastReceivers not receiving PendingIntents

2009-05-20 Thread Tom Gibara
Dianne, What happens in the situation where an Activity receives a call to onNewIntent() before being saved and restored? I've assumed that in this case, that a call to getIntent() will return the last intent supplied to onNewIntent(), is that correct? Tom. 2009/5/20 Dianne Hackborn > getInten

[android-developers] Re: AppWidget issues

2009-05-16 Thread Tom Gibara
There are basically two ways to end up with phantom widgets being supplied to your WidgetProvider. In the first instance, its because the user chose to add a widget, but then cancelled its configuration. To partially overcome this problem, you can keep a list of all the widgets you know have been c

[android-developers] Re: AppWidgets: Dynamic value for updatePeriodMillis?

2009-05-16 Thread Tom Gibara
Letting the user select a frequency can be done by not specifying an updatePeriodMillis for the widget, but instead registering a broadcast receiver with the AlarmManager that pushes updates through the AppWidgetManager. It's not possible to change the size of a widget from that defined in its xml

  1   2   >