Monday, May 31, 2010

Weekly report #1

Enjoy! (hosted on wiki.ubuntu.com) http://goo.gl/GGGp

Saturday, May 29, 2010

users team (and soon: mailing list)

Make sure you join androidu1-users team on lp :) ! I may also request a mailing list for the team, so that we'll have our own place, if you think it's a good idea - is it?

Launchpad project setup

Hi everybody! It's been a while. On Wednesday evening I broke my Ubuntu (installed an old udev driver) and made it unusable. I recovered on Thursday, talked to my mentor, seeked some feedback on IRC and investigated OAuth behaviour (there are still issues, doesn't work every time).

I have setup a launchpad project, which you will find here. Since I don't want people to unintentionally bzr branch (download) the development sources, which can be broken any time and are suitable for review (or testing) only, I have left the trunk series with main branch empty. Therefore if you're interested in the devel branch, check this out. Whenever I will implement a feature in 0.x series, I will push that to the main branch.

Tomorrow I'm co-organizing this http://goo.gl/YGSX conference, and afterwards I plan to see into releases, blueprints and milestones of the lp project (+ some nightly hacking).

Stay tuned. I wonder if my project can have it's mailing list.. ah! I'll set up androidu1-users group :D

PS I should have started writing my blog post in HTML long ago ;) No stress at all.

Wednesday, May 26, 2010

OAuth continues




And no, the log-in procedure is far from perfect. I feel that 1/3 of the time I was fighting with this error (and it, or my bug, cases authorization to work after 2nd or even 3rd try):

oauth.signpost.exception.OAuthExpectationFailedException: Request token or token secret not set in server reply. The service provider you use is probably buggy.

And now, for desert:
onResume
loginButton clicked
Retrieving request token...
Request token: xDs38NX3MsrSDP7H5hg4
Request secret: Fb7wZ9Gq3502TLRBSVXnWgg1LC4j41s8XtKKS9fqcTmJ936sc3KxxxxxxxNglBkpZS6W0WPvw31lF
Saving request information...
Saving Request Token: xDs38NX3MsrSDP7H5hg4
Saving Request Secret: Fb7wZ9Gq3502TLRBSVXnWgg1LC4j41s8XtKKS9fqcTmJ936sc3KxxxxxxxhNglBkpZS6W0WPvw31lF
Starting browser with authURL: https://one.ubuntu.com/oauth/authorize/?oauth_token=xDs38NX3MsrSDP7H5hg4&description=Android
onNewIntent
callback URI: androidu1://?oauth_token=xDs38NX3MsrSDP7H5hg4&oauth_verifier=0d14b808-fee3-40ba-b05e-1aedd595ab03&return=https://one.ubuntu.com
Saved request token: xDs38NX3MsrSDP7H5hg4
Saved request secret: Fb7wZ9Gq3502TLRBSVXnWgg1LC4j41s8XtKKS9fqcTmJxxxxxxxwMhWbhNglBkpZS6W0WPvw31lF
Restoring mConsumer state...
oauthToken: xDs38NX3MsrSDP7H5hg4
oauthVerifier: 0d14b808-fee3-40ba-b05e-1aedd595ab03
Retrieving access token...
Access token: xz2Xc2rlQ7nBJ3jG4hpm
Access secret: xz2Xc2rlQ7nBJ3jG4hpm
Saving access information...
Saving OAuth Token: xz2Xc2rlxxxxxG4hpm
Saving OAuth Secret: 9l5wXfmxlF0Px4RpZ5tm9R9fFKkr5kDGlWtsDfJrZV3hVQr1xxxxxxxxx0hRPdj3ScmThxMjzM78FP
Removing request information...
Clearing Request Token
Clearing Request Secret
Testing...
Sending request to U1...
200 OK

There's one bug in the log, but my eyes already hurt. G'nite.

Monday, May 24, 2010

First official coding day (night?)

I knew I would overdo it.. The beards are already singing and it's 4:15 AM on the clock :P
Is this the best coding time, or what :D! I was afraid of OAuth, which I'm new to, so I dug tens of pages and browsed at least 5-6 sample codes, using this or that, newer or older oauth version, with and without callback, blah blah blah. And I got it :D Signpost is dead simple (yeah, it's true what they write :) ), and they have those lovely sample codes, so I used one :) I jumped into ubuntuone-client Python code and dug a reference to /etc/xdg/ubuntuone/oauth_urls which I needed, set up few more variables, and..
Fetching request token from Ubuntu One...
Request token: GnpqrjR98jBcXXXXXXX
Token secret: pvBlJDjq1jgm9M14rzx0hgH2xXNnhFG8zC3VkqxDdshrSKcnbBNJwD6CCJR4XXXXXXXX
Now visit:
https://one.ubuntu.com/oauth/authorize/?oauth_token=GnpqrjR98jBXXXXXXXX
... and grant this app authorization
Enter the PIN code and hit ENTER when you're done:
XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
Fetching access token from Ubuntu One...
Access token: ddxQlp8tfltXXXXXXXX
Token secret: Zn172Q7xsFdTlfB58LhLg4c8TzFmHRRhLWMQDCdvrrjJ27d0fkbk8qvVjN9rtbcnmfXXXXXXXXXXXXX
Sending request to Ubuntu One...
Response: 200 OK
Well, I'm more confident now ;)

Sunday, May 23, 2010

Regular update, May 22th

Played with verterok's u1-java-storageprotocol example client code, tried to understand the Deferred and Deferred.Callbacks usage (seems like static class fields are the easiest way to overcome issues with scope of variable visibility in the callbacks, which I don't particularly like..) and added some simple CLI interactivity, as seen below (yeah, this is somewhat the very beginning of our Android app; a regular user would be at least moderately confused :D)

Saturday, May 22, 2010

Regular update, May 21st

Hi all!

First, I wanted to thank for your comments, mails, even a wiki feature-request entry :) Your opinions and feedback is priceless, and one of the things that gratifies my efforts. Thank you, Ubuntu Community!

And now the update: yet again, Guillermo (aka verterok) is my hero ^ ^ To remind you, he's the one that has written ubuntuone-java-storageprotocol, which I will be using. He has answered all my questions, both really silly and some less-but-still-silly ;) (I am glad he believes there's no such thing as dumb questions :) ). He also spent quite a while helping me to properly configure the project with maven, which I am new to. Thank you, verterok!

Finally I was able to run the ExampleClient from within Eclipse, and see it in action. I also played a bit with the code, but plan much more code-fun for tomorrow (Saturday, that is).

Keep visiting, commenting, and sending your suggestions :) !