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!
|
Mark M. |
how can I help you today?
|
Guy W. |
I have some coded it well
|
Guy W. |
I parse a json
|
Guy W. |
and hashmap the values
|
Guy W. |
and put the in a listview
|
Jan 9 | 10:00 AM |
Guy W. | |
Guy W. |
in onItemClick i iterate thriugh the hasmap again to get the values i need.
|
Guy W. |
lines 202-239
|
Guy W. |
should I be worried by the @SuppressWarnings("unchecked")
|
Guy W. |
is that the right way to do it?
|
Mark M. |
so long as you are casting to the right thing, it will work
|
Mark M. |
you could replace AdapterView<?> with something more concrete
|
Mark M. |
and that would get rid of the warning that you are suppressing
|
Jan 9 | 10:05 AM |
Guy W. |
it works :-)
|
Guy W. |
thanks
|
Guy W. |
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
|
Jan 9 | 10:10 AM |
Ollie T. | has entered the room |
Ollie T. |
Good morning
|
Mark M. |
hello, Ollie!
|
Mark M. |
Ollie: do you have a question?
|
Ollie T. |
Quick question for you. (Which of course never ends up being quick)
|
Ollie T. |
I need to make an app for work to handle our helpdesk items
|
Ollie T. |
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.
|
Ollie T. |
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.
|
Jan 9 | 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
|
Mark M. |
OK
|
Ollie T. |
So we can type "resolution=blah blah" and it will put that in the resolution field
|
Ollie T. |
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:
|
Mark M. |
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
|
Mark M. |
2. use JavaMail or some other library to send the email directly
|
Mark M. |
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?
|
Jan 9 | 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
|
Ollie T. |
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
|
Ollie T. |
Lol
|
Ollie T. |
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
|
Mark M. |
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
|
Mark M. |
Jeff: your turn! do you have a question?
|
Jan 9 | 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
|
Mark M. |
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)
|
Mark M. |
2. use something dedicated (e.g., Atlassian's JIRA)
|
Mark M. |
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
|
Mark M. |
sorry that I don't have more concrete advice for you
|
Mark M. |
Guy: do you have another question?
|
Jeff |
thanks
|
Mark M. |
Guy: if you have another question, let me know
|
Jan 9 | 10:30 AM |
Mark M. |
Ollie: do you have another question?
|
Mark M. |
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
|
Mark M. |
you should be able to specify a subclass of AdapterView, and you definitely can replace <?> with the actual data type for the generic
|
Jan 9 | 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
|
Jan 9 | 10:40 AM |
Jeff | has left the room |
Mark M. |
again, if anyone has any questions, chime in
|
Jan 9 | 10:45 AM |
Ollie T. |
I think I am done for the day. Thanks again!
|
Guy W. |
should I extend the simpleadapter
|
Guy W. |
?
|
Mark M. |
Ollie: you are very welcome
|
Mark M. |
Guy: I do not see why you would need to
|
Jan 9 | 10:50 AM |
Guy W. |
dont know what datatype to use with AdapterView<T>
|
Jan 9 | 10:55 AM |
Mark M. |
it should be the same as your cast
|
Mark M. |
so, AdapterView<Map<String, String>>
|
Guy W. |
eclipse didnt't like it :-)
|
Mark M. |
:: shrug ::
|
Mark M. |
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
|
Guy W. |
I took it :-)
|
Guy W. |
Thank you again
|
Mark M. |
you are very welcom
|
Mark M. |
er, welcome
|
Jan 9 | 11:00 AM |
Mark M. |
and that's a wrap for today's chat
|
Mark M. |
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
|
Mark M. |
have a pleasant day!
|
Guy W. | has left the room |
Mark M. | turned off guest access |