Office Hours — Today, June 24

Tuesday, June 22

Jun 24
9:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
Brian C.
has entered the room
Mark M.
howdy, Brian!
Brian C.
Hi, Mark
10:00 AM
Tom R.
has entered the room
Mark M.
howdy, Tom!
Brian C.
quick question... is there a loading image like Default.png for Android?
Mark M.
what do you mean by "loading image"?
CalvinS
has entered the room
Brian C.
Default.png = iPhone loading image that is displayed while the app is setting up
Tom R.
hey Mark
Mark M.
Brian: nothing built in that works system wide, no
Brian C.
ok, I can fake it easily enough
Mark M.
(btw, howdy CalvinS!)
Brian C.
thansk
CalvinS
Hi all!
Mark M.
ok, Tom -- got a question?
Tom R.
yeah
your finished brian?
Brian C.
yes
btw, splash screen is probably a better description
Tom R.
Ok, right I have an Android Dev question but Its a slightly not do devish one...
so, Im working on an application that involves the collection of data such data which uniquely IDs the device and data that is relevant to the app such as your SMS messages... (dont want to go into to much detail but lets just say you can read and send SMS from the web) :) ...
So
Im I right in thinking I need to declare what data I collect via a EULA to get out of the grasps of Googles own default developer agreement rules? OR something like that?
10:05 AM
Mark M.
well, you need to have a EULA
exact details of what goes in that EULA are between you and qualified legal counsel
in the phrase "qualified legal counsel", one word might apply to me, and it surely isn't "legal"
Tom R.
hmmm... all this legal stuff is so annoying... puts me of from just trying to make my free app! :/
Mark M.
yeah, well
I can't really help much with that
Tom R.
Yeah no problem I understand. At least you can confirm I need some form of EULA
Mark M.
if you're distributing through the Android Market, yes
Tom R.
So its the dev distro agreement that defines I need a eula?
Mark M.
yes
Tom R.
Ok thanks, I will look into it.
10:10 AM
Mark M.
OK, next up is CalvinS: got a question?
CalvinS
yes
My question is about adding search to my app. In your book you demonstrate how this works but include a simple loop to find the strings in the array. In the Google sample Searchable Dictionary it seems like they use a content provider and a database.
Mark M.
how you handle the search request is up to you
CalvinS
so I should choose the best method to search what ever data I have?
Mark M.
sure
my book examples tend to be on the simplistic side, to demonstrate a core technique
CalvinS
so if I don't want to use a database, I can use whatever is in the core Java libraries?
Mark M.
sure
or things you get from third-party JARs (e.g., searching within your object database)
or whatever
CalvinS
I just need to search a few thousand strings
Mark M.
could be database, could be some smallish free-text search engine, could be a custom data structure
10:15 AM
Mark M.
could be random number generator :-)
whatever works for you
CalvinS
haha
ok thanks
Mark M.
anybody have another question?
Brian C.
yes, I do
Mark M.
fire away!
Brian C.
on p. 102 of the tutorials book, there is an onCreate method for a database with only a call to an execSQL statement
the last sentence on the page says "We are seeing if there already is a restaurant table, and if not, executing a SQL statement to create it."
Mark M.
that would be a typo
Brian C.
OK, thanks
Mark M.
I used to actually look to see if the table is there
got rid of it as being pointless in this situation
but, obviously I missed fixing the reference
the good news is, I am publishing an update to that book today
so I can quick slide in a fix
Brian C.
Oh, great.
Mark M.
your timing is exquisite
Brian C.
haha
I don't know SQLite all that well so I thought I was missing something
ok, that's all for me....Next!
Mark M.
oh, good, it looks like I actually already fixed it
10:20 AM
Mark M.
(in the about-to-be-published edition)
10:20 AM
Mark M.
that whole tutorial got a serious overhaul
anybody have another question?
Tom R.
Thats all from me. Thanks for the help Mark. Bye all.
CalvinS
Who's going to get a Droid X?
Mark M.
only if there are developer problems with it
Tom R.
has left the room
10:25 AM
Mark M.
it is probably a nice phone, but it is Verizon
phones from non-GSM carriers are annoying for the CommonsWare Labs, as I can't just swap SIMs around
CalvinS
ic Verizon is good for voice in New York, so that's what I use
10:30 AM
CalvinS
here's a question
I have a few thousand MP3 files in my app and want to access them by name instead of by resource ID
Mark M.
*in your app*?
seriously?
your APK must be huge
CalvinS
will it have bad performance to use getAssets by name instead of getting by resource ID?
yeah the final APK is not created yet, but I hope it's around 40MB
Mark M.
I wouldn't expect a serious problem, but, then again, I have only used assets/ for WebKit pages and fonts
if the APK will be around 40MB, you absolutely positively do NOT want to use Android Market copy protection
APKs require twice their size in free space for install; copy-protected apps require four times their size in free space
So, unless they user has 160MB of free space (more than many devices even ship with), they would have no shot of installing the app
are you really sure you can't download those MP3 files separately?
CalvinS
What is Android Market Copy Protection?
10:35 AM
Mark M.
it's a pain in the [bleep]
from the casual developer's perspective, it's a checkbox on the form when you submit your app to the Market
CalvinS
haha
Mark M.
if you turn it on, Android attempts, in vain, to prevent others from grabbing your APK off the device
in practice, rooted phones can get past this without issue, so as an anti-piracy measure, it's pointless
Brian C.
Ugh. That explains something for me.
Mark M.
it also causes your app to now show up on new phones' edition of the Android Marekt, usually for a week or two
er, that's "to not show up"
AFAICT, it adds no value and causes material harm
Brian C.
I have a client for whom I developed a suite of apps that ship with onboard databases in the assets folder
some of the db's are about 10MB, and after I copy them to the databases folder it takes up another 10MB
and he insists on copy protection
Mark M.
that means that, during the install process, his DBs require 40MB
CalvinS
after my APK is downloaded from the Android Market, where is my APK?
Mark M.
after install, they require 10MB
after you copy them, they require 20MB
CalvinS: somewhere in /data that non-rooted phones cannot readily access, IIRC
I forget the details
10:40 AM
CalvinS
so a user can root the phone and grab my APK and access all it's data?
Mark M.
sure
CalvinS
without copy protection that is
Mark M.
with copy protection too
leastways, the copy protection mechanism takes no time to undo, from what I'm told
CalvinS
hmm, then I'll need an added cost of a web server to host these files
Mark M.
unless you're anticipating hundreds of thousands of downloads, you might just go with Amazon S3 or something
I'm using that for the books nowadays
10:45 AM
CalvinS
how much is S3?
Mark M.
15 cents per GB stored
15 cents per GB transferred
CalvinS
monthly?
Mark M.
yes
CalvinS
it's like the Staples commercial...."Wow that's inexpensive!"
Mark M.
your pain will be on the transfers
40MB means 25 downloads to the GB
(ok, 26 I guess)
so, it's about a penny per download
nice thing is that there is no minimum
Brian C.
Does downloading to the device help anything as far as pirating? Won't the data be somewhere in the file system after the download?
Mark M.
no, it won't help in terms of pirating
it will help in terms of taking up too much storage space in on-board flash
Brian C.
to the SD card then?
Mark M.
for something of that size, ideally it would go on the SD card
10:50 AM
Mark M.
even if you needed it to go in the on-board flash, to help cut down casual piracy, you'd save on the double-the-space install issue
CalvinS
Can you summarize each step I should perform at a minimum to protect this data?
Brian C.
can you do the same with a database, or does it have to be in the databases folder for SQLiteOpenHelper?
Mark M.
You can try SQLiteOpenHelper with a full path -- haven't tried that
10:55 AM
Mark M.
any last questions?
Brian C.
I think Calvin had one, but it might have gone unnoticed?
Mark M.
whoops
CalvinS
Yes, in a nutshell what are the minimum things you do when you deploy an app and want to secure its data?
Mark M.
To quote the Wicked Witch of the West: "Surrender, Dorothy"
there is nothing you can do, on any platform, to secure data against the person who has physical access to the platform
short of serious crypto
and even the serious crypto won't help, because the keys have to be in your app, and the app can be examined
11:00 AM
Mark M.
so, the real question is: who are you trying to defend against?
if you are trying to defend against a casual user, either encrypt the files and put them on the SD card, or put them on the on-board flash
CalvinS
ic....clicking my heels now and saying there's no place like home
Thanks!
Brian C.
thanks, Mark, super helpful as always!
Mark M.
next week's chats are at an unusual time -- 4pm Eastern
otherwise known as 9pm Lisbon
CalvinS
nice!
Mark M.
chats should resume their regular schedule the following week, at least for a few weeks
Brian C.
have fun!
Mark M.
it should be interesting to see what life is like in a country that is *really* into World Cup
also, watch for Android Programming Tutorials Version 2.8 arriving very soon
have a pleasant day!
Brian C.
has left the room
CalvinS
has left the room
Mark M.
turned off guest access

Tuesday, June 22

 

Office Hours

People in this transcript

  • Brian Cooley
  • CalvinS
  • Mark Murphy
  • Tom Riley