MacInsiders Logo

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind Mobile macbaby07 General Discussion 10 08-15-2011 06:56 PM
virgin mobile? SciMania General Discussion 22 05-11-2011 11:42 AM
Wind mobile? Linh Computers & Tech 41 09-06-2010 06:44 PM
wtf is wrong with googles gmail client? Ownaginatios Computers & Tech 7 08-11-2010 01:35 AM

MI mobile chat client (dev thread)

 
Old 02-17-2013 at 02:13 AM   #16
Chad
MacInsiders Founder/Admin
MacInsiders Staff
Join Date: Sep 2006
Posts: 7,121

Thanked: 1,202 Times
Liked: 1,730 Times




This is great work Afzal! I would be happy to help design and code a basic skin for it. How can I get this on my Android phone to play around and how do I skin it?
Old 02-20-2013 at 10:11 AM   #17
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




If you want, you can fork the github repo. Use the Android SDK to compile it, enable debugging mode on your phone and run.

I'll be more than happy to code the skin, it's the designing part that I can't do, like a guideline that will tell me how much padding/margin to use, what font styles to use and how much space to put between each element and some assets like backgrounds/borders.

The design docs for Android are located here: http://developer.android.com /design/index.html

We need designs for the following:

1. The messages screen, with a list of all messages. I think a good idea would be to make the message collapsible or hide-able, using something like how Reddit Sync hides comments. It also needs a text box for user input (formatting and everything will be handled using the SlidingMenu mentioned in (2).

2. We'll probably use something like SlidingMenu (https://play.google.com/store/apps/d... gmenu.example) to show the list of users and some options (on the right and the left like the facebook app) so we need designs for those. You will only need to design the content in the menu, not the menu itself.

Something like the sketch below maybe (?) except that the top-left screen is missing the text box

__________________
Afzal Najam - Honours Computer Science grad
Old 02-20-2013 at 06:31 PM   #18
Chad
MacInsiders Founder/Admin
MacInsiders Staff
Join Date: Sep 2006
Posts: 7,121

Thanked: 1,202 Times
Liked: 1,730 Times




Great. I've never coded or designed for Android before so this will be a first (an an exciting project). What sort of file would you need for it. If I can mock it up in photoshop or Adobe Fireworks and get you a PSD or transparent PNG files would that get you started? Not sure how you need to slice it all up.

Afzal says thanks to Chad for this post.
Old 02-20-2013 at 07:34 PM   #19
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Quote:
Originally Posted by Chad View Post
Great. I've never coded or designed for Android before so this will be a first (an an exciting project). What sort of file would you need for it. If I can mock it up in photoshop or Adobe Fireworks and get you a PSD or transparent PNG files would that get you started? Not sure how you need to slice it all up.
I think PSD or png would work fine. I can take care of the slicing since there's a little optimization technique with 9-patch pngs, which is probably what will be used for borders.
__________________
Afzal Najam - Honours Computer Science grad
Old 04-23-2013 at 12:41 AM   #20
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Update: This is still being developed. There was a slump in between where I stopped working on it though.

I'm sort of re-writing the app with a "UI-first" philosophy.

Here's the design right now:





__________________
Afzal Najam - Honours Computer Science grad

Last edited by Afzal : 04-23-2013 at 09:41 PM.

Old 04-23-2013 at 10:04 AM   #21
Chad
MacInsiders Founder/Admin
MacInsiders Staff
Join Date: Sep 2006
Posts: 7,121

Thanked: 1,202 Times
Liked: 1,730 Times




The screenshots look fantastic!

I'm not sure what you mean about the cookie. Send me an email and we can try to troubleshoot it together, maybe over Skype.

I'll also make sure you get set up with some database credentials.
Old 04-23-2013 at 12:46 PM   #22
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Quote:
Originally Posted by Chad View Post
The screenshots look fantastic!

I'm not sure what you mean about the cookie. Send me an email and we can try to troubleshoot it together, maybe over Skype.

I'll also make sure you get set up with some database credentials.
I switched from HttpUrlConnection to Google Http Client. I wanna say that the params I'm passing are not correct, will try alternatives later.

Edit: yup, the parameters have to be passed as form-data and not url encoded. And I have no idea how to pass them as form-data using Google Http Client >_<

Edit 2: Fixed that issue.
__________________
Afzal Najam - Honours Computer Science grad

Last edited by Afzal : 04-23-2013 at 09:41 PM.
Old 04-24-2013 at 02:09 PM   #23
Chad
MacInsiders Founder/Admin
MacInsiders Staff
Join Date: Sep 2006
Posts: 7,121

Thanked: 1,202 Times
Liked: 1,730 Times




Quote:
Originally Posted by Afzal View Post
Edit 2: Fixed that issue.
Awesome. Let me know how I can help [email protected] om
Old 04-24-2013 at 02:12 PM   #24
Ownaginatios
Trolling ain't easy
Join Date: Jul 2008
Posts: 3,190

Thanked: 499 Times
Liked: 1,642 Times




Quote:
Originally Posted by Afzal View Post
Edit: yup, the parameters have to be passed as form-data and not url encoded. And I have no idea how to pass them as form-data using Google Http Client >_<

Edit 2: Fixed that issue.
lol isn't that how I was doing it in my code?
__________________
Dillon Dixon
Alumni
Software Engineering and Embedded Systems
Old 04-24-2013 at 03:52 PM   #25
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Quote:
Originally Posted by Ownaginatios View Post
lol isn't that how I was doing it in my code?
Google's client has some benefits over ApacheHttpClient (supporting both HttpUrlConnection and Apache Http Client for older versions of Android). Had to find a class for multipart form data.

For now I've switched to android-async-http, a library that uses Apache Http Client and would leverage a bit of your code for cookie stuff. Might visit Google Http Client later on once everything else is in place (or maybe never for this app).

Or we could just use this https://code.google.com/p/httpclientandroidlib/ and compile android-async-http using that.

Quote:
Originally Posted by Chad View Post
Awesome. Let me know how I can help [email protected] om
Lol, my account got locked out for 15 minutes last night because of lots of wrong password attempts. I was only clicking the login button to test the wrong password scenario
__________________
Afzal Najam - Honours Computer Science grad

Last edited by Afzal : 04-24-2013 at 10:48 PM.
Old 04-25-2013 at 02:52 AM   #26
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




App workflow readme updated. Should be much much simpler now. I cut a lot of crap from the concept which should help in the long run now that we don't need to care much about each byte and each header that goes in and out.

You can log in now (it won't show an updated message list though) and see the beautiful wrong password error message if it's a wrong password

Oh and if you're successful in logging in, you don't need to ever enter the password again UNLESS it fails to login.
__________________
Afzal Najam - Honours Computer Science grad

Chad, Watoko like this.
Old 04-28-2013 at 08:48 AM   #27
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Loads the user list now. The messages list shouldn't take much time. After that, only posting the message will be left before the initial release (which won't have colours, images, emoticons etc).

If anyone wants to help, implement the same thing with Messages as it is with Users.
__________________
Afzal Najam - Honours Computer Science grad

Last edited by Afzal : 04-28-2013 at 08:54 AM.
Old 04-28-2013 at 09:14 AM   #28
Ownaginatios
Trolling ain't easy
Join Date: Jul 2008
Posts: 3,190

Thanked: 499 Times
Liked: 1,642 Times




Quote:
Originally Posted by Afzal View Post
If anyone wants to help, implement the same thing with Messages as it is with Users.
I can start helping out probably next week when I move back to Toronto. Looking good so far
__________________
Dillon Dixon
Alumni
Software Engineering and Embedded Systems
Old 04-29-2013 at 02:49 AM   #29
Afzal
Android Dev
Join Date: Jun 2009
Posts: 1,604

Thanked: 114 Times
Liked: 414 Times




Good news! Now it loads messages and scrolls to the bottom of the list.

1. Still a manual refresh, only the first refresh is automatic.
2. Scrolling to bottom isn't animated. --> DONE
3. Progress indicator on first load (when list is blank) and progress indicator in title bar when refreshing. --> DONE
4. Fast scrolling thumb that you could drag to scroll. --> DONE
5. Parsing each message to be user-friendly. Like "/login User" becomes "Chatbot: User has logged in", and links are clickable, images are either loaded, loaded in a dialog box on clicking the link, etc.
6. Progress bar doesn't disappear if no new messages were added to the database.
7. Still no progress on the posting message side.

For (1), an infinite for-loop might not be the best idea, would be a very battery-intensive app that way.
For (5), not sure where to begin but this would most probably go in MessagesCursorAdapter where we read each row and set its style etc.
For (6), Something with CursorLoader callback.

For (7), we need to figure out an elegant solution to storing the <infos> tag, I don't like that I'm using a database to store one row for a one-time thing. Storing in SharedPreferences might be better (?)

Something like: If the <infos> tag is present, update the user details stored in the SharedPreferences.
Then to post a message, you'd just pull the user details from there.

So for anyone who wants to help, try to do one of those 7 things, preferably the top six.


Fork, update, submit a pull request.
__________________
Afzal Najam - Honours Computer Science grad

Last edited by Afzal : 04-29-2013 at 03:19 PM.
Old 04-29-2013 at 03:55 PM   #30
Chad
MacInsiders Founder/Admin
MacInsiders Staff
Join Date: Sep 2006
Posts: 7,121

Thanked: 1,202 Times
Liked: 1,730 Times




Looking great! I'm more a designer than a dev, but any way I can help with visuals or otherwise let me know. How can I try the app out on my android phone?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



McMaster University News and Information, Student-run Community, with topics ranging from Student Life, Advice, News, Events, and General Help.
Notice: The views and opinions expressed in this page are strictly those of the student(s) who authored the content. The contents of this page have not been reviewed or approved by McMaster University or the MSU (McMaster Students Union). Being a student-run community, all articles and discussion posts on MacInsiders are unofficial and it is therefore always recommended that you visit the official McMaster website for the most accurate up-to-date information.

Copyright © MacInsiders.com All Rights Reserved. No content can be re-used or re-published without permission. MacInsiders is a service of Fullerton Media Inc. | Created by Chad
Originally Powered by vBulletin®, Copyright © 2019 MH Sub I, LLC dba vBulletin. All rights reserved. | Privacy | Terms