Oct 12 | 9:50 AM |
Mark M. | has entered the room |
Oct 12 | 9:55 AM |
Mark M. | turned on guest access |
Oct 12 | 10:00 AM |
Evan | has entered the room |
Evan |
hey Mark
|
Mark M. |
howdy, Evan!
|
Evan |
the one thing I came here to hopefully have some light shed on are strange undocumented numeric errors coming from MediaPlayer
|
Mark M. |
yeah, well, that's pretty common
|
Evan |
like "error -14002"! (UNKNOWN_ERROR)
|
Mark M. |
the media frameworks are fond of undocumented errors
|
Evan |
i'm trying to write something robust for a video app, and i have no clue how to handle these
|
Mark M. |
on the whole, you don't handle them, other than to log them and say "oops" to the user
|
Evan |
yeah, essentially that's what i was going to do
|
Mark M. |
if you're using something that collects error data
for you from the field, you can eventually perhaps come to some sort of
pattern
|
Mark M. |
and, if you can come up with a reproducible test case, you can always try posting it on b.android.com or something
|
Evan |
very true
|
Mark M. |
the key being "reproducible"
|
Oct 12 | 10:05 AM |
Evan |
i guess i could maybe comb through their code to see what generated that number
|
Evan |
but that seems tedious
|
Mark M. |
hope you have a large supply of Red Bull on h and
|
Mark M. |
er, on hand
|
Evan |
haha
|
Mark M. |
seriously, your best hope is that Dave Sparks or somebody sees the issue and chimes in
|
Mark M. |
this is particularly true with Android 2.2, as they're starting the cutover from OpenCORE to Stagefright as the media engine
|
Mark M. |
which I am sure clutters things up yet more
|
Evan |
yeah.
|
Evan |
also does there exist a way effectively have the MediaPlayer try to start at an "index" outside of 0 (i.e. the start)?
|
Mark M. |
local or streaming?
|
Evan |
streaming
|
Mark M. |
hrm
|
Mark M. |
in theory, I'd say try seekTo() before start()
|
Evan |
I recall being unsuccessful trying to do this...
|
Mark M. |
yeah, particularly for streaming, I can see that as being potentially troublesome
|
Mark M. |
outside of seekTo(), though, there's not much around for repositioning the playback point that I can think of
|
Evan |
right...
|
Evan |
but it should work for a local (i.e. downloaded) file?
|
Oct 12 | 10:10 AM |
Mark M. |
actually, I have only used seekTo() from a running clip (e.g., fast-forward)
|
Mark M. |
I would think it is somewhat more likely to work with local media
|
Mark M. |
but that's just a guess
|
Mark M. |
docs say that seekTo() should be valid for the Prepared state
|
Mark M. |
so, in theory, it should work for local and streaming, once the clip is prepared
|
Mark M. |
alas, theory and reality don't always line up
|
Evan |
heh. that's true.
|
Evan |
in fact, I'd even say they've almost tended *not to* for me and Android lately ;-)
|
Evan |
thanks Mark!
|
Evan | has left the room |
Oct 12 | 10:15 AM |
Frank S. | has entered the room |
Mark M. |
howdy, Frank!
|
Frank S. |
Hi Mark
|
Frank S. |
I guess the school hasn't refreshed their cache
|
Frank S. |
I was wondering what was so new on the site, lol
|
Ciaran H. | has entered the room |
Mark M. |
it's a pretty nasty configuration they must have there
|
Mark M. |
the TTL on the DNS entry is pretty short
|
Mark M. |
cache should have been flushed a ways back
|
Mark M. |
of course, I have some related problem -- I
thought I set up a blind redirect from the old server to the new, but
that's obviously not working
|
Mark M. |
I'll take a peek at that post-chat
|
Frank S. |
lol. It's funny because the SysAdmin is teaching a
class that I'm taking now and configuring a local DNS is our current
assignment
|
Mark M. |
howdy, Ciaran!
|
Frank S. |
anyways. I have a question about static string
|
Mark M. |
go right ahead
|
Oct 12 | 10:20 AM |
Ciaran H. |
Hi Mark! I was wondering if there is any utilities
to edit pdf files? For instance if i had a pdf and i wanted to add some
information i got from the user and write it to a pdf. Is that
possible?
|
Mark M. |
Ciaran: I do not know if any run on Android. Try iText.
|
Mark M. |
Frank: you had a question about static strings?
|
Ciaran H. |
ok i will
|
Frank S. |
I've been creating several apps that each fire off
different broadcasts. And there are other apps that receive them. I
find myself searching through the source to find the actual string
|
dhaupert | has entered the room |
Frank S. |
I know I should be putting them in the strings.xml
|
Mark M. |
oh, I don't know about that
|
Mark M. |
strings.xml is for user-facing messages
|
Frank S. |
but is there a way to make them viewable externally
|
Mark M. |
make what viewable externally?
|
Frank S. |
Like how the system has it Intent.action.EDIT... etc
|
Mark M. |
(btw, howdy, dhaupert!)
|
dhaupert |
Hi Mark
|
Mark M. |
within your own app, use a public static final String ACTION_SOMETHING_OR_ANOTHER="whatever.you.want.to.call.IT"
|
Mark M. |
between apps, no, because you don't have the source code
|
Mark M. |
the Android SDK can do it because your code and
its are intermingled within your virtual machine and within the
compilation process
|
Mark M. |
third parties should be nicely documenting them wherever they are documenting how to use them
|
Oct 12 | 10:25 AM |
Frank S. |
Ok. So it is still a copy and paste job. I have been doing what your suggested, but it just didn't feel correct
|
Mark M. |
yup, copy and paste are typical with broadcast actions and categories and such
|
Mark M. |
dhaupert: do you have a question?
|
Frank S. |
Alrighty than. Thanks for the clarification
|
dhaupert |
Hi Mark, yes I do..
|
dhaupert |
I am having trouble with intent-filters. I wanted
to be able to open an attachment with the file extension PDB from
gmail, mail, etc.
|
dhaupert |
I saw they use the content scheme so I did this:
|
dhaupert |
View paste
(3 more lines)
|
dhaupert |
As you can see it covers a bunch of ways the file
could be called, but because those content schemes don't actually have
the file name in their URL, this never happens.
|
Mark M. |
you are *far* better served filtering on MIME type
|
Oct 12 | 10:30 AM |
dhaupert |
The problem is that the PDB file's MIME type is application/vnd.palm
|
Mark M. |
so?
|
dhaupert |
and while it seems to work fine with file browsers, it still doesn't show for email
|
dhaupert |
I have this intent-filter as well..
|
dhaupert |
View paste
|
dhaupert |
whoops- wrong one..
|
dhaupert |
View paste
|
dhaupert |
that one gets called from a file explorer and works fine for me. But still doesn't show for gmail and the like
|
Mark M. |
the reason your mail clients are not triggering
the MIME type ones is probably because the sender's mail client would
need to know the MIME type, and it probably does not
|
Mark M. |
so, it probably is using application/octet-stream or something generic like that
|
dhaupert |
probably- it's not a very popular one.
|
dhaupert |
seems like it will be hard to figure out every
possible MimeType being used by mail senders. I know in the past I've
seen application/pdb in there as well
|
Mark M. |
the intent filter mechanism is definitely more Web-centric than email-attachment-centric
|
Oct 12 | 10:35 AM |
Mark M. |
now, I would think that your file extension ones should work
|
Mark M. |
leastways, it's how I'd try it
|
Mark M. |
but I don't see in the Android source code where they use pathPattern that way
|
dhaupert |
The actual URI doesn't have any sort of file pattern in it that has the file name unfortunately
|
Mark M. |
oh, I see
|
Mark M. |
right
|
Mark M. |
um
|
Mark M. |
I suspect you may just be out of luck
|
dhaupert |
Had a feeling you'd say that!
|
dhaupert |
I did a generic one that shows us for everything,
but it seems as hokey as it gets- even clicking on MP3 files and APK
files now show my app as an option
|
Mark M. |
yup
|
dhaupert |
Thanks for your help regardless!
|
Mark M. |
sorry I didn't have a better flash of insight for you
|
Mark M. |
Ciaran: got another question?
|
Oct 12 | 10:40 AM |
Mark M. |
ok
|
Mark M. |
Frank: got another question?
|
Ciaran H. |
not that i can come up with at this moment
|
Ciaran H. |
thank you
|
Ciaran H. | has left the room |
Frank S. |
Not today. Thanks for the help. Will probably be on next morning office hours
|
Mark M. |
yeah, unfortunately, office hours will be mostly US Eastern evenings for the next three, due to schedule conflicts
|
Mark M. |
and I'm not sure what I'll be doing while I am in London for Droidcon UK and such
|
Mark M. |
so, it may be a while before the next chat in this time slot
|
Frank S. |
Oh. How will that AndroidDev conference be
|
Mark M. |
I suspect it will be rather British
|
Frank S. |
No. Isn't there one in the US
|
Mark M. |
None in the Droidcon series
|
Frank S. |
I think I saw it on your site
|
Mark M. |
AnDevCon is in March 2011
|
Mark M. |
that's in San Mateo or somewhere else out in Silicon Valley
|
Frank S. |
Yeah. That's the one
|
Mark M. |
dhaupert: do you have another question?
|
dhaupert |
yes
|
dhaupert |
Just wanted to hear your thoughts regarding obfuscation and LVL server
|
Mark M. |
um
|
Oct 12 | 10:45 AM |
Mark M. |
I come at this from a radically different direction
|
dhaupert |
I know that without the former, the latter is not really that useful
|
Mark M. |
if your business model makes it so piracy is an issue, that's a bug in the business model
|
Mark M. |
LVL and similar schemes are workarounds for the bug in the business model
|
Mark M. |
now, it may be the workarounds are your chosen
long-term solution for the business model bug -- effectively, the
business model bug is a a WONT_FIX
|
Mark M. |
in that case, LVL is interesting, though I'd like it if it were not tied exclusively to the Android Market
|
dhaupert |
I tend to agree- my theory is that if I spend time
to fight pirates, I make it harder for honest customers to use my
software, and take time away from coding features to support those
honest customers
|
Mark M. |
right
|
Mark M. |
for example, I'll be stunned if my books aren't floating around some BitTorrent server somewhere
|
Mark M. |
in the grand scheme of things, that's not something I'm going to chase down
|
Mark M. |
if I find it on the Web through a simple Google search, I might take action, but that's about it
|
dhaupert |
yeah, and you're probably better off not looking- I
looked once back in the Palm OS days and got myself worked up. Now I
just avoid that!
|
Sebastiano P. | has entered the room |
Mark M. |
yeah, I know the feeling
|
dhaupert |
I appreciate your advice!
|
Sebastiano P. |
Hi everyone!
|
Mark M. |
howdy, Sebastiano!
|
Mark M. |
(who-hoo! spelled that right on the first try! :-)
|
Sebastiano P. |
My first time in here :)
|
Sebastiano P. |
Yeah, you got it right!
|
dhaupert |
Have a great week..
|
dhaupert | has left the room |
Mark M. |
dhaupert: you too!
|
Mark M. |
Sebastiano: do you have a question that I can (try to) answer?
|
Sebastiano P. |
yes thanks
|
Sebastiano P. |
I'm developing my first Android app
|
Oct 12 | 10:50 AM |
Sebastiano P. |
and I'm having a little issue
|
Sebastiano P. |
with the ViewFlipper and the gestures
|
Sebastiano P. |
my fellow developer who wrote that piece couldn't get a home-like functionality on the viewflipper
|
Sebastiano P. |
meaning, an horizontal swipe does flip pages on the viewflipper
|
Sebastiano P. |
but only after the gesture has completed
|
Mark M. |
correct
|
Mark M. |
ViewFlipper works that way
|
Mark M. |
you can try a HorizontalScrollView
|
Sebastiano P. |
is there any way to have a "dragging" behaviour like the home screen?
|
Sebastiano P. |
let me explain
|
Sebastiano P. |
we have two dashboard views, which are at the moment in the viewflipper
|
Sebastiano P. |
they're basically an icons grid
|
Sebastiano P. |
and we'd like to be able to have them behave how i described you
|
Mark M. |
do not use a ViewFlipper, then
|
Sebastiano P. |
what should we use?
|
Mark M. |
put them side by side in a horizontal LinearLayout
|
Mark M. |
and wrap that in a HorizontalScrollView
|
Mark M. |
and hope
|
Sebastiano P. |
lol
|
Mark M. |
putting scrollable things inside scrollable things tends not to work well
|
Mark M. |
but if that does not work, I have no idea how best you could achieve the look you want
|
Sebastiano P. |
ok
|
Sebastiano P. |
i'm going to try out your suggestion
|
Sebastiano P. |
thank you very much for your kind help
|
Oct 12 | 10:55 AM |
Mark M. |
sure!
|
Sebastiano P. |
have a nice day Mark!
|
Mark M. |
you too!
|
Sebastiano P. |
cheers from Italy :)
|
Mark M. |
Frank: did you think of any other questions?
|
Sebastiano P. | has left the room |
Oct 12 | 11:00 AM |
Mark M. |
have a pleasant day!
|
Frank S. | has left the room |
Mark M. | turned off guest access |