Mark M. | has entered the room |
Mark M. | turned on guest access |
Prasanna P. | has entered the room |
Prasanna P. |
Hi Mark!
|
Mark M. |
howdy Prasanna!@
|
Mark M. |
er, ignore that @
|
Prasanna P. |
no prob
|
Prasanna P. |
Here are 3 questions:
|
Prasanna P. |
View paste
|
Mark M. |
1. Speed-wise, they're roughly equivalent, so I'd lean towards SAX, as more Java developers will be familiar with it
|
Prasanna P. |
but isn't
|
Mark M. |
2. There is no "method of the ContentProvider" that can return a Document
|
Prasanna P. |
xml pull parser easier to use?
|
Feb 1 | 8:00 PM |
Mark M. |
3. Probably, but I haven't tried that combination
|
Mark M. |
In terms of ease of use, you say "to-MAY-toe", I say "to-MAH-toe"
|
Mark M. |
IOW, ease of use is in the eye of the beholder
|
Mark M. |
if the development team vastly prefers the pull parser, feel free to use it
|
Prasanna P. |
ok. got it for 1
|
Prasanna P. |
In terms of 2, I think I did not write this properly ..
|
Prasanna P. |
they want us to return an xml document. ie a string that is an xml document ...
|
Mark M. |
OK
|
Prasanna P. |
this may be about 15 lines of code
|
Mark M. |
where is the XML coming from?
|
Prasanna P. |
i meant lines of xml lines
|
Prasanna P. |
it is store in the sd card
|
Mark M. |
OK
|
Mark M. |
what specifically is your concern?
|
Prasanna P. |
instead of returning a whole xml document as a string shouldn't we be sending the path to the document in the sd card
|
Mark M. |
I can't answer that in the abstract
|
Mark M. |
either approach could be valid
|
Prasanna P. |
ok got it for 2
|
Mark M. |
downside of returning the path is leaking of implementation-specific information (e.g., path structure)
|
Prasanna P. |
ok
|
Prasanna P. |
In terms of 3, the interface exposed by a ContentProvider can be accessed by an app. Right?
|
Prasanna P. |
So, I do not see why the there would
|
Feb 1 | 8:05 PM |
Prasanna P. |
be any issues with the AppWidgetProvider being able to use
|
Prasanna P. |
the interface exposed by the ContentProvider. Do you agree?
|
Mark M. |
so long as you aren't trying anything asynchronous, yes
|
Mark M. |
that's the downside of doing the work in an AppWidgetProvider directly
|
Mark M. |
and, since your ContentProvider is apparently doing flash I/O, doing that in the AppWidgetProvider is not a good idea
|
Mark M. |
but it is technically possible
|
Mark M. |
I would have the AppWidgetProvider delegate the work to an IntentService, which communicates with the ContentProvider
|
Prasanna P. |
ok ....
|
Prasanna P. |
so I am assuming that the AppWidgetProvider would call the IntentService with different Intents corresponding to the ...
|
Prasanna P. |
different interface methods ... does this make sense?
|
Mark M. |
No
|
Mark M. |
Your AppWidgetProvider is probably about six or seven lines of code
|
Mark M. |
It calls startService() from onUpdate()
|
Mark M. |
and that's it
|
Mark M. |
Oh, wait
|
Feb 1 | 8:10 PM |
Mark M. |
if by "interface methods", you mean onUpdate(), onDisabled(), and the other methods *on* the AppWidgetProvider, then yes
|
Mark M. |
things that don't do anything slow could be implemented on the AppWidgetProvider directly if you choose
|
Mark M. |
but anything that involves flash or network I/O
should have their AppWidgetProvider method (e.g., onUpdate()) call
startService() to send the command to the IntentService, with enough
details in the Intent to let the service know what needs to be done
|
Prasanna P. |
ok.
|
Prasanna P. |
and what would be a good way to return the results back to the AppWidgetProvider in a situation like this - a message?
|
Mark M. |
ideally, there are no "results" that the AppWidgetProvider needs
|
Mark M. |
just update the app widget from the IntentService
|
Mark M. |
it is impossible to "return the results" in any case
|
Feb 1 | 8:15 PM |
Prasanna P. |
Trying to pass "it is impossible to "return the results" in any case"
|
Mark M. |
the AppWidgetProvider will be destroyed in microseconds, after the startService() call
|
Mark M. |
hence, there is nothing to "return the results" to
|
Mark M. |
think of AppWidgetProvider as a facade, with the IntentService as being the true implementation of the "app widget"
|
Prasanna P. |
ok
|
Prasanna P. |
So ...
|
Prasanna P. |
In the IntentService we create a WidgetManager and update the Widget. Right?
|
Mark M. |
AppWidgetManager
|
Mark M. |
but otherwise yes
|
Prasanna P. |
Yes. Meant AppWidgetManager
|
Prasanna P. |
OK. Mark. Got it.
|
Feb 1 | 8:20 PM |
Prasanna P. |
Thanks! Is it ok if I head out.
|
Mark M. |
sure
|
Mark M. |
don't hang around here on my account!
|
Prasanna P. |
I am sure someone will come by soon. Bye
|
Mark M. |
have a pleasant evening!
|
Prasanna P. |
you too. Have a pleasant evening!
|
Prasanna P. | has left the room |
Feb 1 | 8:35 PM |
Prasanna P. | has entered the room |
Prasanna P. |
Mark, Here is a question that just came up
|
Mark M. |
hello again
|
Prasanna P. |
I was just trying to build a project using honeybomb
|
Prasanna P. |
and Eclipse wanted me to use honeybomb as the min sdk
|
Prasanna P. |
I was not able to use a 2.3 as the min sdk. Why is this?
|
Mark M. |
1. I don't use Eclipse
|
Mark M. |
2. I haven't used Eclipse with the HC Preview SDK
|
Prasanna P. |
ok
|
Mark M. |
3. I haven't done anything with the HC Preview SDK yet, as I have a cold and feel lousy
|
Mark M. |
in short, I haven't a clue, sorry
|
Prasanna P. |
so ok :)
|
Prasanna P. |
i meant oh ok :)
|
Prasanna P. |
but in general if i have to use min sdk as 'honeybomb' then it will only run on devices that are running on ...
|
Prasanna P. |
'honeycomb'. Right?
|
Mark M. |
correct
|
Mark M. |
as I understand it, you're supposed to use "Honeycomb" for the targetSdkVersion
|
Mark M. |
that will get you Holographic theme support and such
|
Feb 1 | 8:40 PM |
Mark M. |
in fact, the SDK docs specifically discuss having minSdkVersion="9" or lower
|
Mark M. |
so it should work
|
Prasanna P. |
ok ....
|
Mark M. |
when you say "I was not able to use a 2.3 as the min sdk", what do you mean?
|
Julius | has entered the room |
Prasanna P. |
Tried again and I get same message from Eclipse
|
Prasanna P. |
'The SDK target is a preview. Min SDK Version must be set to 'Honeycomb'.'
|
Mark M. |
beats me
|
Mark M. |
(btw, howdy, Julius!)
|
Mark M. |
feels like a bug in the ADT, but I can't say for certain
|
Julius |
hi all
|
Mark M. |
Julius: do you have a question?
|
Prasanna P. |
Yes, feels like a bug to me also. Hi Julius. Thanks again Mark! Heading out.
|
Prasanna P. | has left the room |
Julius |
oh yes
|
Julius |
I have a memory leak in my application and have finally figured out how to reprodue it
|
Julius |
basically I start the activity and rotate the screen about 18 tiems
|
Julius |
tiems
|
Julius |
times
|
Julius |
I understand I must have passed the activity or context to soemthing which isn't eing released
|
Julius |
(at least that's my guess)
|
Feb 1 | 8:45 PM |
Julius |
have you an idea how I might go about debugging this?
|
Mark M. |
Use DDMS
|
Mark M. |
rotate the screen a bunch of times
|
Mark M. |
in DDMS, punch the GC toolbar button a few times
|
Mark M. |
then, in DDMS, punch the "Dump HPROF file" button
|
Mark M. |
load that into the Eclipse MAT (Memory Analysis Tool?) utility
|
Mark M. |
use that to try to figure out what's holding onto what
|
Julius |
: / ah yeah I haven't quite got MAT figured out yet... I have it loaded though
|
Julius |
thanks I'll give that a go
|
Julius |
will lurk in the mean time if that's ok
|
Mark M. |
there's nobody else here
|
Mark M. |
not much lurking to do
|
Julius |
:)
|
Julius |
I've been stuck on this for weeks...
|
Julius |
that said I now have super efficient lists as I thought that was the problem
|
Julius |
SoftReferences all over the show :)
|
fitz | has entered the room |
Mark M. |
howdy, fitz!
|
Mark M. |
fitz: do you have a question?
|
Feb 1 | 8:50 PM |
fitz |
Mark will you auto e-mail transcripts - do they only get emailed if you join office hours?
|
Mark M. |
they get emailed to the cw-android Google Group
|
Mark M. |
if you subscribe to the Group, you get the transcripts, along with everything else on there
|
fitz |
I ready them after to mark sense of questions :) not as fast as most users yet
|
Mark M. |
I don't email empty transcripts (nobody showed), and occasionally I forget
|
fitz |
ya think I get group info - is Google groups going away or was that just a roomer
|
Mark M. |
Google Groups isn't going away, but they are dropping some features
|
Mark M. |
nothing too major for what I've been using them for
|
fitz |
ok - so do you know of an free SW that will convert MDB to SQLite?
|
fitz |
need to get c# filled DB over to phone
|
Mark M. |
no, sorry
|
fitz |
any paid SW?
|
fitz |
and this DB updates every 12 hrs or so - so I would need it auto converted - easy or should I look for another option
|
Mark M. |
I haven't touched MDB in about 15 years
|
fitz |
access
|
Mark M. |
MS Access is *so* not my area of expertise
|
Feb 1 | 8:55 PM |
fitz |
ok - need to jet thanks
|
Julius |
(excuse me: huge Thank You Mark!)
|
fitz |
1 more question
|
Julius |
(I haven't been sleeping well because of this)
|
Mark M. |
fitz: go ahead
|
fitz |
will ask next time
|
fitz |
thanks need to jet
|
Mark M. |
uh, ok
|
fitz | has left the room |
Julius |
thank you so much - I guess I get pretty involved
with these things. I really appreciate it. Have a cracker of a
morning/day/evening.
|
Julius |
bfn
|
Mark M. |
see ya
|
Julius | has left the room |