Mar 25 | 9:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Mar 25 | 10:00 AM |
Sebastian | has entered the room |
Mark M. |
howdy!
|
Sebastian |
good morning Mark
|
Rick J. | has entered the room |
Mark M. |
howdy, Rick!
|
Rick J. |
Good Morning
|
Sebastian |
i
wanted to follow up on the alarmmanager, where i said it wasn't firing
on 2.0 devices. that was not correct. there was a bug in my code. on
that particular device/user he would get time changes updates every
minute, so i would push the alarm time front of me, since i would
reschedule the alarm on a time change
|
Rick J. |
OK to ask my question now?
|
Rick J. |
(after Sebastian)
|
Mark M. |
Sebastian: OK
|
Mark M. |
Sebastian: ummm...is there a question related to this? or is it just purely a followup?
|
Sebastian |
what
i will say though there are some oddities with the alarmmanager, but i
am not 100% certain yet. e.g. it's 5pm and i have an alarm at 6pm. then
i set manually the time to 5:59. i would expect the alarmmanager fire
at 6pm. but it didn't as i expected... i still have to verifiy this one
more time though... that's it
|
Sebastian |
just follow-up... i ask a totally different question after Rick...
|
Sebastian |
if i may :-)
|
Rick J. |
Go ahead, you were first
|
Mark M. |
yeah, I haven't played around with manually fussing with the time
|
Burt B. | has entered the room |
Mark M. |
eminently possible there are edge/corner cases in there where AlarmManager may get confused
|
Mark M. |
howdy, Burt!
|
Mark M. |
Sebastian: I guess it's still your turn -- ask away
|
Burt B. |
Hi,
Just really getting started with Android development, so just kind of
lurking this morning. I'm sure I'll have some questions over time.
|
Rick J. |
OK
|
Mar 25 | 10:05 AM |
Rick J. |
Mark, I would like to use the SD card to store secure apps
|
Mark M. |
Rick: that does not sound pleasant
|
Rick J. |
You can't normally run apps from the SD card, correct?
|
Mark M. |
:-)
|
Rick J. |
:)
|
Mark M. |
correct
|
Mark M. |
only with Cyanogen or related mods
|
Mark M. |
and that's only if you don't care about security
|
Rick J. |
So, I'm wondering if there is a way to be creative about it
|
Rick J. |
What is Cyanogen?
|
Mark M. |
Alternative firmware
|
Rick J. |
ah
|
Mark M. |
he has apps-on-SD baked in, from his own implementation
|
Rick J. |
Could the app information be stored in something like a library?
|
Mark M. |
works, but not secure
|
Mark M. |
there is nothing really secure about SD, period
|
Rick J. |
that could be loaded dynamically from an app?
|
Rick J. |
well, we might make it secure
|
Mark M. |
so, loading a JAR or something off the SD card is asking for trouble
|
Mark M. |
that's not strictly possible
|
Rick J. |
Can you elaborate?
|
Mark M. |
name any DRM solution that has survived the wild
|
Mark M. |
if the user has the device, and the device has your code, the user can get at your code
|
Mark M. |
there's nothing you can really do about that
|
Mark M. |
SD is worse, in that it is trivially easy to replace stuff there
|
Rick J. |
I can't really go into details
|
Rick J. |
but, say we could do something at the hardware level?
|
Rick J. |
Any creative ways of accessing that data as an app?
|
Mark M. |
at the hardware level, you probably don't even need to rely on the SD card
|
Mark M. |
what "that data"?
|
Rick J. |
in this case the app
|
Mark M. |
sorry, I'm seriously lost
|
Mar 25 | 10:10 AM |
Rick J. |
If an adb file is stored on the SD card
|
Mar 25 | 10:10 AM |
Mark M. |
do you mean APK file?
|
Rick J. |
can you programattically install it onto the Android machine?
|
Rick J. |
sorry, yes
|
Rick J. |
(understanding that it isn't secure while it is installed)
|
Mark M. |
you can initiate an install
|
Mark M. |
the user still need to approve the install
|
Rick J. |
OK
|
Rick J. |
and it would be possible to store jars on the SD card which are accessed at run time
|
Mark M. |
same sort of screens (e.g., permission confirmation) as if you loaded it off the Web
|
Dan S. | has entered the room |
Rick J. |
OK
|
Mark M. |
yes, if you're not concerned about security
|
Mark M. |
rephrase that
|
Mark M. |
yes, if the JARs hold dex bytecode, and if you can get the classloaders to play ball
|
Rick J. |
OK, thanks
|
Mark M. |
haven't tried this, but reportedly it works
|
Mark M. |
howdy, Dan!
|
Dan S. |
Hi there
|
Rick J. |
Do you remember a pointer to where you read this is possible?
|
Rick J. |
in case there is more I can read up on it?
|
Mark M. |
Look up DexFile and such in the SDK, then look for posts from fadden on [android-developers] related to those classes
|
Rick J. |
Thanks again...passing the baton to whoever is next...
|
Mark M. |
Sebastian: did you have a question?
|
Sebastian |
my
question is about updating a list whith a cursoradapter and a
contentprovider. let's say the list display a name and a checkbox. when
the user checks/unchecks the box i update the contentprovider with
update(). now the cursor still has the old data in so if if scroll the
row off/onto the screen bindView() will be called and i populate the
list with the now old cursor. now i guess i could call requery() on the
cursor but that seems slow and least from my tests i did ( user could
have 100s of rows) so requering for a simple checkbox change seems
costly.
|
Mark M. |
not surprising
|
Sebastian |
i guess i could just cache the checkbox state and don't use the cursor
|
Mark M. |
depends on what you're updating, I suppose
|
Mark M. |
is this one of the Android built-in ContentProviders?
|
Mar 25 | 10:15 AM |
Sebastian |
it's my own
|
Mark M. |
are you implementing more than one app?
|
Mark M. |
in other words, is this ContentProvider designed to share data between apps?
|
Sebastian |
not *really* needed since it's only used within our app. but for the sake of trying it out we did a contentprovider
|
Mark M. |
yeah, well...
|
Sebastian |
seems like that's biting me now in the...
|
Mark M. |
ContentProvider performance leaves something to be desired
|
Mark M. |
it's designed for cross-process work
|
Mark M. |
lotsa overhead, needed for cross-process work, not needed for intra-process stuff
|
Mark M. |
things *may* be faster if you switch to directly hitting SQLite
|
Dan S. |
View paste
|
Dan S. |
oops ..did not mean to do that until Sebastian was done ....
|
Mark M. |
Sebastian: in short, I'm not really sure how to answer your question definitively
|
Sebastian |
thank
you... i might rethink the design... android-dev was a strong proponent
of the contentprovider even if it's just itnernal within your app
|
Sebastian |
so it's all their fault :-)
|
Mar 25 | 10:20 AM |
Mark M. |
no, I definitely can't recommend ContentProviders for internal-to-app use, any more than I can recommend AIDL for local services
|
Sebastian |
thanks for input
|
Mark M. |
Dan: you're up now
|
Dan S. |
ok thanks...try to get my app to consistently exit.
|
Dan S. |
did my earlier errant post with my question and code snip come through?
|
Mark M. |
question, yes; code, no
|
Dan S. |
View paste
(6 more lines)
|
Mark M. |
OK
|
Mark M. |
what specifically is the problem?
|
Dan S. |
it work when I test on my device when tethered and running the app with eclipse
|
Dan S. |
but when I test with the app running on the phone the exit does not always seem to work
|
Mark M. |
meaning, nothing happens?
|
Mar 25 | 10:25 AM |
Dan S. |
the behavior is that I will hit the exit button. Then the dialog shows. I hit OK on the dialog and then the app shows up again
|
Mark M. |
"app shows up again" -- meaning it feels like it finish()-es but restarts, or does the dialog just go away like normal?
|
Dan S. |
correct...the dialog goes away, but the app still shows up
|
Mark M. |
You might try calling finish() inside of a Runnable that you use with post() or postDelayed()
|
Mark M. |
basically, get it so it is *triggered* by the dialog, but does not run in the dialog's onClickListener
|
Dan S. |
ok...I have not heard of post()...how does that fit in the lifecycle?
|
Mark M. |
post() and postDelayed() are methods on Handler and View
|
Mark M. |
they schedule a Runnable to be invoked by the main application thread
|
Mar 25 | 10:30 AM |
Mark M. |
post() will have the Runnable run after any other events presently in the main application thread's message queue
|
Mark M. |
postDelayed() adds a delay on that, expressed in milliseconds
|
Dan S. |
ok. looks like I need to do some reading...I will try that-thanks!
|
Mark M. |
anybody else have any questions?
|
Rick J. |
Yes
|
Burt B. |
Not today, but after some reading and working on a couple of ideas I'm sure I'll have some in the near future :)
|
Mark M. |
Rick: go ahead
|
Dan S. | has left the room |
Mark M. |
Burt: sounds good!
|
Rick J. |
I
read some old forums that suggest that Google is working on allowing
you to run apps from an SD card, but haven't seen anything recently
|
Rick J. |
do you know if there is any truth to this?
|
Mark M. |
the most formal statement on this effect was a hint dropped by Andy Rubin at the Nexus One launch
|
Mark M. |
and that wasn't terribly definitive
|
Mark M. |
as you're probably aware, the core Android team is fairly close-mouthed on future features
|
Mar 25 | 10:35 AM |
Rick J. |
Also, what makes the SDCard more vulnerable than, say, the internal NVRAM?
|
Mark M. |
hence, we won't know much about apps-on-SD "for realz" until it shows up one day
|
Rick J. |
:)
|
Mark M. |
1. SD card can be ejected and is read/write to anything you plug it into
|
Mark M. |
2. SD card is read/write to all processes on the device itself
|
Mark M. |
contrast that to your app-local files (getFilesDir()), which is read-write to you and root, but deny-all to everyone else
|
Mark M. |
courtesy of Linux and having a real filesystem
|
Mark M. |
so, data in your app-local file store can still be gotten to by users who root their phones, but is otherwise fairly safe
|
Rick J. |
OK, thanks
|
Mar 25 | 10:40 AM |
Sebastian |
one
more general question. i didn't really read anything about it, please
execuse if it's obvious... can i do (easily) animations between
activities? e.g. i have my list view activity and if the user clicks a
row i would like to slide in the details-view activity from the right.
like iphone-ish with their table controllers.
|
Mark M. |
starting with 1.6 or 2.0, there's a way you can specify what the inter-activity animation is
|
Mark M. |
whether or not they are enabled, though, is up to the user
|
Mark M. |
and, off the top of my head, I forget exactly where you specify those animations
|
Sebastian |
i see. thanks
|
Sebastian |
That's it for me. time to leave the campfire and go back to my desk... have a good day everyone!
|
Mark M. |
you too!
|
Sebastian | has left the room |
Mark M. |
anybody else have a question?
|
Mar 25 | 10:45 AM |
Rick J. |
I'm all set, thanks
|
Burt B. |
I'll try to have some questions next time :) Thanks..
|
Rick J. | has left the room |
Burt B. | has left the room |
Mar 25 | 10:50 AM |
Mark M. | turned off guest access |