Office Hours — Today, January 9

Tuesday, January 7

Mark M.
has entered the room
Mark M.
turned on guest access
Guy W.
has entered the room
Guy W.
hello
Mark M.
hello, Guy!
how can I help you today?
Guy W.
I have some coded it well
I parse a json
and hashmap the values
and put the in a listview
Jan 9
10:00 AM
Guy W.
in onItemClick i iterate thriugh the hasmap again to get the values i need.
lines 202-239
should I be worried by the @SuppressWarnings("unchecked")
is that the right way to do it?
Mark M.
so long as you are casting to the right thing, it will work
you could replace AdapterView<?> with something more concrete
and that would get rid of the warning that you are suppressing
10:05 AM
Guy W.
it works :-)
thanks
what should I put in the AdapterView<?>
Mark M.
well, I have not used SimpleAdapter, so I am not completely certain, but ListView<Map<String, String>> should work in your case
10:10 AM
Ollie T.
has entered the room
Ollie T.
Good morning
Mark M.
hello, Ollie!
Ollie: do you have a question?
Ollie T.
Quick question for you. (Which of course never ends up being quick)
I need to make an app for work to handle our helpdesk items
With it being behind a firewall and needing either VPN or being on company wifi.. I am planning on cheating and relying on the emails that get sent.
With that said.. it appears I have to practically write an email client backend to make this beast work. Do you have any tips on where to start?
Mark M.
let's back up a step
Ollie T.
Ok
Mark M.
"With it being behind a firewall..." -- what is "it"?
Ollie T.
Sorry, our ticketing system is web based, but on the corporate lan.
10:15 AM
Ollie T.
So I can't just do simple(er) web calls to get the info
Mark M.
but email isn't really a replacement for a Web service API
Ollie T.
But when a ticket is created we get an email with the details and so forth, and can respond via email
Mark M.
oy
OK
Ollie T.
So we can type "resolution=blah blah" and it will put that in the resolution field
Bunch of stupid responses to learn vs being able to type in an app and have it send that way.
Mark M.
well, for sending the email, you have two choices:
1. use ACTION_SENDTO and a mailto: Uri, and have it be delivered by an existing email client, such as the one that got the original email in the first place
2. use JavaMail or some other library to send the email directly
option #1 is far simpler, but does assume the existence of this configured email app, and relies upon the user actually sending the email
Jeff
has entered the room
Mark M.
(BTW, hello, Jeff -- I will be with you in a moment!)
Ollie T.
My thoughts on the app though was to have it basically be a push email client that filters for the ticketing text and formats it correctly
Mark M.
oh, so you want your app to *receive* these emails as well?
Ollie T.
yes sir
Mark M.
how many engineer-months do you have for this project?
10:20 AM
Mark M.
IOW, this will not be easy to write, particularly if you want the app to be reliable and efficient
Ollie T.
As many as necessary
We just started our new system so this is a bonus
Mark M.
personally, I'd prefer a box of chocolates as a "bonus", but that's just me "-)
Ollie T.
I didn't think it would be simple, (me and my quick questions ya know) but I figure it would be doable and a great project
Lol
Life is like that sometimes :)
Mark M.
you might want to look at the source for K9 Mail and see whether the backend could be reasonably extracted and reused
Ollie T.
Ahh brilliant
Mark M.
I am not aware of any other open source email clients, though there well could be some
but it's gonna be a fair bit of code
Ollie T.
K9 is a popular one that people seem to really like, so I trust it
Mark M.
yeah, I use that nowadays, and I haven't had too many problems with it
Ollie T.
I have the feeling in a few weeks I will have more questions about this. That is a great place to start thank you!
Mark M.
but, like all email clients, it has its quirks, particularly when dealing with squishy IMAP standards
Jeff: your turn! do you have a question?
10:25 AM
Jeff
hi. general question since you see a lot of different shops. I have a contractor working for me and I need better bug tracking. what online/Internet-based bug tracker do you recommend? I used to use Bugzilla but I suspect that is out of date
Mark M.
yeah, Bugzilla is showing its age
there appear to be two schools of thought for bug trackers:
Jeff
and really I will need a requirements database/tracker soon
Mark M.
1. use whatever happens to come with your public version control (e.g., issues in GitHub, issues in Google Code)
2. use something dedicated (e.g., Atlassian's JIRA)
personally, since my code is open source, I just use GitHub issues
Jeff
yes, I'm leaning toward JIRA
Mark M.
I have not interacted with JIRA much, but it felt like Bugzilla on steroids
Jeff
Ok, good to know I'm on the right track
Mark M.
but, I'm not an enterprise developer anymore and so I have limited experience with the latest-and-greatest in this space
sorry that I don't have more concrete advice for you
Guy: do you have another question?
Jeff
thanks
Mark M.
Guy: if you have another question, let me know
10:30 AM
Mark M.
Ollie: do you have another question?
OK, if anyone has a question, chime in
Guy W.
all the examples of simpleadapter I found used AdapterView<?>
Mark M.
that is the official method signature
you should be able to specify a subclass of AdapterView, and you definitely can replace <?> with the actual data type for the generic
10:35 AM
Mark M.
since AdapterView can work with arbitrary data models, they use Java generics to allow for type safety without forcing specific data types in the base class
10:40 AM
Jeff
has left the room
Mark M.
again, if anyone has any questions, chime in
10:45 AM
Ollie T.
I think I am done for the day. Thanks again!
Guy W.
should I extend the simpleadapter
?
Mark M.
Ollie: you are very welcome
Guy: I do not see why you would need to
10:50 AM
Guy W.
dont know what datatype to use with AdapterView<T>
10:55 AM
Mark M.
it should be the same as your cast
so, AdapterView<Map<String, String>>
Guy W.
eclipse didnt't like it :-)
Mark M.
:: shrug ::
then just leave the cast there
Guy W.
OK
Mark M.
again, I don't use SimpleAdapter, so I have not run into this situation
Guy W.
the example I found looked so elegant
I took it :-)
Thank you again
Mark M.
you are very welcom
er, welcome
11:00 AM
Mark M.
and that's a wrap for today's chat
next one is Tuesday, 4pm US Eastern Time
Ollie T.
has left the room
Mark M.
the transcript of this chat will show up on http://commonsware.com/office-hours/ shortly
have a pleasant day!
Guy W.
has left the room
Mark M.
turned off guest access

Tuesday, January 7

 

Office Hours

People in this transcript

  • Guy West
  • Jeff
  • Mark Murphy
  • Ollie Townsend III