Mark M. | has entered the room |
Mark M. | turned on guest access |
May 5 | 2:30 PM |
amb | has entered the room |
Mark M. |
howdy, amb!
|
amb |
Hi Mark
|
amb |
Are you open for questions?
|
Mark M. |
absolutely!
|
amb |
cool (and thanks!)
|
amb |
i'm having some trouble with a MediaPlayer for a simple game
|
fitz | has entered the room |
amb |
once in a while it will throw an "illegalstate" excp
|
amb |
i'm playing the sound from "R.raw.file"
|
Mark M. |
(btw, howdy, fitz!)
|
amb |
my question is...do i have to catch the end of the sound (its short) and do anything special before calling start again?
|
fitz |
hello
|
Mark M. |
you have to prepare() or prepareAsync(), and you have to seekTo(0)
|
Mark M. |
you'll see that in the Media/Audio sample project in the Advanced Android book
|
Mark M. |
if you want it to immediately restart, or be in
position to be started, after completion, you can register an
OnCompletionListener
|
amb |
ok...what about orientation changes?
|
May 5 | 2:35 PM |
Mark M. |
what about them?
|
amb |
do you need to do anything special if the sound happens to be playing when android restarts you?
|
Mark M. |
um
|
Mark M. |
you will either need to create a new MediaPlayer
in the new activity instance, or you can try to create your MediaPlayer
using the Application context and pass it from old to new via
onRetainNonConfigurationInstance()
|
Mark M. |
I haven't tried the later
|
Mark M. |
er, latter
|
amb |
ok...i'll play around
|
amb |
THANKS!
|
Mark M. |
happy to help!
|
Mark M. |
fitz: do you have a question?
|
fitz |
hang on - on phone
|
Mark M. |
amb: if you have another question, go ahead
|
amb |
ok, thanks...
|
amb |
i'm concerned about how my layout will look on different devices...
|
May 5 | 2:40 PM |
amb |
i'm worried that all my controls won't be displayed. should i make emulators with diff sized displays/dpi config?
|
Mark M. |
absolutely
|
amb |
is there a few setups that are good to test for?
|
Mark M. | |
Mark M. | |
Mark M. |
those tell you what is in use, based on requests to the Android Market
|
amb |
yep, should've remembered that...thanks!
|
Mark M. |
beyond that, it depends on what you're all trying
to target (e.g., if you're aiming to be an early winner on tablets,
you'll want to test on a tablet)
|
amb |
my friend has a xoom and i have a droid...
|
amb |
but in a standard emulator, my stuff ran off the bottom
|
fitz |
ok in Advanced - you have Local Search (think it
is lesson 17-19) and you have contact lookup by name, name and email
etc. - question is I would like to tie local search to look into
contacts only as a test - is this doable
|
Mark M. |
fitz: presumably, though I haven't tried that particular mashup
|
fitz |
basically tie local search to contacts on device
|
Mark M. |
amb: if "standard emulator" is HVGA, that's not surprising
|
fitz |
ok - will spend more time digging into it
|
May 5 | 2:45 PM |
amb |
right again (emulator was HVGA)
|
Mark M. |
that'd be devices like the T-Mobile G1
|
Mark M. |
they exist, but more devices are higher density/larger resolution nowadays
|
Mark M. |
unfortunately, the screen sizes chart is old -- August 2010
|
amb |
i shrunk my font a little and it fits in HVGA, so i should be ok
|
amb |
i'm good question-wise...thanks for the help Mark
|
Mark M. |
sure, no problem
|
fitz |
can I use the search to look for calendar stuff - google calendar or does google calendar not actually reside on device?
|
Mark M. |
there is no documented and supported API for accessing any local calendar data
|
Mark M. |
you'll find some folk using an undocumented/unsupported/not-recommended content provider for the AOSP Calendar app
|
fitz |
the google calendar is not considered local right?
|
Mark M. |
however, that provider is subject to change (and has)
|
Mark M. |
and it might not exist on any given device
|
Mark M. |
"the google calendar" is a Web site
|
Mark M. |
local calendar apps may be syncing with "the google calendar" via GData APIs
|
Mark M. |
the AOSP Calendar app is one that does
|
May 5 | 2:50 PM |
fitz |
so the icon for GMAIL on a droid is only bringing up a web interface?
|
Mark M. |
no
|
Mark M. |
no more than the AOSP calendar app is
|
Mark M. |
Gmail is a Web site
|
Mark M. |
the Gmail app is an app
|
Mark M. |
the Gmail app gets data from the Gmail Web site via something or another
|
Mark M. |
"the google calendar" is a Web site
|
Mark M. |
the AOSP Calendar app is an app
|
Mark M. |
the AOSP Calendar app syncs data with "the google calendar" via Google Calendar GData APIs
|
Mark M. |
it may be that you and I are using "the google calendar" to mean different things, though
|
fitz |
hmmm - confused a bit - so when you get a new
phone in the set up if you enter in your gmail info it ties email icons
to gmail - the screen that shows your email is a browser or an app - if
app your saying google does not have an api for that correct?
|
Mark M. |
the Gmail icon on the phone is an app
|
Mark M. |
I am not aware of an API to access Gmail, besides IMAP and similar standard mail protocols
|
fitz |
ok thanks
|
May 5 | 2:55 PM |
amb |
see you Mark (and thanks!)
|
Mark M. |
see ya!
|
amb | has left the room |
fitz |
wonder if I should be doing major lifting of app
on PC java app that comunicates with droid - hmmmm will need to think on
it more
|
Mark M. |
you lost me there
|
May 5 | 3:00 PM |
fitz |
forget andriod for a min - I can build java app
that goes in PC that can does searchs into google api's - then package
the data and send to android device. Would rather do it all on Android
device but it sounds like we do not have access for gdata from device
|
fitz |
can do search...
|
Mark M. |
well, there's a whole conference session at I|O for accessing GData on the device, so one presumes it is possible
|
fitz |
for example from android your saying gmail is locked down right
|
Mark M. |
I'm saying that I'm not aware of an API other than standard mail protocols
|
Mark M. |
it's not like I've done an exhaustive search on the subject
|
Mark M. |
and that will be the same for the PC and the phone
|
Mark M. |
GData APIs are Web services
|
Mark M. |
if there is one for Gmail, you'd be able to use it from wherever, given the right credentials
|
Mark M. |
if there is none for Gmail, you will be unable to use one from anywhere
|
fitz |
ok - well we have done the gdata stuff already in c# and have app already - it is just android that makes it different :)
|
fitz |
ok thanks
|
Mark M. |
maybe chillax a bit on those features until the Google presentation hits YouTube
|
May 5 | 3:05 PM |
fitz |
ya I am sure it is a lack of my knowledge that is the problem :)
|
fitz |
ok have a great day
|
fitz | has left the room |
fitz | has entered the room |
May 5 | 3:10 PM |
Mark M. |
hello again!
|
cactusmitch | has entered the room |
Mark M. |
howdy, cactusmitch!
|
cactusmitch |
hello?
|
Mark M. |
how can I help you today?
|
May 5 | 3:15 PM |
Mark M. |
cactusmitch: how can I help you today?
|
May 5 | 3:20 PM |
cactusmitch |
I'll dig into your books before I ask my dumb
questions. I use Eclipse too much. I haven't found
"activityCreator.py" (page 27) in my android-sdk-windows directory tree
yet.
|
Mark M. |
what version of what book are you referring to?
|
Mark M. |
activityCreator.py is not in any of the current books AFAIK
|
Mark M. |
that has been out of date for nearly two years, IIRC
|
May 5 | 3:25 PM |
Julius | has entered the room |
Mark M. |
howdy, Julius!
|
Julius |
hi
|
Julius |
last minute
|
Mark M. |
the chat is about to end -- do you have a quick question?
|
Julius |
just woke up
|
Julius |
sorta
|
May 5 | 3:30 PM |
Julius |
just having trouble with an app widget
|
Julius |
the problem is sening a broadcast from tha appwidget
|
Julius |
when a utton is clicked
|
fitz | has left the room |
Julius |
I have set up the PendingIntent and I can supply it an Intent
|
Julius |
but I'm not sure how to make it send a broadcast
|
Julius |
(if there isn't time no problem)
|
Julius |
View paste
|
Julius |
oops SDIPlayer should be My :)
|
cactusmitch |
I'm hoping for a way to use a big sqlite3 database
in an app without having to enter data with "INSERTS," or "put.values"
when the app is first onCreated. But that may be for another day when I
have the vocabulary to ask an intelligible question
|
Julius |
updateViews.setOnClickPendingIntent(R.id.my_imagebutton, ppi);
|
Mark M. |
Julius: if MyService is a Service, that's not a BroadcastReceiver, so it can't receive a broadcast
|
Julius |
can it not register to receive.. oh so maybe better to make a separate BR
|
Mark M. |
cactusmitch: shipping a big database with an app is troublesome -- better to download it on first run
|
Mark M. |
Julius: right
|
Julius |
I set up aBRin the Service with an IntentFilter
|
Julius |
ok I'll give that a shot
|
Mark M. |
each channel of the Intent system (activity, service, broadcast) is separate and distinct
|
Mark M. |
one cannot receive events from the other
|
Julius |
ah
|
Mark M. |
OK, that's it for today's chat
|
Julius |
thank you!
|
Julius |
nf
|
Julius |
bfn
|
Julius | has left the room |
cactusmitch |
The one I downloaded in PDF form yesterday? Time's up for today?
|
Mark M. |
cactusmitch: You did not download that PDF from
the Warescription site. The public site, perhaps, for the free Creative
Commons editions
|
Mark M. |
the chat was for 2:30-3:30pm Eastern
|
May 5 | 3:35 PM |
Mark M. |
two more next ewek
|
Mark M. |
er, week
|
Mark M. |
10am Eastern Monday
|
Mark M. |
4pm Eastern Friday
|
Mark M. |
as I'll be attending Google I|O in between
|
Mark M. |
have a pleasant day!
|
cactusmitch | has left the room |
Mark M. | turned off guest access |