View Single Post
jonnenau's Avatar
Posts: 116 | Thanked: 445 times | Joined on Apr 2010 @ Oulu, Finland
#36
Me I guess Didn't really notice erquest from these forums. But I did find a vote from dropboxes site about people requesting it for maemo 5. We'll took me a bit under two weeks and I have a quite ready client now.

Latest screenshot:
http://dl.dropbox.com/u/3589544/Drop...-16-7-2010.png

What the dropbox API does not provide:
Note that dropbox does not synch automatically on mobile devices. The mobile API can be abused like this but they will ban you out. This means when you push 100mb from your PC to dropbox. You wont be syncing that to your mobile hard drive once using a mobile dropbox client. This would be grazy as people have 2-100gb storage in their dropbox accounts and your drive on the phone would end quickly.

What the dropbox API does provide:
Nice way of building your ui view with metadata fetches about folders and items. You make these metadata requests as the user navigates deeper into his folder hierarchy. Once you want something to your device, you can simply fetch it.

DropN900 client capabilities:
  • Web auth with the maemo os browser. You only give your email and password to the dropbox website, not the app, it wont be stored anywhere. I recieve a access token and store that, which I can reuse on next sessions so you wont have to login but once. Of course when you want you can reset auth and login with another accounts.
  • Upload and download files.
  • Rename and delete files/folders.
  • Create new folders.
  • Image file thumbnail preview, loading animations and showing results for actions whether they succeeded or failed.
  • Threaded networking (non-bloking) so you'll have a smooth user experience while network I/O is happening. This is done with normal python threading.Thread:s. This had to be done as the dropbox python API was blocking, so every time i waited for a web response my ui freezed.

Restrictions, but might be temporary:
My app has a "sandbox" level access to dropbox. This means once you accept that my app can use your account data (in the first login via my app). Your dropbox root will get a new folder "DropN900". My app/you have free roam in this folder.

I have requested the full "dropbox" access level so I could provide the same as the dropbox made PC and mobile clients do. I can now already fetch metadata and give you listings from the root but there is little point if you cant interact with the files. Lets see how long they will take to answer my request and if they grant me it. It's already a handy app even with only sandbox access.

Can you get it?
Sure. This is my first real N900 app and would like to share it. But there are few things left on blocking this.

#1 I'm waiting for a response from dropbox how I can make my app key/secret hidden. They are now in a config file as they want (the api code reads this and sets up the lib). Anyways, this might not be a problem with iPhone (not sure) but on the N900 anyone can travel to my app folder with a terminal and read my keys. This could potentially lead to people using my keys and pose as my applications, making API calls with my app credentials. Lets see what they tell me. I guess it might be safe to leave it for people to see, if someone uses them they still have to make the user login and grant access to the app that would be using my keys. I guess they might have figured it like that. But as far as i understand these keys should be kept private :P I cant hide it to compiled code either as its python, or tell me if im wrong as I am no python expert.

#2 I will have to dive into python packaging to get this into the extras-devel repos. I have my main app and then python deps that I need. Please let me know if you can help with the deps I tried to do this once already with PyPackager, but meamo web helper said my .changes file was a fail.

Python 2.5 deps are:
- poster http://pypi.python.org/pypi/poster/0.6.0
- oauth http://pypi.python.org/pypi/oauth/1.0.1
- dropbox-client-python https://www.dropbox.com/static/devel...on-BETA.tar.gz

Technical details:
- python
- PyQt4 for UI
- dropbox REST API is HTTP GET/POST + json

Source code:
http://github.com/jonnenauha/DropN900

Please note, I am not a python expert. I code C++ for a living and am not an expert in that either If you have notes about the code please fill me in. Also read the readme.txt should explain many things and has my contact info for irc/email. I'll read this forum of course too.

Happy syncing as dropbox folks would say,
Jonne Nauha

Last edited by jonnenau; 2010-07-16 at 04:43.
 

The Following 12 Users Say Thank You to jonnenau For This Useful Post: