Office Hours — Today, September 24

Saturday, September 21

Sep 24
7:15 PM
Mark M.
has entered the room
7:25 PM
Mark M.
turned on guest access
8:20 PM
Bryan G.
has entered the room
Bryan G.
Hello
Mark M.
hi! the chat hour is nearly over -- do you have a quick question?
Bryan G.
I do
I asked the question on the forum about getting notified about voicemail
Mark M.
ah, yes
Bryan G.
the short is that I do have ADD_VOICEMAIL permission
I *think* it comes automatically because my app is the chosen default dialer for the phone
I haven't tested that yet, but regardless, I have the permission
Mark M.
(BTW, for anyone reading this transcript, this is a follow-on to https://community.commonsware.com/t/get-alert-o...)
Bryan G.
my problem is that I have not messed with content providers in a long time
so when I did a quick and dirty "query" I got back null
8:25 PM
Mark M.
null?
Bryan G.
yeah, bupkiss
Mark M.
I can see an empty Cursor, but null?
Bryan G.
well, I can't remember off the top of my head, I will try it again and follow up with details on the forum post above
but do you have any good resources that you would recommend for just KISS content provider stuff
just for me to do a sanity check that I actually do have access to that information (the voicemailcontract) ?
Mark M.
I have chapters on ContentProvider in *The Busy Coder's Guide to Android Development*
Bryan G.
Ok, I will take a look and follow up on the forum
Mark M.
I don't cover VoicemailContract specifically, and looking at that class, they defined it oddly
Bryan G.
thank you sir
how so?
Mark M.
no pre-defined Uri
they give you an authority string and nothing else
in particular, they do not provide any root paths
oh, wait
nevermind
it's on VoicemailContract.Voicemails
Bryan G.
yeah, it shows authority / voicemails
ok, phew
:)
the annoying thing is that the broadcast should work too
Mark M.
in theory, at worst, a query() on VoicemailContract.Voicemails.CONTENT_URI should return an empty Cursor
are you sure your carrier supports all this?
Bryan G.
well, the voicemailcontract is per the phone not the carrier right?
Mark M.
but the content is per the carrier
the phone itself has no voicemails
the voicemails are on some server at the carrier
Bryan G.
so the question is, if my app is the default dialer does the carrier even notify the content provider
8:30 PM
Mark M.
I would not expect the choice of dialer to affect how VoicemailContract's backing provider gets populated
Bryan G.
yeah, that is what I was thinking too
Mark M.
that being said, other than "the carrier is involved", there isn't a lot of info on this, IIRC
Bryan G.
kk, well, I don't want to keep you and I haven't done enough homework for a more intelligent question, so I will give it a shot....
Mark M.
for example, I haven't the foggiest notion how this works with unlocked phones, where the carrier is determined by the SIM card
Bryan G.
yeah I am on Google Fi
Mark M.
well, there had better be good carrier support there :-)
Bryan G.
one would think
:)
Mark M.
anyway, if you can post some code to that forum thread, I can take a peek at it
Bryan G.
will do, thanks again
Mark M.
you're welcome!
that's the end of today's chat
the transcript will get posted to https://commonsware.com/office-hours/ shortly
and the next chat is Thursday at 8:30am US Eastern
have a pleasant evening!
Bryan G.
has left the room
Mark M.
turned off guest access

Saturday, September 21

 

Office Hours

People in this transcript

  • Bryan Gintz
  • Mark Murphy