Dec 1 | 1:50 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Dec 1 | 2:00 PM |
Srinivas R. | has entered the room |
Mark M. | Hello, Srinivas! |
Srinivas R. | Good After noon Mark Murphy. |
Mark M. | Well, I'm in Sweden right now, so it's "good evening" from here. |
Mark M. | ;-) |
Dec 1 | 2:05 PM |
Srinivas R. | OK, Good morning. |
Mark M. | How can I help you? |
Srinivas R. | I don't have any specific questions right now, just connected to keep the spirit for android development |
Mark M. | OK |
Srinivas R. | thanks, for your efforts. Good bye for now. |
varma | has entered the room |
Mark M. | Hello, Varma! |
Mark M. | Srinivas Reddy C: thanks for stopping by! |
Srinivas R. | has left the room |
varma | Hello Mark |
Mark M. | varma: how can I help you? |
varma | Is book examples are tested on devices? |
Mark M. | Generally, yes |
Mark M. | Some things are not working fully on Android 2.0, mostly related to the changed contacts APIs |
Mark M. | I am working on that now |
varma | ok |
Dec 1 | 2:10 PM |
Mark M. | Are you running into specific problems? |
varma | For
crating Dialogs in Activity, android guide suggests to create dialogs
using onCreateDialog(int) and showDialog(int) methods, but in book , it
does not look like |
varma | what is the best way to create Dialogs |
Mark M. | No, the book does not show the use of managed dialogs using onCreateDialog() and showDialog() |
Mark M. | Those work well, and I have used them on a couple of projects |
Mark M. | I just have not had a chance to add material on that topic to the books |
Ryan G. | has entered the room |
Mark M. | Hello, Ryan! |
varma | Those are also works fine for me,but while I am trying to use the application in G1 mobile it shows me inflate exception |
Ryan G. | hey mark |
Dec 1 | 2:15 PM |
Mark M. | varma: an InflateException for a dialog? |
varma | In emulator dialogs work fine but not G1 device |
varma | It may be! |
Mark M. | Well, the InflateException stack trace should point out what it does not like in the layout you are inflating |
Mark M. | Ryan Grandy: how can I help you? |
Ryan G. | mark
I'm doing a appwidget that shows an image, and am curious about what
exactly happens when the orientation changes, i know that the activity
is destroyed and remade but for an appwidget the only thing going is a
remoteview |
Ryan G. | which doesn't have an activity or anything |
varma | we should setOwnerActivity() for dialogs which we use create outside the onCreateDialog(), but in book , it doesn't look like |
Ryan G. | so if i point the remoteview at a bitmap will it survive the orientation change or will the bitmap get lost? |
Mark M. | Ryan Grandy: You might get a fresh update request, but that should be about it |
Mark M. | Ryan Grandy: the bitmap should be sent over to the home activity as part of the RemoteViews, so I would expect it to stay around |
Mark M. | varma: setOwnerActivity()? |
Ryan G. | ok |
Mark M. | varma: again, the books do not cover managed dialogs |
Dec 1 | 2:20 PM |
Mark M. | varma: if you are using AlertDialog for a one-time display of a dialog, you do not need setOwnerActivity() |
varma | ok |
Ryan G. | mark,
do you know if there are a lot of changes that other phones have such
as the HTC Hero to android, my application works on my droid but when
someone installs it on a hero or cliq they get errors at specific spot
and i am trying to figure out how i can debug this |
Ryan G. | can i get a logcat file from an actual phone? |
varma | How to read the images from sdcard root directroy as streams |
Mark M. | Ryan Grandy: the Hero does have its issues |
Ryan G. | do you have any reccomendations for debugging to someone who can't readily go out and buy every phone on the market? |
Mark M. | Ryan Grandy: here's a post I did on diagnosing sporadic errors: http://www.androidguys.com/2009/11/16/diag… |
Mark M. | varma: just use standard Java I/O, nothing special needed |
Mark M. | Ryan
Grandy: definitely use Flurry, or DroidDrop, or any of the other stack
trace collection mechanisms. There was a recent thread about this on
[android-developers], I think. |
varma | |
Ryan G. | what about the logcat file? I thought i read somewhere that its possible to get it from a real phone? or maybe i am mistaken... |
Dec 1 | 2:25 PM |
Mark M. | View paste
|
Ryan G. | uhoh mark my view got messed up after you pasted that code |
Mark M. | Ryan
Grandy: I have heard that too, but I haven't seen it in action, and
what I heard about it (relying on internal shell commands) made me
nervous |
Ryan G. | brb |
Mark M. | sorry |
Ryan G. | hmm its cutting stuff off at the end of posts |
Ryan G. | oh well |
Mark M. | Ryan Grandy: what browser are you using? |
Ryan G. | IE8 |
Mark M. | Ryan Grandy: got anything else handy, like Firefox or Chrome? |
Ryan G. | yeah i can move quick |
Ryan G. | i am pretty confused about the autoscaling for screen resolutions for android. |
Ryan G. | for example if i set a file in an imageview using setimageuri does this get scaled if i am on say a droid |
Dec 1 | 2:30 PM |
Mark M. | Ryan Grandy: now *that's* a very good question |
Mark M. | I have only heard about autoscaling in the context of resources |
Ryan G. | in my program i am setting an imageview in a remote view and it seems to get scaled 1.5 x 1.5 |
Ryan G. | i have to make it 1.5 x 1.5 x the original size to make it the size i want |
Mark M. | Well, I know that app widget dimensions scale with the device |
Ryan G. | what do you mean? |
Mark M. | Rather than add more "slots", they increase the size of each slot |
Mark M. | In your widget metadata, you ask for a size in pixels |
Mark M. | You don't really get that |
Mark M. | Rather, it gets rounded |
Ryan G. | i noticed that it won't let me request more than like 300 in the meta data? |
Ryan G. | even tho on the Droid there is a lot more? |
Mark M. | Correct. |
Mark M. | It's a screwy system |
Ryan G. | lol |
Mark M. | 292dip x 72dip will give you a four-slot by one-slot widget |
Ryan G. | in 160dpi portrait |
Mark M. | That will span the width of the screen in portrait mode on HVGA |
Ryan G. | but then in landscape shouldn't that be different? |
Mark M. | No, because the slot dimensions change |
Mark M. | Slots change size, and you really get assigned a number of slots, not the # of pixels you asked for |
Dec 1 | 2:35 PM |
Mark M. | On non-HVGA, slots also get scaled based on the new screen size |
Ryan G. | ok that makes sense, is there a reason they didn't just make the metadata request slots instead of size? |
Mark M. | Beats the *bleep* out of me |
Ryan G. | can you explain that last point about the new screen size? |
Mark M. | According to Ms. Hackborn, slots should increase their size based on screen size |
Mark M. | So, if you asked for 292dip x 72dip and got 4x1 slots... |
Mark M. | ...those 4x1 slots would measure 438px x 108px on a DROID |
Mark M. | if I did that math correctly |
Mark M. | Now, I haven't spent a ton of time playing with app widgets on the DROID yet -- it's on my to-do list |
Ryan G. | the whole screen resolution thing seems very convoluted where not a heck of a lot of good documentation on |
Dec 1 | 2:40 PM |
Mark M. | Yeah, the docs are OK for core things but definitely fall off when you get to stuff like app widgets |
Mark M. | that's why I'm out here with a machete, hacking through the jungle, trying to figure out what's going on |
Ryan G. | haha i appreciate it |
Mark M. | Unfortunately, it's a rather large jungle. |
Ryan G. | i heard of a bug where the onupdate method gets sent a stream up appwidgetids on initiation of the widget |
Mark M. | "stream up appwidgetids"? |
Dec 1 | 2:45 PM |
Ryan G. | *of* - i log the appwidgetid and i get a ton of them when i have an AVD running for a while |
varma | |
Mark M. | Ryan Grandy: You should get one at the outset and one based on your updatePeriodMillis. Are you saying you get more than that? |
varma | This code works fine in emulator to get images from sdcard, but it fails in G1 mobile |
Mark M. | varma: Fails how? |
varma | it shows FileNotFoundException |
Ryan G. | ok n/m i have to get going, thanks for the help |
Ryan G. | do you know when your next session is? |
varma | I am using G1 mobile |
Mark M. | varma: the File constructor does not throw FileNotFoundException. |
Mark M. | Ryan Grandy: Probably next Tuesday, same time. |
Ryan G. | ok great thanks |
Ryan G. | has left the room |
varma | Yes |
varma | But I declared it |
Dec 1 | 2:50 PM |
Mark M. | My
point is: you are not getting a FileNotFoundException from the line you
pasted. You may be getting one from some other line, and I need to know
what that line does so I can help you further. |
varma | |
varma | without getPath() also it fails |
Mark M. | I
will say this a third time: you are not getting a FileNotFoundException
from these line you have pasted. The File constructor does not throw a
FileNotFoundException. |
varma | Ok, I am getting image DISPLAY_NAME from sdcard, and passing it to that file as it is to the above code |
varma | My aim is to get the image from sdcard as input stream |
Mark M. | First, make sure the file really is there. |
Mark M. | Second,
make sure the SD card is not mounted on an attached PC via the USB
cable -- the PC and phone cannot both access the SD card at the same
time |
varma | Yes it is. |
Dec 1 | 2:55 PM |
varma | Let me check |
varma | Yes, I did not |
Mark M. | Then
I do not know what may be going wrong. You can definitely open input
streams on files on the SD card, or do any other ordinary Java I/O upon
them. |
Dec 1 | 3:00 PM |
varma | Another point is I am using progress bar while opening this stream |
Mark M. | That should not cause a FileNotFoundException, though |
varma | It is working great in emulator without any problem, but in G1 it creates problems |
Mark M. | I'm sorry, but I do not know how to help you further on this question, and I need to close the chat room. |
Mark M. | Have a pleasant week! |
varma | has left the room |
Mark M. | turned off guest access |