Office Hours — Today, February 10

Tuesday, February 8

Feb 10
10:25 AM
Mark M.
has entered the room
Mark M.
turned off guest access
Mark M.
turned on guest access
10:30 AM
Jim
has entered the room
Mark M.
howdy, Jim!
Jim
Hello. How are you today ? Still depressed over HoneyComb ?
Mark M.
that post struck a nerve, apparently
Jim
Nope. Just chuckling.
Mark M.
I'm less depressed over HC specifically than I am the continually-climbing learning curve for newcomers
but that's probably not why you're here
Jim
How best to get a small image (320x320) or thereabouts, from the camera via Activities as opposed to direct usage of the camera ?
Mark M.
so...how can I help you today?
10:35 AM
Mark M.
good question
I've seen people use ACTION_CAPTURE_IMAGE, or something like that, but I haven't used it personally
ah, ACTION_IMAGE_CAPTURE
on MediaStore
Jim
Frankly, I find the direct usage to be a pain. I am currently using the CAPTURE_IMAGE , like yous said.
Mark M.
it's a pain, but it's the only thing that gives you real control
Jim
You do a StartActivity and give it a callback.
So, I am guessing, you have no knowledge of how, correct ?
Mark M.
well, beyond posts like this: http://achorniy.wordpress.com/2010/04/26/h…
fitz
has entered the room
Mark M.
there are no extras for saying "I only want 320x320"
fitz
morning
Mark M.
you'd have to scale the resulting bitmap yourself to your desired size
based on whatever the camera and MediaStore gave you (image and thumbnail)
howdy, fitz
Jim
Do your books cover the scaling API ?
Mark M.
not presently
I will probably get into that in _Tuning Android Applications_ here in 2011
from what I've seen, it's not that hard
10:40 AM
Mark M.
biggest challenge is that you can scale disk->disk
you have to scale disk->RAM
Jim
I'll move to the backgroundnow for a while and let fitz have a go.
Mark M.
OK...fitz, do you have a question?
fitz
I need to pass to API the user entered GMAIL info stored in setup of the phone - can I get access to that setting? does this request/question make sense? or should I restate
Mark M.
the question makes sense
the answer, AFAIK, is that data is unavailable to you
Mike R.
has entered the room
Mark M.
Ms. Hackborn just posted about that recently, though I forget exactly where
Mike R.
Hello
Mark M.
howdy, Mike R!
fitz
ok - so I will create a user enter screen - is there a list of what is available to us? maybe at android site - did I miss it?
Mark M.
I'm not sure what the scope of "what is available to us" you are seeking
I presume the user's Google accounts are available from AccountManager
but the passwords aren't
fitz
well the other day you stated you can not get to calendar now we can not get to settings - sounds like all we have access to is contacts
Mark M.
you can look at the android.provider package for that sort of stuff
contacts, call log, some alarm clock stuff
MediaStore, some settings
and that's about it
10:45 AM
Mark M.
giving apps access to users Google passwords would be an unmitigated disaster
fitz
ok - do you have any idea in your travels - hearing about this opening up a bit more to us - especially for tablets, TV etc.
Mark M.
in terms of Google accounts specifically, Ft. Lauderdale would freeze over first
beyond that, I have no particular insights
Mike: do you have a question?
fitz
ya agreed on Google passwords - just thought because they use it for gmail and calendar and if we use it for Google access only they might see the light - wishful thinking eh!
Mike R.
yes a couple actually
My company go purchased by a larger company with more mobile apps. Looking to set up a more formal development/qa facility
Mark M.
I got a letter about that -- ummmm...congrats?
Mike R.
the question is: If we could buy 5 Android phones to test on, what would you recommend?
Mark M.
um
do you anticipate anything about the apps will be carrier-specific, such that you'd need the devices to be on different carriers?
Mike R.
we already have an original droid, so would be in addition to that. Nothing carrier specific (i think)
10:50 AM
Mark M.
ok
I'd get 1-2 tablets and 3-4 phones
tablet choices would be Motorola XOOM once it ships (Honeycomb), Galaxy Tab second
phones...I'd aim for a mix of input types and perhaps screen sizes
for example, if you distribute to Europe/Asia a lot, I'd nab some QVGA/small-screen device, like a Sony Ericsson X10 mini or Motorola CHARM.
I'd consider a device with an always-available keyboard, like a Motorola CHARM or DROID PRO
beyond that, it's pretty much a crapshoot
ordinarily, I'd say get a Nexus One or Nexus S, since they should get Android updates faster
however, the Nexus One never got Gingerbread, and heaven only knows if/when it'll get an update past Froyo
so the "Googlephone for faster updates" theory has a big hole below the waterline
Mike R.
Nexus S is the unlocked phone you can buy from Google now?
Mark M.
Not sure if you can get it from Google -- I got mine from Best Buy
Mike R.
can be purchased unlocked?
Mark M.
I'm not aware that it is SIM-locked
however, it probably only does 3G on T-Mobile
just due to radio frequencies
I
er, I'm not aware of an AT&T model
10:55 AM
Mark M.
let alone a CDMA flavor (Verizon, Sprint)
Jim: do you have another question?
Jim
Yes.
Back to the scaling.
Are you speaking of Bitmap.compress ?
Mark M.
no, I was thinking BitmapFactory.createBitmap
Jim
Ah.
Mark M.
Jim
Ok.
Mark M.
or BitmapFactory.decodeFile
Jim
Got it.
fitz
SQLite - I have seen posts about limitations on size to 1024 and then others say there is no limitation - so is there? Also I need daily this dB to me removed and then replaced - I assume this is doable yes with killing app etc? Is it safe to assume we should load DB on SD card? most phones now come with SD cards at least 16MB? I know some basic questions.... still learning ....
me = be - sorry early morning
Mark M.
1024...what? MB? GB? TB?
fitz
TB would be nice :)
1MB
Mark M.
it can be much bigger than 1MB
storage space on the device will be a problem first
11:00 AM
Mark M.
regarding remove/replace, that sounds scary, but so long as all SQLiteDatabase/SQLiteOpenHelper objects are closed, you can delete the file
databases generally are not on external storage, though they can be, albeit without SQLiteOpenHelper support
external storage is fraught with problems (e.g., unavailable if the user has it mounted as a drive on a host PC) and therefore not great for databases, when avoidable
the 1MB limit you may have seen is on an individual resource/asset packaged in an APK file
fitz
ok - in your book you mentioned another authors book - this other book does it get into how to do dB replacements etc? work it's weight in paper?
Mark M.
You are thinking of _The Definitive Guide to SQLite_
it wouldn't have anything on database replacements, as that's not a SQLite concept -- that's a fitz concept
mostly, that book is good if you are using SQLite from several languages, as it covers various bindings
to look at it another way, I haven't used it in two years
Mike: do you have another question?
Mike R.
yes
fitz
ok thanks
Mike R.
Got a call from a headhunter looking for a Android developer in Jersey. not for me, but she asked if I could bring up on any mailing lists.
is there a mailing list / forum where such a thing might be appropriate?
11:05 AM
Mark M.
she should use existing resources for those: LinkedIn, Craigslist, etc.
lots of job listings there
I don't know of any Android-specific job board site
though I've dropped hints the size of boulders that somebody should go create one
Mike R.
sounds good. I know the BNR mailing lists occasionally have postings, but there is no android list on BNR
Mark M.
Jim: another question?
Jim
Suppose when you buy my app, you get some free tokens with your purchase, and then over time, you use them up, and so you use the new in-app billing to buy some more, and I want to make sure you can't hack and get some free tokens, where and how should I store the the token counter of the number of tokens you currently own ?
Mark M.
on your server
Mike R.
has left the room
fitz
go to meet up - find local chapter they always talk about job offers etc.
Mark M.
there is no truly secure spot on the device -- users with rooted phones can get at pretty much anything
Jim
So should I use the user-id / password scenario ?
Make them register ?
Mark M.
that's a possibility
if you are using LVL, whatever unique ID you are using for it might suffice
I haven't thought about an implementation of this sort of thing much
Jim
Is there another possibility ? What is LVL ?
Mark M.
License Verification Library
Jim
Ah.
Ok.
DOne for the moment.
Mark M.
fitz: do you have another question?
fitz
Mike R. here is a local one I go to http://www.android-android.net/events/1485…
Mark M.
Mike departed
fitz
2700+ members
11:10 AM
Mark M.
any questions from anyone?
Jim
Still thinking of my token problem. If the phone is out of network touch (which will be the case sometimes, at least in my world), do I sync with the server from time to time ? Or maybe as they use them up ?
fitz
not from me - I am going to work on the Fitz concept :)
Mark M.
Jim: something like that
LVL does the same sort of thing for credential checking
so you might keep an unofficial token count on-device, comparing it when possible to the official count online
biggest issue there is if somebody figures out how to zero out the number of tokens used offline
at the end of the day, hacking tokens is not that different from ordinary piracy
my attitude has always been: put up enough barriers to make it a bit painful, then don't worry about it
fitz
Mark - found this article on how to do SQLite replacements so I am off to investigate - thanks see you next time - have a good day all - http://www.reigndesign.com/blog/using-your…
Mark M.
see ya!
Jim
How much slower is edge compared to 3g ? I wonder if I should compress more if on edge since I have to upload the image to a server.
Mark M.
well, I'd compress in either case
fitz
has left the room
Jim
Any way to calculate this ?
The time to upload, I mean.
Mark M.
calculate speed? not really, short of doing test uploads
bear in mind that "unlimited" data is a US concept, somewhat fictional
elsewhere, it's metered -- pay by the MB
Jim
How to determine the current speed ?
App id US only.
App is US only.
Mark M.
upload something, measure how long it took, divide the two
11:15 AM
Jim
Yuck. No API to see if edge or 3g ?
Mark M.
oh, well, you can determine that via ConnectivityManager
Jim
I just took a quick look.
I see WiMax, which I guess is 3g.
Mark M.
no, WiMax is 4G
TYPE_MOBILE is 3G/EDGE
you'd have to try to decipher those subtypes
I don't know what SUPL is, for example
Jim
I am beginning to share your depression...
Oh well.
I am out of here.
Thanks very much for keeping office hours.
Mark M.
sure!
Jim
I use it sometimes and it is invaluable.
Mark M.
glad to be useful!
Jim
Really sets you apart from other authors.
bye
Mark M.
see ya!
Jim
has left the room
11:30 AM
Mark M.
turned off guest access

Tuesday, February 8

 

Office Hours

People in this transcript

  • fitz
  • Jim
  • Mark Murphy
  • Mike Renda