If, at any point, you need help, have questions, or get unexpected or unexplained errors, please don't hesitate to use the Google Group.
Pre-Requisites
Precautions
By installing your own server, you are affirming your understanding that updates to the Android application and/or Chrome extension may break your implementation. You should keep your server up to date at all times, as the way these component pieces pass information is liable to change.
Installing the server
- Create a new App Engine application; make a note of the ID (we'll reference that as app-id from now on)
- Extract/unzip the downloaded source to a convenient location
- Navigate to the location you extracted the source to in your console/terminal/shell
- Modify src/app.yaml to replace android2cloud with app-id
- Run the following command:
python google_appengine/appcfg.py update src
- When the application finishes uploading, you will need to wait for App Engine to build the indexes. As soon as that is finished, your server is set up. To check the status of your indexes, log in to the control panel at http://appengine.google.com, choose app-id, and choose Datastore Indexes on the left. It will either say "Building" (not ready) or "Serving" (ready).
Configuring Android
- Open the application
- Select "Change Account"
- Select "Add Account"
- Enter an account name for Account
- Enter http://app-id.appspot.com (http:// is necessary, no trailing /) for Host
- Save
- Log in
- Grant access
- Select the new account
Configuring Chrome
Please note, Chrome's support for this is nearly nonexistent. That is my fault, and I'm working to remedy it. In the meantime, please forgive the numerous complicated steps below.
- Unzip the source archive to a permanent location
- Open manifest.json
- Change the server variable from "android2cloud.appspot.com" to "app-id.appspot.com"
- Change the consumer_key and consumer_secret to "anonymous"
- Save and close manifest.json
- Open background.html
- Change every instance of "android2cloud.appspot.com" with "app-id.appspot.com"
- Save and close background.html
- Open chrome://extensions
- Click "developer mode"
- Select "Load unpacked extension"
- Open the folder you unzipped the source to
- Authenticate when the window opens
In background.html, you don't update every instance to your server, just the first one. That is, change where it says: var host = "android2cloud.appspot.com" to var host = "~insertYourAppIdHERE~.appspot.com"
The second one, 'consumer_key': "android2cloud.appspot.com", did not work unless I left it android2cloud. It looks like it's some sort of OAuth authorization. I'm pretty sure you want to leave that as-is. I'm not sure the "consumer_secret" should be in that file.
Thanks for pointing that out. This was from before a re-factoring of the source code to make deploying a custom server a bit easier. The consumer_key and consumer_secret should actually be changed to "anonymous", technically. And unfortunately, the consumer_secret has to be included in the source. It's ok, though-- the app, according to OAuth spec, shouldn't be identified just by the consumer key or secret, so the security risk is minor.
Step 6 of Configuring Android results in a failed call to "ah/OAuthGetRequestToken".
Did you change app-id to your app's ID?
Can't get it to work with default settings, when I try to create a profile and press "save", nothing happens.
Could you file a bug report? Thanks.
Besides having to build python 2.5 using 'make altinstall' on centos which is running 2.4.x from the repo, the install went perfect and is working.
I keep trying to run "python google_appengine/appcfg.py update src" in the Python interactive shell. I keep getting "syntax error". I've never used Python before. Do you have more detained instructions you can email me? I changed the app name in the src/app.yaml file but I'm have problems. Thanks.
Confirming jazmatic's suggestion. The Chrome extension onlyworks if you change only:
var host = "android2cloud.appspot.com" to 'yourappid.appspot.com'
..and do NOT change the "var oauth = ...." block of code.
samishamieh1: If you went down into the src folder, you need to come back up one level in the tree to run the python command. This is because 'google_appengine' isn't in the src folder. It's in the parent folder above. Run the command there.
I'm on Ubuntu Linux v10.4 (Lucid Lynx) 64-bit
This works really well. I set up my own server, re-packed the extension and emailed it to my gmail account so I can easily install it on any Chrome system I use. I also tried it with 3 PCs in the same room and they all loaded the same page from my phone at the same time.
I finally got it working. FYI, There's an error in the instructions. The consumer_key and consumer_secret text is in the Background.html file, not the manifest.json file. Thank you sbwithers!
Great app. Works well. Much appreciation. Thank you.
Confirming jazmatic and sbwithers. Otherwise the OAuth page hangs on “Redirecting.”
Step 6 of Configuring Android results in a failed call to "ah/OAuthGetRequestToken"
I am now getting the above problem. :(
James, can you share what you're entering in the field?
sure.
I am hoping you've got an email now with the info :)
I am getting a similar problem where it is hanging on the Chrome extension "Redirecting" page.
I re-did it, but when creating the Google app engine app, I chose open to everyone, rather than only people on my domain. This appears to work with the android app. Now to try with the chrome extension. :)
Now seems to be working :-)
I take it that if you update the server software I will just need to download the source and do something similar to update my own server?
Thanks.
James
Sorry for the confusion and problems. It appears we have a bug on Apps domains. I'll have to look into that.
As for updating, you'll just have to download the source, change the app.yaml identifier again, and run appcfg.py update. :)
Works like a charm..
My server is up and running!!!
Thank you very much
Using Samsung galaxy GT-I9000 ZSJPE 2.2 (Hong Kong), SpeedMod?- K9a-500Hz Stuck at the web page at "/ ah/OAuthGetRequestToken" unavailable page. And I really cant follow the "Installing the Server step" Could someone please help me?
chansiufai12321, how can I help you? Getting stuck at that web page means that, for whatever reason, your Host field wasn't stored correctly. Could you tell me what you entered in the fields when adding your account?
Where are you getting lost on the instructions for Installing the Server?
thx for your speedy reply first. I typed "chansiufai12321@gmail.com" as the Account and the default host "http://adroid2cloud.appspot.com" After I click "Save", it just shows WEB PAGE NOT AVAILABLE.
For the instructions installing the server, i dont really know why i have to install a new application server instead of using the application downloaded from the market. Also, I dont know where are the files you talking about are located, and dont know how to use the python to type in the commands as well.
Sounds like there's some confusion here. You don't need to install a server at all; the option is there if you want to own your own data, or customise the server, however. Most people just use the public server.
As for the Web Page Not Available, it sounds like you're running into the problem where the Host field, for whatever reason, isn't getting saved. I'm going to try and debug this, and I'll probably end up issuing the fix when we switch over to the new server implementation.
Sorry you're having issues.
It's alright. Never mind. But I was curious about the mechanism behind your app. How does it work? Where do the (possible) problems come from?
The app, right now, just authenticates with OAuth, then stores a link in a database on the server. The extension loads a page from the server every fifteen seconds that will display the latest link of the logged in user. If the link matches the one in the extension's database, nothing happens, and it checks again in fifteen seconds. Otherwise, it opens a tab with the link in it, and checks again in fifteen seconds.
We're modifying this slightly with the new server architecture (coming soon!) but the basic idea stays the same. :)
As for where the problems come from, the one you were running into comes from the code that's handling storing your account credentials on the phone. I can't say specifically where it was coming from or what was causing it (if I knew, I'd have fixed it ;) ) but that seems to be the general area of the issue.
Out of curiosity, how did you manage to get it working?
Out of curiosity, how did you manage to get it working?
??sorry My English is poor, I cant get your meaning...
Not a problem. You said nevermind-- does that mean that the app now works for you? Your problem is fixed? What did you do to fix it?
... Again, sorry for my poor English. I meant you dont need to feel sorry about the issue. By the way, the problem wasnt fixed.
Not a problem. Sorry for the confusion.
I'll try to remember to update here if we find a solution for it.
Paddy, is the python update command "python google_appengine/appcfg.py update src" still valid for android2cloud 2.0.1 App Engine server? It doesn't work for me. Any suggestions? Do these instructions need to be updated?
The directions do need to be updated-- sorry, I haven't given them the love they deserve with all the problems 2.0.2 has been having.
To get it working, download the App Engine SDK: http://code.google.com/appengine/downloads.html
Then, download the App Engine source from our downloads page. Unzip it, and change app.yaml's first line to reflect your application id. Copy and paste the src folder into the App Engine SDK folder (so it's in the same folder as tools), then follow Google's instructions for uploading a project: http://code.google.com/appengine/docs/python/gettingstarted/uploading.html
Yep - that helped. Thanks Paddy!
The Chrome extension source is not available :-/ can you update the link please
Sorry for the confusion! This project site is actually deprecated--we've moved to Github. You can find out more at http://www.2cloudproject.com.
The new repositories are:
https://github.com/2cloud/AppEngine -- The server https://github.com/2cloud/Chrome -- The Chrome extension https://github.com/2cloud/android2cloud -- The Android app
They should have install instructions in the README file. :)
Sorry for the confusion!