Mark M. | has entered the room |
Mark M. | turned on guest access |
Dec 14 | 8:00 PM |
Bill W. | has entered the room |
Mark M. |
howdy, Bill!
|
Bill W. |
hey Mark
|
Bill W. |
dude... what is with the android MediaPlayer component? Do you have any light on some of the error codes that thing generates?
|
fitz | has entered the room |
Bill W. |
I'm trying to release a video-serving app to the market, and that component has become the bane of my existence
|
Bill W. |
unexplained error codes, erratic behavior on different devices
|
Bill W. |
unreliable results, etc
|
Mark M. |
Bill: not really, particularly now that they changed to Stagefright from the original OpenCORE implementation
|
Mark M. |
MediaPlayer is difficult unless you are controlling the content
|
Mark M. |
(btw, howdy, fitz!)
|
Bill W. |
how do you mean "controlling the content"?
|
fitz |
Hello - just observing so no questions here
|
Bill W. |
it's ours, in a sense, but it is being served up by our CDN
|
Mark M. |
well, that should be OK
|
Mark M. |
that's a far cry from "I'm trying to play this semi-random stream I found on the Intarweb"
|
Mark M. |
but, from an error standpoint, MediaPlayer has been a problem for a long time
|
Mark M. |
lots of cryptic warnings and stuff
|
Bill W. |
is there a better implementation for streaming video from the internet that I don't know about?
|
Dec 14 | 8:05 PM |
Bill W. |
yeah, and unexplain errors like "UNKNOWN_ERROR -1004"
|
Mark M. |
nothing in the OS
|
Bill W. |
or -31
|
Mark M. |
I haven't played with streaming video much in the past 15 months
|
Bill W. |
okay... fair enough
|
Mark M. |
hence, I have no idea what those error codes might mean
|
Bill W. |
another question involves use of CWAC
|
fitz |
Mark - when developing I have been using emulator
only - should I get a Android cell to test against - I have read that
live cell acts differently - using eclipse for Android etc.
|
Mark M. |
fitz: you definitely want to test on hardware before releasing an app
|
Bill W. |
i would strongly recommend it! :-)
|
fitz |
ok - so if I want to also port to tablet when out then buy one EH!
|
Mark M. |
I'd start with a phone, unless you're making an app targeted at tablets
|
Mark M. |
you do not need one of everything
|
Mark M. |
however, you really do need one of something
|
Bill W. |
i'm using the CWAC list-related stuff in many
places (task, adapter, thumbnail, endless), but I keep getting these
exceptions reported to me from the field:
java.lang.IllegalStateException: The content of the adapter has changed
but ListView did not receive a notification. Make sure the content of
your adapter is not modified from a background thread, but only from the
UI thread
|
fitz |
will cell carriers if selling phone now on 2.2
move to 2.3 or is that a wild card - as in I could expect to move up?
reason I ask is maybe wait to get cell that has 2.3 on it
|
Bill W. |
and I've checked every place i am modifying contents, and it's all on the UI thread
|
Mark M. |
Bill W: tough to answer that in the abstract
|
Dec 14 | 8:10 PM |
Mark M. |
there may be spots where I am failing to chain notifyDataSetChanged() or something
|
Mark M. |
I know I have that fixed in EndlessAdapter
|
Mark M. |
might not in ThumbnailAdapter, since I haven't touched that in ages
|
Bill W. |
okay...i may be using an older implementation of that, so I'll be sure to update
|
Mark M. |
(it's overdue for a rewrite)
|
Mark M. |
fitz: eventually, carriers will get 2.3 phones, it is merely a question of when
|
Mark M. |
it is generally difficult to predict that sort of thing, except for what is announced
|
fitz |
ok - you liking 2.3 yet or just a yawn version?
|
Bill W. |
Mark, is there a place that gets updated if bugs
like that get fixed? so I'll have an idea definitively, when I'm
updating to a newer version, of whether that should get addressed? (I
never see them while testing in house, FWIW)
|
Mark M. |
Bill: you can follow the github repo
|
Mark M. |
or keep tabs on the repo's home page
|
Bill W. |
sorry... i should have been more specific... i
didn't know if that was already assigned to a specific bug number, or if
there is any way of tracking it
|
Bill W. |
i guess I'll just diff the version comments though
|
Mark M. |
oh, no
|
Bill W. |
thanks
|
Mark M. |
fitz: 2.3 is interesting, but most of the cool stuff is outside my areas of expertise (gaming) or requires hardware (NFC)
|
Mark M. |
Bill: For recently-maintained stuff, the repo's home page has a changelog
|
Mark M. |
things I haven't updated in ages (e.g., ThumbnailAdapter) don't
|
Dec 14 | 8:15 PM |
Bill W. |
cool cool...
|
Mark M. |
any other questions?
|
Bill W. |
any suggestions on the best way to investigate
sporadic OutOfMemoryError reports from the field? (that can't be
reproduced in house)
|
Mark M. |
are you getting stack traces, at least?
|
Dec 14 | 8:20 PM |
Mark M. |
if you are not getting stack traces, use Flurry or ACRA or something
|
Bill W. |
i am getting stacktraces...
|
Mark M. |
if you are, the most likely OutOfMemoryError
culprit seems to be bitmaps -- make sure you are aggressive about
calling recycle() on those
|
Bill W. |
they often occur when decoding Bitmaps from input streams, or trying to inflate a layout from an XML file
|
Mark M. |
well, inflating a layout on its own is not very memory intensive
|
Mark M. |
it's probably tied to bitmaps, then
|
Bill W. |
interesting...
|
Bill W. |
all of the images in our app are loaded remotely
|
Mark M. |
one of the things I need to do with ThumbnailAdapter is take better care of the bitmaps
|
Mark M. |
are you downloading thumbnail-sized images, or are they being resized on the device?
|
Bill W. |
for the thumbnailadapters, they are mainly thumbnail sized when i download them
|
Bill W. |
but the device may be trying to resize them
|
Mark M. |
well, so long as they aren't huge images that are being scaled, that should not be a problem, I wouldn't think
|
Mark M. |
but it doesn't take many full-size images to run you out of heap space on some devices
|
Dec 14 | 8:25 PM |
Bill W. |
yeah
|
Bill W. |
so it may not be worth pursuing... if it's just a sporadic thing, and limitation of smaller slimmer implementations?
|
Mark M. |
any patterns of what devices you get the error on
|
Mark M. |
?
|
Bill W. |
our remote stacktrace reporting tool isn't including that info...
|
Bill W. |
i guess it probably should
|
Bill W. |
maybe i'll look into ACRA
|
Mark M. |
yeah, grabbing the android.os.Build values is probably a good idea
|
Mark M. |
I haven't used it -- I just know it by name
|
Dec 14 | 8:30 PM |
Bill W. |
we're using remote-stacktrace
|
Mark M. |
any other questions?
|
Dec 14 | 8:35 PM |
fitz |
nope I am gone cya
|
fitz | has left the room |
Dec 14 | 8:40 PM |
Bill W. |
i'm looking into doing some last minute app features (namely "sharing on twitter/facebook/etc")
|
Bill W. |
i saw in the books some references to JTwitter, etc.
|
Mark M. |
that is one approach
|
Bill W. |
should I rely on Android's intents system to handle this problem? what about people that don't have twitter clients installed?
|
Mark M. |
I would just use ACTION_SEND
|
Mark M. |
most bang for the buck
|
Bill W. |
and they get a selection of recipient to receive that intent? (i.e. share on twitter? share on facebook? email?)
|
Mark M. |
they get a selection of activities
|
Mark M. |
they choose the activity, which lets them send/post/whatever
|
Bill W. |
oh totally
|
Mark M. |
twitter would tweet, gmail would send an email to selected addresses, etc.
|
Bill W. |
awesome
|
Mark M. |
see the Introspection and Integration chapter of the Advanced Android book for samples
|
Dec 14 | 8:55 PM |
Julius | has entered the room |
Mark M. |
howdy, Julian!
|
Julius |
hi Mark
|
Mark M. |
only a few more minutes -- got a quick question?
|
Julius |
Sorry to be so late - hopefully won't be late
|
Julius |
yes
|
Julius |
simple one
|
Julius |
I have a Cursor which returns results from multiple tables
|
Julius |
and each table has a column with the same column name eg. _id or title
|
Julius |
is there a way to distingush between them in the
Cursor or ask for the column names to be named differently on returning
the Cursor?
|
Mark M. |
rename them in the query
|
Julius |
ah ok I'll look in SQLite
|
Mark M. |
use the "AS alias" syntax
|
Julius |
that's gonna save a world of pain
|
Mark M. |
SELECT _ID AS Foo, ...
|
Julius |
oh yeah.. I've seen that in EJBQL or soemthing
|
Julius |
thank you!
|
Mark M. |
of course, ideally, you know the order of your
columns in the Cursor, and therefore do not care about the names, only
the indices
|
Julius |
that's what I've been doing
|
Julius |
but it's hard to aintain the code
|
Julius |
maintain
|
Julius |
to return new columns...
|
Julius |
anyhow you've solved it!
|
Julius |
bfn
|
Julius | has left the room |
Mark M. |
any final question?
|
Dec 14 | 9:00 PM |
Bill W. | has left the room |
Mark M. | turned off guest access |