May 9 | 9:50 AM |
Mark M. | has entered the room |
May 9 | 9:55 AM |
Mark M. | turned on guest access |
Dominic M. | has entered the room |
Mark M. |
howdy, Dominic!
|
Dominic M. |
Hi Mark, just gathering my questions now - first time on this
|
Mark M. |
no problem
|
May 9 | 10:00 AM |
Jumana | has entered the room |
Mark M. |
howdy, Jumana!
|
Jumana |
hey mark!
|
Mark M. |
Dominic: do you have a question ready?
|
Jumana |
good good and u?
|
Jumana |
yup i do
|
Dominic M. |
My question is regarding Content Providers. Just
wondering what the options I have in authorizing users to use my content
provider
|
Mark M. |
Dominic: there is no concept in Android of "authorizing users to use [your] content provider"
|
Mark M. |
if it's installed, by definition, users can use it
|
Mark M. |
that's the piont
|
Mark M. |
er, point
|
Dominic M. |
mmmhh, ok
|
Mark M. |
you can use permissions to allow users to indicate which third-party apps should access the content provider
|
Mark M. |
but if a third-party app has the permission and
calls the content provider, you have no way of saying "um, wait, I need
the user to log in"
|
Mark M. |
if you need that, don't expose the content provider, and do the authorization in your own activities
|
Mark M. |
Jumana: your turn -- what's your question?
|
Dominic M. |
I tried something like android:protectionLevel - but thought there might be another option.
|
Dominic M. |
thanks
|
May 9 | 10:05 AM |
Jumana |
i was just wondering in which scenarios would layoutinflaters be used?
|
Mark M. |
behind the scenes, setContentView() and the built-in adapter classes (e.g., ArrayAdapter) use LayoutInflater
|
Mark M. |
you will use it directly in lots of other places, such as elaborate custom adapters, fragments, action bar custom views, etc.
|
Jumana |
oh ok
|
Mark M. |
basically, any time you want to convert layout XML into a View, you need LayoutInflater
|
Jumana |
im still learning. yet to explore all that
|
Jumana |
thanks anway
|
Mark M. |
Dominic: do you have another question?
|
Dominic M. |
yes
|
Jumana |
also i was just thinking of a way to create a presentation on android like a .pps
|
Jumana |
oops sorry
|
Jumana |
dominic, go ahead
|
Dominic M. |
Is there a way for the content provider to find out what the package name is of the app thats calling it?
|
Mark M. |
not really
|
Mark M. |
the expectation is that if you care about the caller, you should be implementing a custom permission
|
Dominic M. |
ah - yes, ok
|
May 9 | 10:10 AM |
Dominic M. |
thanks - over to you jumana :)
|
Mark M. |
you can either protect the content provider via the permission at the XML level or via checkCallingPermission()
|
Mark M. |
Jumana: your turn -- what is your next question?
|
Dominic M. |
ok, thanks
|
Jumana |
pointers on how to implement slideshows ? like a .pps
|
Mark M. |
how big is your development team>?
|
Jumana |
not big at all
|
Mark M. |
then you probably aren't going to be implementing slideshows like a .pps
|
Jumana |
why do u ask?
|
Mark M. |
parsing and displaying a .pps would take a few dozen developer-months, off the cuff, at minimum
|
Jumana |
no i know i can't develop a MS powerpoint but i was just wondering ...
|
Jumana |
if there is a way i can implement image flipper with some sound for example
|
Mark M. |
well, you can certainly change the image displayed by an ImageView
|
Mark M. |
and you can certainly play sound
|
Jumana |
a lot of images flipping in a given time period with some sound files playing in the bk grnd
|
Mark M. |
it seems like you have the solution, so I am confused as to what your question is
|
Jumana |
but can that sound playing be linked with the images being flipped?
|
Mark M. |
not really
|
Jumana |
tahts my question
|
Mark M. |
you can create your own metadata (e.g,. SMIL)
|
Mark M. |
but parsing that metadata and applying it is up to you
|
May 9 | 10:15 AM |
Mark M. |
there's an off chance that WebView can actually render SMIL -- haven't tried that
|
Jumana |
oh ok
|
Mark M. |
it's not like sound files intrinsically know about image files or vice versa
|
Mark M. |
if you want to glue those together, you have to write the glue
|
Mark M. |
Dominic: do you have another question?
|
Jumana |
was just thinking of maiking an app for my 2 year
old where the images of animals etc. keep flipping along with the
associated noises - you know what i mean?
|
Jumana |
oh ok got it, mark -thanks
|
Dominic M. |
yes, I've another question when you're ready
|
Dominic M. |
Again, question regarding permissions to providers.
|
Mark M. |
Dominic: go ahead
|
Dominic M. |
I can view all the providers on my phone, and when
I try to access some of them (eg twitter/facebook providers) I get
errors......even though I've added the readPermission to my app
|
fitz | has entered the room |
Dominic M. |
why is that?
|
Mark M. |
you'd have to take that up with the authors of those providers, I imagine
|
Mark M. |
howdy, fitz!
|
Dominic M. |
ok, so generally, do the authors of those providers not make their api publically available?
|
Dominic M. |
is that hopw they get around authorizing?
|
Mark M. |
Dominic: if they don't document the use of their content provider, I would assume that they aren't expecting you to use it
|
Dominic M. |
ok, fair enough i guess
|
Mark M. |
conversely, if they do document the use of their content provider, said documentation should cover permission stuff
|
May 9 | 10:20 AM |
Dominic M. |
yup, got it. one more q
|
Mark M. |
fitz: do you have a question?
|
Dominic M. |
Is it possible for content provider to be accessed from a browser?
|
Mark M. |
Dominic: you can try typing in a content:// URL,
but it will only work if the content provider is supporting openFile()
on that URL
|
Dominic M. |
i mean is it possible for javascript or html to access the content provider?
|
Mark M. |
no
|
Dominic M. |
ok, thanks - thats all my questions
|
Mark M. |
fitz: do you have a question?
|
Mark M. |
Jumana: do you have a question?
|
fitz |
good morning
|
Jumana |
no, mark. Im fine
|
Mark M. |
if anyone comes up with a question, chime in
|
Jumana |
ok
|
May 9 | 10:25 AM |
Jumana |
does commonsware have some kind of an online training?
|
Mark M. |
no, sorry
|
Jumana |
or certification?
|
Jumana |
ok
|
Mark M. |
no, sorry
|
fitz |
so I build an ant job in IntelliJ and it says
BUILD SUCCESSFUL - in your book it says to run in emulator - how to I
get the build in emulator to test app
|
Jumana |
any training in the middle east in the near future?
|
Mark M. |
fitz: run ant clean install to install the app in the emulator from Ant
|
Mark M. |
Jumana: no, sorry -- of my scheduled training, the closest is Belgium
|
fitz |
not cluing into what that means sorry
|
Jumana |
:-) ok
|
Mark M. |
at the command line type:
|
Mark M. |
ant clean install
|
Mark M. |
ant is the Ant program
|
Mark M. |
clean and install are command-line arguments to that program
|
Mark M. |
clean is the equivalent of an Eclipse "Project > Clean" action from the menu
|
fitz |
ok so install know to go get the emulator?
|
Mark M. |
install compiles and installs the app on the running emulator or attached device
|
Mark M. |
the emulator must be running first
|
fitz |
ok that is tha part I missed thanks
|
May 9 | 10:30 AM |
fitz |
I will give it a shot - so off to Google IO
|
Dominic M. |
Thought I was finished, but I've another question
then regarding how content provider should store its data. Bearing in
mind a lot of data may need to be stored (I dunno, lets say 10000+
entries) is it best to store that data in SQLLite database? How does
performance of accessing that data in SQLLite compare to storing it on
memory card?
|
Mark M. |
fitz: yeah, I'll be headed in an airportly direction in an hour or two
|
fitz |
? will it focus on Honeycomb
|
Mark M. |
Dominic: it is impossible to answer your questions in the abstract
|
Mark M. |
I don't know what an "entry" is
|
Mark M. |
I don't know why you are using a content provider
|
Mark M. |
I don't know what you are expecting consumers of the content provider to do
|
Mark M. |
fitz: will what focus on Honeycomb?
|
Dominic M. |
ok, sorry for vagueness
|
May 9 | 10:35 AM |
fitz |
the android sessions at Google IO
|
Mark M. |
fitz: a few will be Honeycomb-centered
|
Mark M. |
many should be more generic
|
Dominic M. |
I'm using a content provider because I want to
store data on the phone that another app can use. However, I don't want
to make it publicly available. I thought content provider would be best
suited? Should I look at other options?
|
fitz |
ok - cool - do you know if there will be a specific site to watch live feeds or tapes sessions
|
fitz |
tapes that is :)
|
fitz |
taped
|
Mark M. |
Dominic: no that sounds like a reasonable use for a ContentProvider, secured by a permission
|
Mark M. |
fitz: long-term, they'll be on YouTube
|
Dominic M. |
ok
|
Mark M. |
fitz: short-term, I would assume that http://www.google.com/events/io/2011/about.html will eventually have info about where to connect to the streams
|
Mark M. |
the boldface items on http://www.google.com/events/io/2011/sessi… will be the live-streamed ones
|
May 9 | 10:40 AM |
fitz |
ok great thanks
|
Mark M. |
Dominic: if an "entry" is something that looks like a database row, I would use SQLite or *some* database
|
Mark M. |
if an "entry" is a file being returned via
openFile(), then individual files somewhere (internal or external
storage) would probably be better
|
Dominic M. |
Ok, got it. That sounds good to me. Again, sorry
for vagueness, not sure of full requirements yet and just doing some
research first. ;)
|
May 9 | 10:50 AM |
Jumana | has left the room |
May 9 | 10:55 AM |
Mark M. |
running out of time here -- any last questions?
|
Jumana | has entered the room |
Jumana | has left the room |
Mark M. |
OK, well, that's a wrap for today's chat
|
Mark M. |
next one is Friday, 4pm Eastern
|
Mark M. |
have a pleasant day, all!
|
Dominic M. | has left the room |
fitz | has left the room |
Mark M. | turned off guest access |